

//--------------------------------------------------------------------------------
function checkregfrm1()
{
	
	if (document.aegfrm.UserName.value == ""){
		alert ("Suggest£º\n\nUsers who need to import£¡");
		document.aegfrm.UserName.focus();
		return false;
	}
	
		if (document.aegfrm.UserName.value.length < 4 ){
		alert ("Suggest£º\n\nUsers were not less than four");
		document.aegfrm.UserName.focus();
		return false;
	}
	
	
	bString = "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM0123456789_-";
		for(i = 0; i < document.aegfrm.UserName.value.length; i ++)
		{
			if (bString.indexOf(document.aegfrm.UserName.value.substring(i,i+1))==-1)
			{
				alert('Illegal characters who are your customers£¡');
				document.aegfrm.UserName.focus();
				return false;
			}
		}
	
	
	
	if (document.aegfrm.Password.value == ""){
		alert ("Suggest£º\n\nBe password£¡");
		document.aegfrm.Password.focus();
		return false;
	}
	
	if (document.aegfrm.Password.value.length < 6 ){
		alert ("Suggest£º\n\nNot less than six passwords");
		document.aegfrm.Password.focus();
		return false;
	}
	
	if (document.aegfrm.Password.value != document.aegfrm.PwdConfirm.value){
		alert ("Suggest£º\n\nImportation is not the same password twice, re-fill");
		document.aegfrm.Password.focus();
		return false;
	}
	
	
	if (document.aegfrm.homepage.value == ""){
		alert ("Suggest£º\n\nMust import company name£¡");
		document.aegfrm.homepage.focus();
		return false;
	}
	

//============================================================
if(document.aegfrm.Email.value.length!=0)
  {
    if (document.aegfrm.Email.value.charAt(0)=="." ||        
         document.aegfrm.Email.value.charAt(0)=="@"||       
         document.aegfrm.Email.value.indexOf('@', 0) == -1 || 
         document.aegfrm.Email.value.indexOf('.', 0) == -1 || 
         document.aegfrm.Email.value.lastIndexOf("@")==document.aegfrm.Email.value.length-1 || 
         document.aegfrm.Email.value.lastIndexOf(".")==document.aegfrm.Email.value.length-1)
     {
      alert("Email address is not correct format£¡");
      document.aegfrm.Email.focus();
      return false;
      }
   }
 else
  {
   alert("Email not empty£¡");
   document.aegfrm.Email.focus();
   return false;
   }

	if (document.aegfrm.Tel.value == ""){
		alert ("Suggest£º\n\nTel importation£¡");
		document.aegfrm.Tel.focus();
		return false;
	}
	
		if (document.aegfrm.Fax.value == ""){
		alert ("Suggest£º\n\nImportation fax");
		document.aegfrm.Fax.focus();
		return false;
	}
	
		if (document.LXR.Fax.value == ""){
		alert ("Suggest£º\n\nContact importation");
		document.aegfrm.LXR.focus();
		return false;
	}


//============================================================



		
	if (document.aegfrm.checkbox.checked == false ){
		alert ("Suggest£º\n\nOnly you agree with our terms of service can be registered as a member!");
		document.aegfrm.checkbox.focus();
		return false;
	}
	

		
	
}
