﻿function GoSearch()
{
	if(document.getElementById("SearchKey").value=="")
	{
		alert("请输入查询关键字！");
		document.getElementById("SearchKey").focus();
		return false;
	}
	else
	{
		var thisSelect;
		var SelectValue;
		var SearchKey;
		
		SearchKey = document.getElementById("SearchKey").value;
		//selectValue = "http://search.china.ecsino.com/SearchProduct.aspx";
		selectValue = "http://so.ecsino.com/products.aspx";
		window.open(selectValue + "?q=" + encodeURI(SearchKey));
	}
}

function switcher(E1,E2,E3,E4){
	var showElement=document.getElementById(E1);
	var hiddenElement=document.getElementById(E2);
	var actBg=document.getElementById(E3);
	var Bg=document.getElementById(E4);
	showElement.style.display="block";
	hiddenElement.style.display="none";
	actBg.className="act_right";
	Bg.className=" ";
}


// 说明：用 JavaScript 实现网页图片等比例缩放 
// 整理：http://www.CodeBit.cn 
 
function DrawImage(ImgD,FitWidth,FitHeight)
{ 
    var image=new Image(); 
    image.src=ImgD.src; 
    if(image.width>0 && image.height>0){ 
        if(image.width/image.height>= FitWidth/FitHeight){ 
            if(image.width>FitWidth){ 
                ImgD.width=FitWidth; 
                ImgD.height=(image.height*FitWidth)/image.width; 
            }else{ 
                ImgD.width=image.width; 
                ImgD.height=image.height; 
            } 
        } else{ 
            if(image.height>FitHeight){ 
                ImgD.height=FitHeight; 
                ImgD.width=(image.width*FitHeight)/image.height; 
            }else{ 
                ImgD.width=image.width; 
                ImgD.height=image.height; 
            } 
        } 
    } 
} 


// 针对用户要求从首页转到供应页面
try
{
	var addressUrl = location.href;
	if(addressUrl=="http://heyongxin.ecsino.com/" || addressUrl=="http://heyongxin.ecsino.com" || addressUrl=="http://heyongxin.ecsino.com/index.aspx")
	{
		location.href = "BizList.aspx";
	}
}
catch(e){}
