function Login()
{if(!loginValidate())
{return false;}
else
{document.getElementById("modeLogin").value="L";document.getElementById("login").action='index.php?target=Login';document.getElementById("login").submit();}}
function loginValidate()
{message=isBlank("userName","Please Enter User Name.");if(message!="")
{document.getElementById('errorDiv').innerHTML=message;return false;}
message=isBlank("password","Please Enter Password.");if(message!="")
{document.getElementById('errorDiv').innerHTML=message;return false;}
return true;}
function validate_forgetpassword()
{msg=blank("login",document.getElementById("sendPassword").value,ErrorMessageUserNameEmail);if(msg=="")
{msg=first_char("login",document.getElementById("sendPassword").value,ErrorMessageFirstCharUserNameEmail);if(msg=="")
{msg=IsEmail("login",document.getElementById("sendPassword").value,ErrorMessageIsUserNameEmail);}}
if(msg!='')
{alert(msg);return false;}
else
{document.getElementById("modeLogin").value="FP";document.getElementById("login").action='index.php?target=Login';document.getElementById("login").submit();}}
