// JavaScript Document
function SubmitFormHandler(btn)
    {
        // process only the Enter key 
		if (event.keyCode == 13)
		{
			// cancel the default submit
			event.returnValue=false;
			event.cancel = true;
			// submit the form by programmatically clicking the specified button
			btn.click();
		}
    }

function LoginHandler(btn)
    {
        // process only the Enter key but only if there is already something in the password field. This means that if the user takes advantage of windows' form field memory, and selects their username from the droplist offered, if the password is auto filled for them, the login will still work by hitting enter. Even if they haven't put the cursor into the password field.
		if (!form1.tbPassword.value.length == 0)
		{
        	if (event.keyCode == 13)
			{
				// cancel the default submit
				event.returnValue=false;
				event.cancel = true;
				// submit the form by programmatically clicking the specified button
				btn.click();
			}
		}
    }


function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


function custom_print() {
    if (document.all) {
        if (navigator.appVersion.indexOf("5.0") == -1) {
            var OLECMDID_PRINT = 6;
            var OLECMDEXECOPT_DONTPROMPTUSER = 2;
            var OLECMDEXECOPT_PROMPTUSER = 1;
            var WebBrowser = "<OBJECT ID=\"WebBrowser1\" WIDTH=0 HEIGHT=0 CLASSID=\"CLSID:8856F961-340A-11D0-A96B-00C04FD705A2\"></OBJECT>";
            document.body.insertAdjacentHTML("beforeEnd", WebBrowser);
            WebBrowser1.ExecWB(6, 2);
            WebBrowser1.outerHTML = "";
        } else {
            self.print();
        }
    } else {
        self.print();
    }
}


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function shaunsConfirm(msg,location) { //v1.0
  answer = confirm(msg);
if (answer !="0") 
{ 
document.location = location 
} 
}