
<!-- //used so the browser does not print the source code if java is not supported.

function dofocus()
{
	document.Login.username.focus();
}

function clear() 
{
	document.Login.username.value = "";
	document.Login.password.value = "";
	dofocus();
}

function formField1(form) 
{
	Ctrl = document.Login.username;
	if(Ctrl.value == "") 
	{
		validatePrompt(Ctrl, "Please enter a valid User ID");
		return (false);
	}
	else
		return true;
}

function formField2(form) 
{
	bname = navigator.appName;
	bver = parseInt(navigator.appVersion);
	if(bname == "Netscape" && bver < 3)
		return true;

	Ctrl = document.Login.password;
	if(Ctrl.value == "")
	{
		validatePrompt(Ctrl, "Please enter a Password");
		return (false);
	}
	else
		return (true);
}

function runSubmit(form, button)
{

	if(!formField1(form)) return false;
	if(!formField2(form)) return false;

	document.cookie = "signonValid=TRUE; path=/";


		result = window.location.protocol;     
		//result.toUpperCase();
		//if( result == 'HTTPS:' || result == "https:")
			return true;
		//else
		//{
		//	alert('We are sorry, this page is not secure.');        
		//	return false;
		//}	
}

function popupLogin(form, button, fiIBPath)
{
	if (runSubmit(form, button))
	{
		window.opener.location = "HTTPS://" + fiIBPath + "Login.cgi?userNumber=" + document.Login.username.value + 
			"&runmode=SIGN_IN&password=" + document.Login.password.value;
		window.close();
		return true;
	}
}

function validatePrompt (Ctrl, PromptStr) 
{
	alert (PromptStr)
	Ctrl.focus();
	return;
}

function testForDemo(fileName)
{
	if("" != "__cookie.demo__")
	{
		if(confirm("In order to register, you must first exit the demo. Would you like to exit the demo?"))
		{
			document.location = "index.html";
		}
		else
		{
			document.location = "demo.html";
		}
	}
	else
	{
		document.location = fileName; 
	}
	
	return false;
}
// -->


