﻿function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function loaded(myimg,mywidth,myheight){
var tmp_img = new Image();
tmp_img.src=myimg.src;
image_x=tmp_img.width;
image_y=tmp_img.height;
	if(image_x > mywidth){//?í?è′óóúòa?ó
	tmp_img.height=image_y * mywidth / image_x;
	tmp_img.width=mywidth;
		if(tmp_img.height>myheight){
			tmp_img.width=tmp_img.width * myheight / tmp_img.height;
			tmp_img.height=myheight;
			}
	}else if(image_y > myheight)
	{//???è′óóúòa?ó
	tmp_img.width=image_x * myheight / image_y;
	tmp_img.height=myheight;
		if(tmp_img.width>mywidth){
			tmp_img.height=tmp_img.height * mywidth / tmp_img.width;
			tmp_img.width=mywidth;
			}
	}
	myimg.width=tmp_img.width;
	myimg.height=tmp_img.height;

}

function changemenu(menu,s)
{  
   var nav=document.getElementById("n_"+menu); 
   var obj=document.getElementById("m_"+s);   
    if(nav)
   {    
    nav.className="mnow";

   }
   if(obj)
   {    
    obj.className="now"; 

   }
 
  
}
//获取单选选项
function getChecked(selectname)
{
   var obj = eval("document.all." + selectname);
	if(typeof(obj) == "object"){
		for(i = 0 ;i < obj.length;i ++){
			if(obj[i].checked){
				return obj[i].value;
			}
		}
	}
}

function Search()
{
    var url="product.aspx";
    var keywords = document.getElementById("key").value;  
    if(keywords!="") url+='?key=' + escape(keywords);
      
   
    location.href = url;
}

function Search1()
{
    var url="product.aspx";
    var keywords = document.getElementById("key1").value;  
    if(keywords!="") url+='?key=' + escape(keywords);
      
   
    location.href = url;
}







