﻿function checkInfo(){
   var alertStr="";    
   if (document.productActivity.userName.value==""){
   																						    alertStr+="\u2027\u59d3\u540d\u4e0d\u80fd\u7a7a\u767d\n";
   																						    document.productActivity.userName.style.background="#00FFFF";
   }else{
   																						    document.productActivity.userName.style.background="#FFFFFF"; 
   } 
  
   if (document.productActivity.email.value==""){
																							alertStr+="\u2027E-Mail\u4e0d\u80fd\u7a7a\u767d\n";
																						    document.productActivity.email.style.background="#00FFFF"; 
   }else{
   
   																						    document.productActivity.email.style.background="#FFFFFF"; 
   
   if (document.productActivity.email.value.indexOf("@")=="-1" || document.productActivity.email.value.indexOf(".")=="-1"){
																						    alertStr+="\u2027E-Mail\u683c\u5f0f\u4e0d\u5c0d\n";
																						    document.productActivity.email.style.background="#00FFFF";
   }else{
																						    document.productActivity.email.style.background="#FFFFFF";
		}

	var emailValue=document.productActivity.email.value.split("@");
	if (emailValue[1].split(".").length==2 && document.productActivity.email.value.length<11 
	|| emailValue[1].split(".").length==3 && document.productActivity.email.value.length<14){         
																						    alertStr+="\u2027E-Mail\u683c\u5f0f\u4e0d\u5c0d\n";
																						    document.productActivity.email.style.background="#00FFFF";
	}else{
																						    document.productActivity.email.style.background="#FFFFFF";
	}  
   }
   
   if (document.productActivity.tel.value==""){                       
                                                                                            alertStr+="\u2027\u806f\u7d61\u96fb\u8a71\u4e0d\u80fd\u7a7a\u767d\n";
																						    document.productActivity.tel.style.background="#00FFFF";
   }else{
																						    document.productActivity.tel.style.background="#FFFFFF";
		if (document.productActivity.tel.value.split("-").length==2){
			if (document.productActivity.tel.value.length>18 ){
																							alertStr+="\u2027\u96fb\u8a71\u865f\u78bc\u683c\u5f0f\u4e0d\u5c0d\n"
																							document.productActivity.tel.style.background="#00FFFF";
			}		 																				    
		}else{
			if (document.productActivity.tel.value.length<10){
																							alertStr+="\u2027\u96fb\u8a71\u865f\u78bc\u683c\u5f0f\u4e0d\u5c0d\n"
																							document.productActivity.tel.style.background="#00FFFF";
			}																						   
		}
		
		                                                                                    
   }

  
   
   if (document.productActivity.company.value==""){                                                      
																						    alertStr+="\u2027\u516c\u53f8\u540d\u7a31\u4e0d\u80fd\u7a7a\u767d\n";
																						    document.productActivity.company.style.background="#00FFFF";   
   }else if(document.productActivity.company.value.length<4){                                             
																						    alertStr+="\u2027\u516c\u53f8\u540d\u7a31\u5b57\u6578\u4e0d\u5c0d\n";
																						    document.productActivity.company.style.background="#00FFFF";
   }else{
																						    document.productActivity.company.style.background="#FFFFFF";  
   }				 
   if (document.productActivity.compType.value==""){                       
                                                                                            alertStr+="\u2027\u884c\u696d\u5225\u4e0d\u80fd\u7a7a\u767d\n";
																						    document.productActivity.compType.style.background="#00FFFF";
   }else{
																						    document.productActivity.compType.style.background="#FFFFFF";	                                                                                    
   }
   if (document.productActivity.compDept.value==""){                       
                                                                                            alertStr+="\u2027\u90e8\u9580\u002f\u8077\u7a31\u4e0d\u80fd\u7a7a\u767d\n";
																						    document.productActivity.compDept.style.background="#00FFFF";
   }else{
																						    document.productActivity.compDept.style.background="#FFFFFF";	                                                                                    
   }

   var nCheck=0;
   for(var i=0;i<document.productActivity.member.length;i++){
       if (document.productActivity.member[i].checked==false) nCheck+=1;                                  
   }
   if(nCheck==5){
           for(var i=0;i<document.productActivity.member.length;i++){
                document.productActivity.member[i].style.background="#00FFFF"; 
           }
           alertStr+="\u2027\u8acb\u9078\u64c7\u5831\u540d\u8eab\u4efd\n";																					    
   }else{
           for(var i=0;i<document.productActivity.member.length;i++){
                document.productActivity.member[i].style.background=""; 
           }                                                                                                                
   }                                                                                                                       
   
   if(alertStr!=""){
    alert(alertStr);
    return (false);
   }else{   
    return (true);
   }   
}
function doDatePicker(elem){
	try{
		var oResult = DatePicker();	
		elem.value=oResult.datestr;
	}catch(e){
		//trace(e.description);
	}
}