<!--

var srcGEMID1 = getURLParam('GEMID1')
var srcGEMID2 = getURLParam('GEMID2')
var srcGEMIDaff = getURLParam('GEMIDAFF')
var strDomain = ".gemoney.com.au"			// Enter top level domain here

if (srcGEMID1 != "") {
	var expDateID1 = new Date()
	expDateID1.setDate(expDateID1.getDate()+30)
	
	document.cookie = "Src_GEMID1=" + escape(srcGEMID1) + ";expires=" + expDateID1.toGMTString() + ";path=/ ;domain=" + strDomain
	}


if (srcGEMID2 != "") {
	document.cookie = "Src_GEMID2=" + escape(srcGEMID2) + ";path=/ ;domain=" + strDomain
	}

if (srcGEMIDaff != "") {
	var expDateaff = new Date()
	expDateaff.setDate(expDateaff.getDate()+60)
	
	document.cookie = "Src_GEMIDAFF=" + escape(srcGEMIDaff) + ";expires=" + expDateaff.toGMTString() + ";path=/ ;domain=" + strDomain
	}

function getURLParam(strParamName){
	var strReturn = "";
	var strHref = window.location.href.toUpperCase();
	
	if ( strHref.indexOf("?") > -1 ){
		var strQueryString = strHref.substr(strHref.indexOf("?"));
		var aQueryString = strQueryString.split("&");
		
		for ( var iParam = 0; iParam < aQueryString.length; iParam++ ){
			if (aQueryString[iParam].indexOf(strParamName + "=") > -1 ){
				var aParam = aQueryString[iParam].split("=");
				strReturn = aParam[1];
				break;
				}
			}
		}
	return strReturn;
	}
	
function launchApplication(product) {
	
	if (screen.height && screen.width) {
		height = screen.height - 80;
	} else {
		height = 520;
	}
	
	if (product == "lowrate") {
		var theURL = "https://apply.gemoney.com.au/eapps/Apply.faces?cardType=lowrate" }

	if (product == "source") {
		var theURL = "https://apply.gemoney.com.au/eapps/Apply.faces?cardType=source" }

	if (product == "myer") {
		var theURL = "https://apply.gemoney.com.au/eapps/Apply.faces?cardType=myer" }	
		
	if (product == "myworld") {
		var theURL = "https://apply.gomastercard.com.au/eapps/Apply.faces?cardType=myworld" }
		
	if (product == "wizard") {
		var theURL = "https://apply.wizard.com.au/eapps/Apply.faces?cardType=wizard" }
	
	if (product == "go") {
		var theURL = "https://apply.gemoney.com.au/eapps/ApplyRetail.faces?cardType=go" }

	if (product == "carecredit") {
		var theURL = "https://apply.gemoney.com.au/eapps/ApplyRetail.faces?cardType=carecredit" }
	
	var width = "622";
	var screenY = screen.height;
	var screenX = screen.width;
	var topvar = 0;
	var leftvar = (screenX - width) / 2;
 	window.open(theURL,'','resizable=no,scrollbars=yes,toolbar=no,menubar=no,location=no,status=yes,top='+topvar+',left='+leftvar+',width='+width+',height='+height+'');
}

function openIB() {
	
	var theURL = document.IB.product.options[document.IB.product.selectedIndex].value
	
	if (theURL != "select") {
	
	if (screen.height && screen.width) {
		var height = screen.height - 80;
		var width = screen.width -80;
	} else {
		var height = 520;
		var width = 360;
	}
	
	var screenY = screen.height;
	var screenX = screen.width;
	var topvar = 0;
	var leftvar = (screenX - width) / 2;
	
 	window.open(theURL,'','resizable=yes,scrollbars=yes,toolbar=no,menubar=no,location=no,status=yes,top='+topvar+',left='+leftvar+',width='+width+',height='+height+'');

	}
}

// RL 04/07/08
function launchWindow(url, name, width, height)
{
	if (url == undefined || url =="") {
		return true;
	}
	if (name == undefined || name == "") {
		var name = "win";	
	}
	if (width == undefined || width == "") {
		var width = "800";
	}
	if (height == undefined || height == "") {
		var height = "600";
	}
	
	if (window.open) {
		var screenY = screen.height;
		var screenX = screen.width;
		var topvar = (screenY - height) / 2;
		var leftvar = (screenX - width) / 2;
		win = window.open(url,name,"scrollbars=yes,menubar=no,resizable=yes,top="+topvar+",left="+leftvar+",width="+width+",height="+height);
		win.focus();
		return false;
	}
	return true;	
													
}

function printPage(){
	if (window.print) {
		window.print();
		return;
	}
	alert('Please press CTRL + P to print this page or alternatively go to your browser menu and select File > Print');
}

function selectAll(id){
	document.getElementById(id).focus();
	document.getElementById(id).select();
}

/* FF only 
function viewSource(page){
 	window.location = 'view-source:' + page.href;
}
*/


//-->