function displayAdEnlargeWindow(in_contextPath, in_imageFile, in_businessName, in_width, in_height)
{
	//borders for the page configuration
	var iBorder = 5;
	var iFooter = 32;
	var iWidth 	= in_width + (2 * iBorder);
	var iHeight = in_height + iBorder + iFooter;

	var sParams = "width=" + iWidth + ",height=" + iHeight + ",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,left=" + getCenterX(iWidth) + ",top=" + getCenterY(iHeight);
	var sURL = in_contextPath + "/onlineSolution_displayAdEnlarge.do?image=" + in_imageFile + "&iblName=" + in_businessName;
	window.open(sURL, "displayAdWindow", sParams);
}

function helpWindow(in_contextPath)
{
	var sParams = "width=570,height=600,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=no,left=" + getCenterX(570) + ",top=" + getCenterY(600);
	var sURL = in_contextPath + "/help_home.do";
	window.open(sURL, "helpWindow",sParams);
}
function fontWindow(in_contextPath)
{
	var sParams = "width=570,height=600,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=no,left=" + getCenterX(570) + ",top=" + getCenterY(600);
	var sURL = in_contextPath + "/awu_supplyFont.do";
	window.open(sURL, "fontWindow",sParams);
}



function mapWindow(in_contextPath)
{
	var sParams = "width=430,height=435,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=no,left=" + getCenterX(430) + ",top=" + getCenterY(435);
	var sURL = in_contextPath + "/awu_mapPopup.do";
	window.open(sURL, "mapWindow",sParams);
}

function whatsThisStreetWindow(in_contextPath)
{
	var sParams = "width=200,height=130,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=no,left=" + getCenterX(430) + ",top=" + getCenterY(435);
	var sURL = in_contextPath + "/common_whatsThisStreet.do";
	window.open(sURL, "whatsThisStreetWindow",sParams);
}

function whatsThisQuickWindow(in_contextPath)
{
	var sParams = "width=200,height=100,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=no,left=" + getCenterX(430) + ",top=" + getCenterY(435);
	var sURL = in_contextPath + "/common_whatsThisQuick.do";
	window.open(sURL, "whatsThisQuickWindow",sParams);
}

function whatsThisAdvancedWindow(in_contextPath)
{
	var sParams = "width=200,height=150,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=no,left=" + getCenterX(430) + ",top=" + getCenterY(435);
	var sURL = in_contextPath + "/common_whatsThisAdvanced.do";
	window.open(sURL, "whatsThisAdvancedWindow",sParams);
}



function needHelpWindow(in_contextPath)
{
	var sParams = "width=450,height=600,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=no,left=" + getCenterX(450) + ",top=" + getCenterY(600);
	var sURL = in_contextPath + "/keyword_needHelp.do?showItem=a";
	window.open(sURL, "needHelpWindow",sParams);
}

function bookRegionWindow(in_contextPath)
{
	var in_state;
	for(i=0; i < document.forms.length; i++)
	{
		if ( document.forms[i].name == 'search.SearchForm')
		{
			if( document.forms[i].elements['location'].type == 'select-one')
			{
				in_state = document.forms[i].elements['location'].options[document.forms[i].elements['location'].selectedIndex].value;
				break;
			}
		}
	}
	var sParams = "width=450,height=600,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=no,left=" + getCenterX(450) + ",top=" + getCenterY(600);
	var sURL = in_contextPath + "/keyword_bookRegion.do?state=" + in_state;
	window.open(sURL, "needHelpWindow",sParams);
}

function getCenterX(in_windowWidth)
{
	return (screen.width - in_windowWidth) / 2;
}

function getCenterY(in_windowHeight)
{
	return (screen.height - in_windowHeight) / 2;
}

function highlighterColourWindow(in_contextPath)
{
	var sParams = "width=730,height=575,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=no,left=" + getCenterX(730) + ",top=" + getCenterY(575);
	var sURL = in_contextPath + "/awu_highlighterColourPopup.do";
	window.open(sURL, "highlighterColourWindow",sParams);
}

function openPrintOnlysWin(in_url, in_width, in_height)
{
	var width = in_width;
	var height = in_height;
	window.open(in_url,'printresults','width=' + width + ',height=' + height + ',scrollbars=yes,left=' + getCenterX(in_width) + ',top=' + getCenterY(in_height));
}