function NewProfilePrintWindow(page,pagew,pageh, aspect, retailerid, catid)
{
	features = ',resizable,scrollbars,toolbar'
	agent = navigator.userAgent.toLowerCase();
	//aspect controls whether the full retailer profile is printed or just the chosen section
	if (aspect == 1)
	{
		page = page + '.asp?var1=' + retailerid + '&var2=-1';
	}
	else
	{
		page = page + '.asp?var1=' + retailerid + '&var2=' + catid;
	}
	isMacIE = (agent.indexOf('msie') != -1) && (agent.indexOf('mac') != -1)
	if (isMacIE)
	{
		pagew -= 16
		pageh -= 16
	}

	window.open(page,'popup','width=' + pagew + ',height=' + pageh + features).focus()
}

function NewStoreVisitPrintWindow(page,pagew,pageh, aspect, retailerid, catid, profileid)
{
	features = ',resizable,scrollbars,toolbar'
	agent = navigator.userAgent.toLowerCase();
	//aspect controls whether the full retailer profile is printed or just the chosen section
	if (aspect == 1)
	{
		page = page + '.asp?var1=' + retailerid + '&var2=-1';
	}
	else
	{
		page = page + '.asp?var1=' + retailerid + '&var2=' + catid + '&var3=' + profileid;
	}
	isMacIE = (agent.indexOf('msie') != -1) && (agent.indexOf('mac') != -1)
	if (isMacIE)
	{
		pagew -= 16
		pageh -= 16
	}

	window.open(page,'popup','width=' + pagew + ',height=' + pageh + features).focus()
}
//THIS IS CALLED FROM COUNTRY AND FORMAT CHANNELS
function NewChannelProfilePrintWindow(page,pagew,pageh, channelitemid, catid, channel)
{
	features = ',resizable,scrollbars,toolbar'
	agent = navigator.userAgent.toLowerCase();
	//aspect controls whether the full retailer profile is printed or just the chosen section
	
	page = page + '.asp?var1=' + channelitemid + '&var2=' + catid + '&var3=' + channel;
	
	isMacIE = (agent.indexOf('msie') != -1) && (agent.indexOf('mac') != -1)
	if (isMacIE)
	{
		pagew -= 16
		pageh -= 16
	}

	window.open(page,'popup','width=' + pagew + ',height=' + pageh + features).focus()
}