// JavaScript Document

	function pageSetup() {
		recordWindowSize();
		document.getElementById("ReturnUrl").value = getQSVal("ReturnUrl");
		document.getElementById("Email").focus();
	}

	function recordWindowSize() {
            
		var winW, winH;
		
		if (navigator.appName.indexOf("Microsoft")!=-1) {
			winW = parent.document.documentElement.clientWidth;
			winH = parent.document.documentElement.clientHeight;
		} else {
			winW = parent.window.innerWidth;
			winH = parent.window.innerHeight;
		}
		
		document.getElementById("lastWindowWidth").value = winW;
		document.getElementById("lastWindowHeight").value = winH;
	}
	
	function getQSVal(parm) {
		qs = window.location.search.substring(1);
		qsPairs = qs.split("&");
		for (i=0; i<qsPairs.length; i++) {
			pair = qsPairs[i].split("=");
			if (pair[0] == parm) {
				return pair[1];
			}
		}	
	}
