function Checkmail(){
var check = document.getElementsByTagName("input");	
	for(var i=0;i<check.length;i++){
         if(check[i].name == "checkbox[]" && check[i].checked){
           var pass4;
		      pass4=true;
	           }
	             }
	         if(!pass4){alert("需求主題目至少選一各吧!!!");
			 //document.form1.check[i].focus();
			 return false;
			 }
	
	if((document.form1.pin1.value=='') || (document.form1.pin2.value.length=='')){                             
			alert("請輸入坪數 !");                             
	    	document.form1.pin2.focus();                 
	    	return false;             
	}
	
	if((document.form1.name.value=='')){ 
		alert("大名稱沒填！");
		document.form1.name.focus();
		return false;
				}
				
	if(!document.form1.email.value==''){		
		if(document.form1.email.value.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) == -1)
		 {
			alert("填寫的email有誤!!");
			document.form1.email.focus();
			return false;
			}
	}
	
	if((document.form1.phone.value=='') || (document.form1.phone.value.length <7)){ 
		alert("聯絡電話沒填好喔！");
		document.form1.phone.focus();
		return false;
				}
				
	if((document.form1.cell.value=='') || (document.form1.cell.length <10)){ 
		alert("手機沒填好喔！");
		document.form1.cell.focus();
		return false;
				}			
	 
	if(document.form1.need.value==''){
			alert("您的需求!!");
			document.form1.need.focus();
			return false;
			}
	
	if(document.form1.code.value==''){
			alert("密碼要填喔!!");
			document.form1.code.focus();
			return false;
			}
		//document.form1.submit();
}


