


var  flag=false;  
function  DrawImage(ImgD){  
 var  image=new  Image();  
 image.src=ImgD.src;  
flag=true;  
 if(image.width>650){  
 ImgD.width=650;  
 ImgD.height=(image.height*650)/image.width;  
 }else{  
 ImgD.width=image.width;  
 ImgD.height=image.height;  
 }  
 ImgD.alt=image.width+"×"+image.height +"px";  
 }  
 
 

	function getObject(objectId) {
			if(document.getElementById && document.getElementById(objectId)) {
			return document.getElementById(objectId);
			} 
			  else if (document.all && document.all(objectId)) {
			      return document.all(objectId);
			} 
			  else if (document.layers && document.layers[objectId]) {
			return document.layers[objectId];
			} 
			  else {
			return false;
		    }
			
			}
	
		function showmenu(n,num){
	      for(var i=1;i<=num;i++)
		  {
	  
		        if (i==n){
				// getObject('lj'+i).className='redzt';	
			    getObject('LM'+i).style.display='';
	                   }
			
			else {
				//getObject('lj'+i).className='heizt';	
			   getObject('LM'+i).style.display='none';
			
			      }
			}
        }
        
	

function ssform(theForm)
{
	
	
	
	if (theForm.keyword.value=="") {
    window.alert("请输入关键字!");
    theForm.keyword.focus();
    return (false);
  }
  

	
}



function lyform(theForm)
{
	
	if (theForm.username.value=="") {
    window.alert("请输入姓名!");
    theForm.username.focus();
    return (false);
  }
	
	if (theForm.company.value=="") {
    window.alert("请输入公司名称!");
    theForm.company.focus();
    return (false);
  }

   if (theForm.email.value=="") {
    window.alert("请填写邮箱!");
    theForm.email.focus();
    return (false);
  }	
  
  
  
   if(theForm.email.value.length!=0)
  {
    if (theForm.email.value.charAt(0)=="." ||        
         theForm.email.value.charAt(0)=="@"||       
         theForm.email.value.indexOf('@', 0) == -1 || 
         theForm.email.value.indexOf('.', 0) == -1 || 
        theForm.email.value.lastIndexOf("@")==theForm.email.value.length-1 || 
         theForm.email.value.lastIndexOf(".")==theForm.email.value.length-1)
     {
      alert("E_mail格式不正确！");
      theForm.email.focus();
      return false;
      }
   }
   
   
 if (theForm.title.value=="") {
    window.alert("请填写标题!");
    theForm.title.focus();
    return (false);
  }	
 
 if (theForm.content.value=="") {
    window.alert("请填写留言!");
    theForm.content.focus();
    return (false);
  }	
   if (theForm.validatecode.value=="") {
    window.alert("请填写验证码!");
    theForm.validatecode.focus();
    return (false);
  }	

  
	
}



