function checksignupform(){
	
	if(document.signupform.loginid.value==''){
		alert('Please Enter Login Id');
		document.signupform.loginid.focus();
		return false;
	}
	if(document.signupform.loginid.value.length<4){
		alert('Login id Must be Minimum 4 Characters Long.');
		document.signupform.loginid.focus();
		return false;
	}
	if(document.signupform.password.value==''){
		alert('Please Enter Password');
		document.signupform.password.focus();
		return false;
	}
	if(document.signupform.password.value.length<6){
		alert('Password Must be Minimum 6 Characters Long.');
		document.signupform.password.focus();
		return false;
	}
	if(document.signupform.password.value!=document.signupform.conpassword.value){
		alert('Please Enter matching Password');
		document.signupform.conpassword.value='';
		document.signupform.conpassword.focus();
		return false;
	}
	if(document.signupform.fname.value==''){
		alert('Please Enter First Name');
		document.signupform.fname.focus();
		return false;
	}
	if(document.signupform.lname.value==''){
		alert('Please Enter Last Name');
		document.signupform.lname.focus();
		return false;
	}
	var chkemail=/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,5})+$/.test(document.signupform.emailid.value);
	if (!chkemail){
		alert("Invalid E-mail Address! Please re-enter.")
		document.signupform.emailid.focus();
		return (false)
	}
	if(document.signupform.country.value==''){
		alert('Please Select Country Name');
		document.signupform.country.focus();
		return false;
	}
	if(document.signupform.state.value==''){
		alert('Please Enter State');
		document.signupform.state.focus();
		return false;
	}
	if(document.signupform.zipcode.value==''){
		alert('Please Enter ZIP Code');
		document.signupform.zipcode.focus();
		return false;
	}
}

function checkupdateform(){
	
	if(document.updateform.fname.value==''){
		alert('Please Enter First Name');
		document.updateform.fname.focus();
		return false;
	}
	if(document.updateform.lname.value==''){
		alert('Please Enter Last Name');
		document.updateform.lname.focus();
		return false;
	}
	var chkemail=/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,5})+$/.test(document.updateform.emailid.value);
	if (!chkemail){
		alert("Invalid E-mail Address! Please re-enter.")
		document.updateform.emailid.focus();
		return (false)
	}
	if(document.updateform.country.value==''){
		alert('Please Select Country Name');
		document.updateform.country.focus();
		return false;
	}
	if(document.updateform.state.value==''){
		alert('Please Enter State');
		document.updateform.state.focus();
		return false;
	}
	if(document.updateform.zipcode.value==''){
		alert('Please Enter ZIP Code');
		document.updateform.zipcode.focus();
		return false;
	}
}

function logincheck(){
	
	if(document.loginform.loginid.value==''){
		alert('Please Enter Login Id');
		document.loginform.loginid.focus();
		return false;
	}
	if(document.loginform.password.value==''){
		alert('Please Enter Password');
		document.loginform.password.focus();
		return false;
	}
}




function checkpasswordform(){
	if(document.changepasswordform.oldpassword.value==''){
		alert('Please Enter Old Password');
		document.changepasswordform.oldpassword.focus();
		return false;
	}
	if(document.changepasswordform.newpassword.value==''){
		alert('Please Enter New Password');
		document.changepasswordform.newpassword.focus();
		return false;
	}
	if(document.changepasswordform.newpassword.value.length<6){
		alert('New Password Must be Minimum 6 Characters Long.');
		document.changepasswordform.newpassword.focus();
		return false;
	}
	if(document.changepasswordform.newpassword.value!=document.changepasswordform.conpassword.value){
		alert('Please Enter matching New Password');
		document.changepasswordform.conpassword.value='';
		document.changepasswordform.conpassword.focus();
		return false;
	}
	
}

function checkfieldvalue(val,divtype){
	if(divtype=='div_password'){
		if (val.length<6){ 
			document.getElementById("div_password").innerHTML="Password Must be Minimum 6 Characters Long.";
		}else{
			var noalpha = /^[a-zA-Z]*$/;
			if (val.length>10 && noalpha.test(val)){ 
				document.getElementById("div_password").innerHTML="<img src='images/good.png' />";
			}else if (val.length>10){ 
				document.getElementById("div_password").innerHTML="<img src='images/strong.png' />";
			}else{
				document.getElementById("div_password").innerHTML="<img src='images/weak.png' />";
			}
		}
	}
	if(divtype=='div_conpassword'){
		if(document.signupform.password.value!=document.signupform.conpassword.value){
			document.getElementById("div_conpassword").innerHTML="<img src='images/error.png' />";
		}else{
			document.getElementById("div_conpassword").innerHTML="<img src='images/valid.png' alt='Valid Password' />";
		}
	}
}

function changepasswordfieldvalue(val,divtype){
	if(divtype=='div_password'){
		if (val.length<6){ 
			document.getElementById("div_password").innerHTML="Password Must be Minimum 6 Characters Long.";
		}else{
			var noalpha = /^[a-zA-Z]*$/;
			if (val.length>10 && noalpha.test(val)){ 
				document.getElementById("div_password").innerHTML="<img src='images/good.png' />";
			}else if (val.length>10){ 
				document.getElementById("div_password").innerHTML="<img src='images/strong.png' />";
			}else{
				document.getElementById("div_password").innerHTML="<img src='images/weak.png' />";
			}
		}
	}
	if(divtype=='div_conpassword'){
		if(document.changepasswordform.newpassword.value!=document.changepasswordform.conpassword.value){
			document.getElementById("div_conpassword").innerHTML="<img src='images/error.png' />";
		}else{
			document.getElementById("div_conpassword").innerHTML="<img src='images/valid.png' alt='Valid Password' />";
		}
	}
}


function forgotpasswordform(){
	if(document.forgotpassword.email_loginid.value==''){
		alert('Please Enter Email ID/Login ID ');
		document.forgotpassword.email_loginid.focus();
		return false;
	}
}



