


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";  
 }  
 
 <!--  
var  flag=false;  
function  DrawImage2(ImgD){  
 var  image=new  Image();  
 image.src=ImgD.src;  
 if(image.width>0  &&  image.height>0){  
flag=true;  
if(image.width/image.height>=  108/104){  
 if(image.width>108){  
 ImgD.width=108;  
 ImgD.height=(image.height*108)/image.width;  
 }else{  
 ImgD.width=image.width;  
 ImgD.height=image.height;  
 }  
 ImgD.alt=image.width+"×"+image.height +"px";  
 }  
else{  
 if(image.height>104){  
 ImgD.height=104;  
 ImgD.width=(image.width*104)/image.height; 
 }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){
	      for(var i=1;i<=3;i++){
	  
		 if (i==n){
			
			    getObject('tb'+i).style.display='';
				 if (i==1)
			  { getObject('bg'+i).className='tbbg';}
			   else
			   {getObject('bg'+i).className='tbbg22';}
			   
			   getObject('link'+i).className='lan13';
	         }
			
			else {
			   getObject('tb'+i).style.display='none';
			   getObject('bg'+i).className='tbbg2';
			   getObject('link'+i).className='protitle13';
			}
			}
            }
        
		
		function msgform(theForm)
{
	
	
	
	if (theForm.username.value=="") {
    window.alert("请输入姓名!");
    theForm.username.focus();
    return (false);
  }
  
  // if (theForm.email.value=="") {
//    window.alert("请输入E_mail!");
//    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.tel.value=="") {
    window.alert("请输入电话!");
    theForm.tel.focus();
    return (false);
  }
  
  
 
   if (theForm.validatecode.value=="") {
    window.alert("请填写验证码!");
    theForm.validatecode.focus();
    return (false);
  }	
 
	
}




