function ValidateLogin(){
var tmp, Msge;
tmp=document.loginform.email;
Msge='Please provide your email address';
if(!CheckEmail(tmp, Msge)){return false; }
tmp=document.loginform.userpwd;
Msge='Please provide your password';
if(!CheckField(tmp, Msge)){return false; }

return true;
}

//================================
function ValidateEmail(){
tmp=document.loginform.email;
Msge='Please provide your email address';
if(!CheckEmail(tmp, Msge)){return false; }	
return true;
}

//================================
function RecoverLogin(){
var Str='<form action="" method="post" name="loginform" id="loginform" onsubmit="return ValidateEmail()"><input name="todo" type="hidden" value="recoverlogin"><div class="row"><label>Email Address:</label><input name="email" type="text" id="email" size="40" maxlength="250"></div><div class="row"><label>&nbsp;</label><input type="submit" name="submit" value="Login" id="submit"></div><div class="row"><a href="#"class="blue" onclick="ShowFormLogin()"><strong>Login</strong></a></div></form>';

document.getElementById('loginbox').innerHTML=Str;
return true;
}

//================================
function ShowFormLogin(){
var Str='<form action="" method="post" name="loginform" id="loginform" onsubmit="return ValidateLogin()"><input name="todo" type="hidden" value="login"><div class="row"><label>Email Address:</label><input name="email" type="text" id="email" size="40" maxlength="250"></div><div class="row"><label>Password:</label><input type="password" name="userpwd" id="userpwd" size="15" maxlength="15"></div><div class="row"><label>&nbsp;</label><input type="submit" name="submit" value="Login" id="submit"></div><div class="row"><a href="#"class="blue" onclick="RecoverLogin()"><strong>Forgot Password?</strong></a></div></form>';

document.getElementById('loginbox').innerHTML=Str;
return true;
}

//================================
function ValidateContact(){
var tmp, Msge;

tmp=document.contactform.firstname;
Msge='Please provide your first name';
if(!CheckField(tmp, Msge)){return false; }
tmp=document.contactform.lastname;
Msge='Please provide your last name';
if(!CheckField(tmp, Msge)){return false; }
tmp=document.contactform.email;
Msge='Please provide your email address';
if(!CheckEmail(tmp, Msge)){return false; }
tmp=document.contactform.comments;
Msge='Please type your questions or comments';
if(!CheckField(tmp, Msge)){return false; }

tmp=document.contactform.recaptcha_response_field;
Msge='Please enter the security code';
if(!CheckField(tmp, Msge)){return false; }


return true;
}