function isEmpty( str)
{
    strRE = new RegExp( );
    strRE.compile( '^[\s ]*$', 'gi' );
    return strRE.test( str.value );
}

function LinkOnClick(_page)
{
	document.getElementById(_page).style.background='#CC6633';	
}

function checkvalidation()
{
	
		frm=document.login;
		
	if(frm.uname.value == "")
	{
		alert("User name should not be Empty");
		frm.uname.focus();
		return false;
	}	
	if(frm.password.value == "")
	{
			alert("Password should not be Empty");
			frm.password.focus();
			return false;
	}			
}

function checkvalidationP()
{
	
	frm=document.login;
	if(ValidateEmail(frm.email_address)==false)
	{
			return false;
	}	
	if(frm.fname.value == "")
	{
			alert("First Name should not be Empty");
			return false;
	}			
}
function checkpassvalidation(frm)
{
	if(frm=="")
	frm = document.FrmChangeAdmin;
	
	if(ValidateEmail(frm.email_address)==false)
		{
			return false;
		}
	
	if(isEmpty(frm.old_password))
		{
				alert("Old Password should't be blank")
				return false;
		}		

	if(isEmpty(frm.new_password))
		{
				alert("New Password should't be blank")
				return false;
		}		
}

function CheckEmailValidation(frm)
{
	if(frm == "")
	frm=document.login;

	if(ValidateEmail(frm.o_email_id)==false)
	{
			return false;
	}
	if(ValidateEmail(frm.n_email_id)==false)
	{
			return false;
	}	
}
function PopupEmailFrm()
{	
	URL = "Email_change.php";	
	window.open(URL,'','status=no,toolbar=no,Resizable=&quot;no&quot;,scrollbars=no,top=0,left=0,width=370,height=260');void('');
}


