<!--

function form1_onsubmit() {
  
     if(document.form1.company.value.length==0){
          alert('Company name can not be free ! The field marked " * " must be filled.');
          document.form1.company.focus();
          return false;
     }

     if(document.form1.street.value.length==0){
          alert('Street address can not be free ! The field marked  " * " must be filled.');
          document.form1.street.focus();
          return false;
     }

     for( var i=0;i<document.form1.company.value.length;i++ ){

		var ch = document.form1.company.value.charAt(i);
		if(!(ch>='a'&&ch<='z'||ch>='A'&&ch<='Z'||ch>='0'&&ch<='9'||ch=='-'||ch==','||ch=='.'||ch==';'||ch==' '||ch=='&'||ch=='@')){
			alert("Company name included unusable char !");
                        document.form1.company.focus();
			return false;

		}


     if(document.form1.city.value.length==0){
          alert('City can not be free ! The field marked " * " must be filled.');
          document.form1.city.focus();
          return false;
     }
    if(document.form1.country.value.length==0){
          alert('Country can not be free ! The field marked " * " must be filled.');
          document.form1.country.focus();
          return false;
     }
    
     if(document.form1.country.value.length==0&&window.document.form1.country.value.length>50) {
          alert("Country can not be free and less than 50 chars !");
          document.form1.country.focus();
          return false;
     }

          for( var i=0;i<document.form1.country.value.length;i++ ){

		var ch = document.form1.country.value.charAt(i);
		if(!(ch>='a'&&ch<='z'||ch>='A'&&ch<='Z'||ch>='0'&&ch<='9'||ch=='-'||ch==','||ch=='.'||ch==';'||ch=='&'||ch=='@'||ch==' ')){
			alert("Country included unusable char !");
                        document.form1.country.focus();
			return false;

		}

	}
 
     if(document.form1.family.value.length==0){
          alert('Family name can not be free ! The field marked " * " must be filled.');
          document.form1.family.focus();
          return false;
     }
     if(document.form1.first.value.length==0){
          alert('First name can not be free ! The field marked " * " must be filled.');
          document.form1.first.focus();
          return false;
     }

for( var i=0;i<document.form1.family.value.length;i++ ){

		var ch = document.form1.family.value.charAt(i);
		if(!(ch>='a'&&ch<='z'||ch>='A'&&ch<='Z'||ch>='0'&&ch<='9'||ch=='-'||ch==','||ch=='.'||ch==';'||ch=='&'||ch=='@'||ch==' ')){
			alert("Family name included unusable char !");
                        document.form1.family.focus();
			return false;

		}

	}
    
for( var i=0;i<document.form1.first.value.length;i++ ){

		var ch = document.form1.first.value.charAt(i);
		if(!(ch>='a'&&ch<='z'||ch>='A'&&ch<='Z'||ch>='0'&&ch<='9'||ch=='-'||ch==','||ch=='.'||ch==';'||ch=='&'||ch=='@'||ch==' ')){
			alert("First name included unusable char !");
                        document.form1.first.focus();
			return false;

		}

	}
          

 for( var i=0;i<document.form1.tel.value.length;i++ ){

		var ch = document.form1.tel.value.charAt(i);
		if(!((ch>='0'&&ch<='9')||ch=='-')){
			alert("Tel number must fill with number among 0 to 9 !");
                        document.form1.tel.focus();
			return false;

		}

	}
	
      if(document.form1.tel.value.length==0){
          alert('Tel number can not be free ! The field marked " * " must be filled.');
          document.form1.tel.focus();
          return false;
     }
          
    
      if(document.form1.fax.value.length==0){
          alert('Fax number can not be free ! The field marked " * " must be filled.');
          document.form1.fax.focus();     
          return false;
     }
     
     for( var i=0;i<document.form1.fax.value.length;i++ ){

		var ch = document.form1.fax.value.charAt(i);
		if(!((ch>='0'&&ch<='9')||ch=='-')){
			alert("Fax number must fill with number among 0 to 9 !");
                        document.form1.fax.focus();
			return false;

		}

	}
     
     for( var i=0;i<document.form1.email.value.length;i++ ){

		var ch = document.form1.email.value.charAt(i);
		if(i==1&&ch=="."||i==document.form1.email.value.length&&ch=="."){
		alert("Email address can not begin or finish with . !");
		document.form1.email.focus();
                return false;		
		}
		if(!(ch>='a'&&ch<='z'||ch>='A'&&ch<='Z'||ch>='0'&&ch<='9'||ch=='-'||ch=='_'||ch=='.'||ch=='&'||ch=='@')){
			alert("Email address included unusable char !");
                        document.form1.fax2.focus();
			return false;

		}

	}
     
     var tmp1=0;
     var tmp2=0;
     var tmp3=0;
     for( var i=1;i<document.form1.email.value.length-1;i++ ){
		var ch = document.form1.email.value.charAt(i);
		if(ch==".")tmp1=tmp1+1;
		if(ch=="@")tmp2=tmp2+1;
		if(ch==" "||ch==";"||ch==",")tmp3=1;
      }
        
     if(tmp2!=1||tmp2<1||tmp3==1){
          alert("Unusable Email !");
          document.form1.email.focus();
          return false;
         }
	}
     }


function form_onsubmit()
{

	if(document.form.email.value.length==0){
		alert('Error:Email address can not be free! The field marked " * " must be filled.');
		document.form.email.focus();
		return false;
	}


	var ch = document.form.email.value.charAt(0);
	if(ch=='@'||ch=='#'||ch=='$'||ch=='%'||ch=='.'||ch==','||ch==';'||ch==' '){
		alert("Error:Email address can started by this symbol!");
		document.form.email.focus();
		return false;
	}

	var ch = document.form.email.value.charAt(document.form.email.value.length-1);
	if(ch=='@'||ch=='#'||ch=='$'||ch=='%'||ch=='.'||ch==','||ch==';'||ch==' '){
		alert("Error:Email address can closed by this symbol!");
		document.form.email.focus();
		return false;
	}

	for(var i=0;i<document.form.email.value.length;i++){
		
		var ch = document.form.email.value.charAt(i);
		if(!(ch>='a'&&ch<='z'||ch>='A'&&ch<='Z'||ch>='0'&&ch<='9'||ch=='-'||ch=='@'||ch=='#'||ch=='$'||ch=='%'||ch=='.'||ch==','||ch==';'||ch==' ')){
			alert("Error:Please fill out the information in English!");
			document.form.email.focus();
			return false;
		}
	}
 
	if(window.document.form.email.value.length<5) {
		alert("Error:Email mistake!");
		document.form.email.focus();
		return false;
	}
     
	var tmp=0;
	for( var i=1;i<document.form.email.value.length-1;i++ ){
		var ch = document.form.email.value.charAt(i);
		if(ch=="."||ch=="@") tmp=tmp+1;
	}  
	
	if(tmp!=2){
		alert("Error:Email mistake!");
		document.form.email.focus();
		return false;
	}
}
// -->