// ActionScript Communications Document
//弹出窗口
function Win(file,w,h,r,s){
    window.open(file,'','resizable='+r+',width='+w+",height="+h+',scrollbars='+s+',left='+(screen.availWidth-w)/2+',top='+(screen.availHeight-h)/2);
}

//PDF资料判断
function MM_popupMsg(msg) 
{ //v1.0
  alert(msg);
}

//产品标签
var prev;
function showCon(obj){
	//隐藏前一个
	if(prev!=null){
		document.getElementById("con"+prev).style.display="none";
		document.getElementById("m"+prev).className="pa";
	}
	
	//显示这一个
	document.getElementById("con"+obj).style.display="block";
	document.getElementById("m"+obj).className="paA";
	
	prev=obj;
}

//营销网络搜索
function citycheck(){
	if(document.formcity.province.value==""){
		alert("请选择省份！");
		document.formcity.province.focus();
		return false
	}
	if(document.formcity.city.value==""){
		alert("选择相应城市！");
		document.formcity.city.focus();
		return false
	}
}

//搜索
function check(){
	if(document.siteSear.bid.value==""){
		alert("请选择类别！");
		document.siteSear.bid.focus();
		return false
	}
	if(document.siteSear.keys.value==""){
		alert("输入产品关键词！");
		document.siteSear.keys.focus();
		return false
	}
}

//技术服务
function techShow(object,navTech){
   if(document.getElementById(object).style.display=="block")
   {
	  navTech.className="tech";
      document.getElementById(object).style.display="none";
   }else{
	  navTech.className="techA";
      document.getElementById(object).style.display="block";
  }
}

//留言F
 function Fcheck(){
	if(document.formF.types.value==""){
      alert("选择类型进行留言！");
	  document.formF.types.focus();
	  return false;
	  }
	if(document.formF.title.value==""){
      alert("主题不能为空！");
	  document.formF.title.focus();
	  return false;
	  }
   if(document.formF.man.value==""){
      alert("请正确填写您的姓名！");
	  document.formF.man.focus();
	  return false;
	  }
	if(document.formF.tel.value==""){
      alert("请填写您的联系电话！");
	  document.formF.tel.focus();
	  return false;
	  }
    if(document.formF.email.value==""){
      alert("请填写您的E-mail！");
	  document.formF.email.focus();
	  return false;
	  }
    if(emailcheck(document.formF.email.value)){
		alert("请输入正确的E-mail！");
		document.formF.email.focus();
		return false;
   }
	if(document.formF.content.value==""){
      alert("您的留言内容不能为容！");
	  document.formF.content.focus();
	  return false;
	  }
	if(document.formF.validatecode.value==""){
      alert("验证码不能为空！");
	  document.formF.validatecode.focus();
	  return false;
	  }
}

//自荐S
 function Scheck(){
	if(document.formSelf.E_1.value==""){
      alert("请输入您的姓名！");
	  document.formSelf.E_1.focus();
	  return false;
	  }
	if(document.formSelf.E_3.value==""){
      alert("年龄不能为空！");
	  document.formSelf.E_3.focus();
	  return false;
	  }
   if(document.formSelf.E_4.value==""){
      alert("请输入您的出生年月！");
	  document.formSelf.E_4.focus();
	  return false;
	  }
	if(document.formSelf.E_7.value==""){
      alert("请填写您的身份证号！");
	  document.formSelf.E_7.focus();
	  return false;
	  }
	if(document.formSelf.E_8.value==""){
      alert("您的籍贯所在地！");
	  document.formSelf.E_8.focus();
	  return false;
	  }
	if(document.formSelf.E_9.value==""){
      alert("输入您的学历！");
	  document.formSelf.E_9.focus();
	  return false;
	  }
	if(document.formSelf.E_11.value==""){
      alert("您所学的专业！");
	  document.formSelf.E_11.focus();
	  return false;
	  }
	if(document.formSelf.E_12.value==""){
      alert("你的毕业时间！");
	  document.formSelf.E_12.focus();
	  return false;
	  }
	 if(document.formSelf.E_18.value==""){
      alert("您的工龄有多久！");
	  document.formSelf.E_18.focus();
	  return false;
	  } 
	 if(document.formSelf.E_19.value==""){
      alert("您现在要应聘岗位是什么！");
	  document.formSelf.E_19.focus();
	  return false;
	  } 
	if(document.formSelf.E_21.value==""){
      alert("请留下您的联系电话！");
	  document.formSelf.E_21.focus();
	  return false;
	  } 
    if(document.formSelf.E_23.value==""){
      alert("请填写您的E-mail！");
	  document.formSelf.E_23.focus();
	  return false;
	  }
    if(emailcheck(document.formSelf.E_23.value)){
		alert("请输入正确的E-mail！");
		document.formSelf.E_23.focus();
		return false;
   }
	if(document.formSelf.validatecode.value==""){
      alert("验证码不能为空！");
	  document.formSelf.validatecode.focus();
	  return false;
	  }
}

//判断Email的正确性
function   emailcheck(string){     
  var   str_len   =   string.length;   
  if   (str_len<=5){   
        return   true   
          }       
  for(i=0;i<str_len;i++){   
          if   (string.charCodeAt(i)>127){   
  return   true     
  }   
  }   
  if   (string.indexOf("@")<2){   
          return   true   
          }       
    if   (string.indexOf(".")==1){   
          return   true   
          }       
  if   (string.indexOf(":")!=-1){   
          return   true   
  }   
 }
