// JavaScript Document
function getfocus(object)
{
object.style.backgroundColor='#222e3d';
object.select();
}
function getblur(object)
{
object.style.backgroundColor='#222e3d';
}
function checklogin()
{
	if(document.login.username.value=="")
	{
		alert('Please enter username');
		document.login.username.focus();
		return false;
	}
	if(document.login.password.value=="")
	{
		alert('Please enter password');
		document.login.password.focus();
		return false;
	}
	return true;
}
function chkfocus_login()
{
	document.login.username.focus();
}
function checkforget()
{
	if(document.frmforget.txtemail.value=="")
	{
		
		alert("<?=forgotnote?>");		
		document.frmforget.txtemail.focus();		
		return false;
	}
	if(!isEmail(document.frmforget.txtemail.value))
	{
		
		alert("<?=forgotnote1?>");		
		document.frmforget.txtemail.focus();		
		return false;
	}
	if(document.frmforget.protectioncode.value=="")
		{
			alert("<?=protectnull?>");
			document.frmforget.protectioncode.focus();
			return false;
		}
		if(document.frmforget.protectioncode.value!="<?=$_SESSION['sprotect']?>")
		{
			alert("<?=protectwrong?>");
			document.frmforget.protectioncode.focus();
			return false;
		}
	
	return true;
}
