	var re = /&lt;br&gt;/g;
	
	function InitPage(){
	
			// Display error header if there is an error
			if (cMessage > '') {
				cMessage = cMessage.replace(re,"<br>");		
				DIVErrorHeader.style.visibility="visible";
				DIVErrorHeader.style.display = '';
				DIVLoginError.style.display = '';
				DIVLoginError.innerHTML=cMessage + "<br>&nbsp;";
			}

			document.frmLogin.txtLoginName.focus();		
			document.frmLogin.txtPassword.onkeypress = TrapEnter(ValidateLogin);
			document.frmLogin.txtLoginName.onkeypress = TrapEnter(ValidateLogin);
	
			// Example:

			var b = new BrowserInfo();
			if(b.name != 'Microsoft Internet Explorer') location = 'HQMS_nonIE.htm';
	}


	function BrowserInfo()
	{
	  this.name = navigator.appName;
	  this.codename = navigator.appCodeName;
	  this.version = navigator.appVersion.substring(0,4);
	  this.platform = navigator.platform;
	  this.javaEnabled = navigator.javaEnabled();
	  this.screenWidth = screen.width;
	  this.screenHeight = screen.height;
	}
	
	function ValidateLogin() {
		document.frmLogin.txtLoginName.value = Trim(document.frmLogin.txtLoginName.value);
		document.frmLogin.txtPassword.value = Trim(document.frmLogin.txtPassword.value);

		if (document.frmLogin.txtLoginName.value == "") {
			alert("You must enter a USERNAME");
		}
		else {
			SetValue("LoginName", document.frmLogin.txtLoginName.value, false);
			SetValue("Password", document.frmLogin.txtPassword.value, false);			
			
			document.frm.submit();
		}
	}

