﻿function showdh(n){
for(var i=1;i<=7;i++){
eval("dh"+i).className="headNav"+i
eval("menu"+i).style.display="none";
}
eval("dh"+n).className="headNavM"+n
eval("menu"+n).style.display="";
}

var tt='start';
var ii='start';
function turnit(ss,bb) {

  if (ss.style.display=="none") {
    if(tt!='start') tt.style.display="none";
    if(ii!='start') ii.src="dian.gif";
    ss.style.display="";
    tt=ss;
    ii=bb;
  }
  else {
    ss.style.display="none"; 
  }
}

function delets(obj)
{
obj.action = "buy.asp"; 
obj.target="upload"  
obj.submit();     //提交表单

}


	function DrawImage(ImgD,intWidth,intHeight){
		var image=new Image();
		image.src=ImgD.src;
		if(image.width>0 && image.height>0){
			flag=true;
			if(image.width/image.height>= intWidth/intHeight){
				if(image.width>intWidth){  
					ImgD.width=intWidth;
					ImgD.height=(image.height*intWidth)/image.width;
				}
				else{
					ImgD.width=image.width;
					ImgD.height=image.height;
				}
				//ImgD.alt=image.width+" x "+image.height;
			}
			else{
				if(image.height>intHeight){  
					ImgD.height=intHeight;
					ImgD.width=(image.width*intHeight)/image.height;     
				}
				else{
					ImgD.width=image.width;  
					ImgD.height=image.height;
				}
				//ImgD.alt=image.width+" x "+image.height;
			}
		}
	}
	
	
	
function popUp(URL) {
props=window.open(URL, 'poppage', 'toolbars=1, scrollbars=0, location=0, statusbars=0, menubars=0, resizable=0, width=800, height=620, left = 200, top = 50,scrollbars=yes');
}