document.write("<iframe name='lfrm' width='1' height='1' style='display:none'></iframe>");
function checklength(snum)
{
  if (event.srcElement.tagName=="TEXTAREA")
     {
     sobj=event.srcElement;
     }

  if (sobj.value.length>snum)
     {
      alert("最多只能输入 "+snum+" 字!");
      sobj.value=sobj.value.substring(0,snum);
      //return false;
     }
}

function chksubmit(form)
{
 uname=form.uname.value;
 ucom=form.ucom.value;
 utel=form.utel.value;
 uem=form.uem.value;

 if (uname.length==0)
    {
    	alert("请输入姓名！");
    	form.uname.focus();
    	return false;
    }
    
 if (ucom.length==0)
    {
    	alert("请输入公司名称！");
    	form.ucom.focus();
    	return false;
    }
    
 if (utel.length==0)
    {
    	alert("请输入联系电话！");
    	form.utel.focus();
    	return false;
    }
    
 if (uem.length==0)
    {
    	alert("请输入电子邮件！");
    	form.uem.focus();
    	return false;
    }
    
 else
 	  {
 	  	if (
            uem.charAt(0)=="@" ||
            uem.charAt(0)=="." ||
            uem.indexOf("@")==-1 || 
            uem.indexOf(".")==-1 ||
            uem.lastIndexOf("@")==uem.length-1 ||
            uem.lastIndexOf(".")==uem.length-1)
          {
           alert("E-Mail格式不正确！");
           form.uem.focus();
           return false;
          }
 	  }
}

function zoomfont(fobjid,fsize)
{
 fobj=document.getElementById(fobjid);
 fobj.style.fontSize=fsize+"px";
}

function copyurl()
{
 var clipBoardContent="";
 clipBoardContent+="欢迎来易聘网找工作！\n";
 clipBoardContent+="网址：http://" + location.hostname + "\n";
 clipBoardContent+=document.title;
 clipBoardContent+="\n";
 clipBoardContent+=location.href;
 window.clipboardData.setData("Text",clipBoardContent);
 alert("地址复制成功，请粘贴到你的QQ/MSN上推荐给你的好友");
}