// JavaScript Document
function loginValidate(){
	var uname=document.getElementById('txtusername');
	var pwd=document.getElementById('txtpassword');
	if(uname.value=="" || pwd.value==""){alert('Username and password are necessary!');return false;}
	else{return true;}
}

function checkit(){	
	var fname=document.getElementById('mfname');
	var lname=document.getElementById('mlname');
	var pwd=document.getElementById('mpwd');
	var cpwd = document.getElementById('mcpwd');
	var email = document.getElementById('memail');
	var email_F=email.value.indexOf("@",0);
	if(pwd.value=="" || cpwd.value=="" || email.value=="" || fname=="" || lname==""){alert('All data with star is necessary!');return false;}
	if(pwd.value != cpwd.value){alert ("You filled two different password! Please check it.");pwd.select();return false;}
	if(email_F < 1){alert ("Please enter a valid email address."); email.select(); return false;}
    return true;
}