function sf(){		
				if ((document.UserInfo.LoginID.value=="") && (document.UserInfo.UserCode.value==""))
					document.UserInfo.LoginID.focus();
				else
					document.UserInfo.password.focus();
}

function CheckFormData(){
		
		s =new String(document.UserInfo.LoginID.value)
		if (BadDataExists(s)){
		alert('Incorrect characters found, please enter alphanumeric values 0-9, A-Z only.')
		document.UserInfo.LoginID.value='';
		document.UserInfo.LoginID.focus();
		return false;
	}
	s =new String(document.UserInfo.UserCode.value)
	if (BadDataExists(s)){
		alert('Incorrect characters found, please enter alphanumeric values 0-9, A-Z only.')
		document.UserInfo.UserCode.value='';
		document.UserInfo.UserCode.focus();
		return false;
	}
	s = new String(document.UserInfo.password.value);
	if (BadDataExists(s)){
		alert('Incorrect characters found, please enter alphanumeric values 0-9, A-Z only.')
		document.UserInfo.password.value='';
		document.UserInfo.password.focus();
		return false;
	}
	return true;
}

function Upper(r)
{
	var IgnoreEvent;
	IgnoreEvent= ThisShouldBeIgnored	();
	if (IgnoreEvent) {
		}
	else
	{
			r.value = r.value.toUpperCase();
	}
	
}

function PreventThis(e){
	if(typeof window.event!="undefined"){ 
		e=window.event;
		} 
	var code;
	if (!e) var e = window.event;
	if (e.keyCode) code = e.keyCode;
	else if (e.which) code = e.which;
	var character = String.fromCharCode(code);	
	if (code==222){
		return true;			
		}
	else{
		return false;
	};
}

function ThisShouldBeIgnored(e)
{
	if(typeof window.event!="undefined"){ 
		e=window.event;
		} 
	var code;
	if (!e) var e = window.event;
	if (e.keyCode) code = e.keyCode;
	else if (e.which) code = e.which;
	var character = String.fromCharCode(code);	
	if ((code==9) || (code==16)){
		return true;			
		}
	else{
		return false;
	};
}

if(document.addEventListener){ 
	document.addEventListener("keydown",keyCapt,false); 
	document.addEventListener("keyup",keyCapt,false); 
	document.addEventListener("keypress",keyCapt,false); 
	}else{ 
	document.attachEvent("onkeydown",keyCapt); 
	document.attachEvent("onkeyup",keyCapt); 
	document.attachEvent("onkeypress",keyCapt); 	
} 

function keyCapt(e){ 
if(typeof window.event!="undefined"){ 
	e=window.event;
	} 

} 