<!--

function validate() {
if (document.Member.FirstName.value.length < 1) {
alert("Please enter a First Name.");
document.Member.FirstName.focus()
return false;
}
if (document.Member.LastName.value.length < 1) {
alert("Please enter a Last Name.");
document.Member.LastName.focus()
return false;
}
	var emailID=document.Member.email
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Please Enter your Email Address")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}

  var frm = document.Member;
  if(frm.email.value != frm.email2.value)
  {
    alert('The Email and verified email address do not match!');
	document.Member.email2.focus()
    return false;
  }
  
if (document.Member.Age.options[0].selected == true)
{
alert("Please select an Age Range.");
document.Member.Age.focus()
return false;
}
 if (document.Member.Country.options[0].selected == true)
{
alert("Please select a Country.");
document.Member.Country.focus()
return false;
}
  
  
  
if (document.Member.UserName.value.length < 1) {
alert("Please enter a UserName.");
document.Member.UserName.focus()
return false;
}
if (document.Member.Password.value.length < 1) {
alert("Please enter a Password.");
document.Member.Password.focus()
return false;
}
  var frm = document.Member;
  if(frm.Password.value != frm.Password2.value)
  {
    alert('The Password and verified Password do not match!');
	document.Member.Password2.focus()
    return false;
  }
  
  if (!document.Member.Agree.checked) {
	alert("You must read the Terms and Conditions and Check the 'I Agree' Check Box")
		    return false
}
	
return true;
}

function PrintValidate() {
if (document.BuyPrint.first_name.value.length < 1) {
alert("Please enter a First Name.");
document.BuyPrint.first_name.focus()
return false;
}
if (document.BuyPrint.last_name.value.length < 1) {
alert("Please enter a Last Name.");
document.BuyPrint.last_name.focus()
return false;
}
if (document.BuyPrint.address1.value.length < 1) {
alert("Please enter your address.");
document.BuyPrint.address1.focus()
return false;
}
if (document.BuyPrint.city.value.length < 1) {
alert("Please enter your city.");
document.BuyPrint.city.focus()
return false;
}
if (document.BuyPrint.state.value.length < 1) {
alert("Please enter your state.");
document.BuyPrint.state.focus()
return false;
}
if (document.BuyPrint.zip.value.length < 1) {
alert("Please enter your zip code.");
document.BuyPrint.zip.focus()
return false;
}
return true;
}


function vaildatecontact() {
if (document.frmContact.Name.value.length < 1) {
alert("Please enter a Name.");
document.frmContact.Name.focus()
return false;
}
	var emailID=document.frmContact.EmailAddress
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Please Enter your Email Address")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}
return true;
}


function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Invalid E-mail ID")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Invalid E-mail ID")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

 		 return true					
	}

function ValidateForm(){
	var emailID=document.frmSample.txtEmail
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Please Enter your Email ID")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}
	return true
 }
 

//-->

