

<!--  
var  flag=false;  
var  w_num=97,h_num=111;

function  DrawImage(ImgD,ww,hh){  
var  image=new  Image();  
image.src=ImgD.src;  

if(image.width>0  &&  image.height>0)
{ 
  if (image.width>ww && image.height<=hh){
     ImgD.width=ww; 	 	 
    }
  if (image.height>hh && image.width<=ww){
     ImgD.height=hh;
    }
  if (image.height>hh && image.width>ww){
     num=ww/image.width;
	
	 height_num=image.height*num;
	 
	 if (height_num>hh){
	     num=hh/image.height;
		 ImgD.width=image.width*num;
		 ImgD.height=hh;
		 
		 w_num=image.width*num;
		 h_num=hh;
	 }
	 else{
	     ImgD.width=ww;
		 ImgD.height=image.height*num;
		 
		 w_num=ww;
		 h_num=image.height*num;
	 }
	 
    }	
	//ImgD.alt=image.width+"?á"+image.height;
	}
}
//--> 

 

function openwin(id)
    {
     window.open("pic.asp?id="+id,"","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,top=5,left=5,width=500,height=450");
    }
	
function sub1(e){
          
           if (e.s_name.value.length==0){
		            alert("姓名必须填写！");
					e.s_name.focus()
					return false;
		   }
		   
		   
		   if (e.lxdz.value.length==0){
		            alert("联系地址必须填写！");
					e.lxdz.focus()
					return false;
		   }
		   if (e.lxdh.value.length==0){
		            alert("联系电话必须填写！");
					e.lxdh.focus()
					return false;
		   }
	      
		   if (e.dgly.value.length==0){
		            alert("订购留言必须填写！");
					e.dgly.focus()
					return false;
		   }
		   
		
            var n=0;
			var i;
            for (i=0;i<e.dgly.value.length;i++)
            {
              if (e.dgly.value.charCodeAt(i)>255)
			  {
              //s.charCodeAt(i)为非ascii字符
              n=n+2;
              }
			  else{
              //s.charCodeAt(i)为ascii字符
                  n=n+1;
              }
            }
			//alert(n);
           if(n>900){
                       alert("您填写的订购留言的字数太多 请酌情处理 ");
					   e.dgly.focus()
					   return false;
                      }

}	
function reg(e)
 {
   if (e.user_name.value.length==0){
		            alert("用户名必须填写！");
					e.user_name.focus()
					return false;
		   }
		   if (e.user_password.value.length==0){
		            alert("密码必须填写！");
					e.user_password.focus()
					return false;
		   }
 }