function goBack()
{
  document.location=returnPages[top.pageReturn];
}
function go()
{
	var url;
	var server = "";
	var securePortNo = "";
	var virtualpath = "";
	var argv= go.arguments;
	var argc= argv.length;
	var w = 800;
	var h = 600;
	var winl = (screen.width-w)/2;
	var wint = ((screen.height-h)/2)/2;
	if (winl < 0) winl = 0;
	if (wint < 0) wint = 0;
	
	if (argc < 1) return false;
	var section = argv[0];

	if (section == "apply") {
		server = apply_server;
		virtualpath = "/app/dpa.axp";
		securePortNo = marbleSecurePortNo;
	} else if (section == "status") {
		server = apply_server;
		virtualpath = "/app/enquire.axp";
		securePortNo = marbleSecurePortNo;
	} else if (section == "serv") {
		server = serv_server;
		virtualpath = "/servicing/index.axp";
		securePortNo = marbleSecurePortNo;
	} else if (section == "wstatus") {
		server = widget_server;
		virtualpath = "/check/index.html";
		securePortNo = widgetSecurePortNo;
	} else if (section == "other") {
		if (argc >= 2) virtualpath = argv[1];
	}
	
	if ( (top.setGlobalCouponCodeValue == null) || (top.setGlobalCouponCodeValue == "") || (section == "serv") )
	{
		adcode = "";
	}
	else
	{
		if (top.setGlobalAdCodeValue ==null)
		{
			adcode = "&COUP=" + top.setGlobalCouponCodeValue
		}
		else
		{
			adcode = "&ad=" + top.setGlobalAdCodeValue + "&COUP=" + top.setGlobalCouponCodeValue
		}
	}
	
	if (securePortNo != "")
		{
			url = server + ":" + securePortNo + virtualpath +"?resetstate=yes" + adcode;
		}
		else
		{
			url = server + virtualpath +"?resetstate=yes" + adcode;
		}
	
		if (section == "wstatus")
		{
			var newWin = window.open(url);
		}
		else if (section == "apply")
		{
			var newWin = window.open(url);
		}
		else
		{
			winProperties = "height="+h+",width="+w+",top="+wint+",left="+winl+",location=no,"+"scrollbars=yes,menubars=no,toolbars=no,resizable=yes,status=yes";
			var newWin = window.open(url, 'newwindow', winProperties);
	}
	
}

   
   // Pop up for the security note
   	function showPopUp()
	{
	  var PopUp = window.open("html/popup_security.html","popup_security","scrollbars=no,resizeable=no,resize=no,height=410,width=550");
	  PopUp.focus();
	}
