// Search.js搜索脚本
//新闻
function searchnews(KeyControl)
{
	var KeyWord=escape(KeyControl.value);
	//var KeyWord=KeyControl.value;
	if(KeyWord.length<1 || KeyWord=="")
	{
		alert("请输入搜索关健字");
		return false;
	}
	else
	{
		document.location.href="http://news.sinowool.com/NewsList.aspx?KeyWord="+KeyWord
	}
}


//商机
function searchbuy(ClassType,KeyControl)
{
	var ClassCode=ClassType.value
	var KeyWord=escape(KeyControl.value);
	if(KeyWord.length<1 || KeyWord=="")
	{
		alert("请输入搜索关健字");
		return false;
	}
	else
	{
		document.location.href="/buy/List.aspx?ClassCode="+ClassCode+"&KeyWord="+KeyWord;
	}
}

//产品搜索
function scproduct(KeyControl)
{
	var KeyWord=KeyControl.value;
	if(KeyWord.length<1 || KeyWord=="")
	{
		alert("请输入搜索关健字");
		return false;
	}
	else
	{
		document.location.href="List.aspx?KeyWord="+KeyWord
		return true;
	}
}


//品牌
function scbrand(KeyControl)
{
	var KeyWord=escape(KeyControl.value);
	if(KeyWord=="" || KeyWord.length<1)
	{
		alert("请输入搜索关健字");
		return false;
	}
	else
	{
		document.location.href="List.aspx?KeyWord="+KeyWord
		return true;
	}
}

//产品

function scproduct(KeyControl)
{
	var KeyWord=escape(KeyControl.value);
	if(KeyWord=="" || KeyWord.length<1)
	{
		alert("请输入搜索关健字");
		return false;
	}
	else
	{
		document.location.href="List.aspx?KeyWord="+KeyWord
		return true;
	}

}


//企业
function sccompany(KeyControl)
{
	var KeyWord=escape(KeyControl.value);
	if(KeyWord=="" || KeyWord.length<1)
	{
		alert("请输入搜索关健字");
		return false;
	}
	else
	{
		document.location.href="List.aspx?KeyWord="+KeyWord
		return true;
	}
}

//网店

function scshop(Type,KeyControl)
{
	var t=Type.value;
	var KeyWord=KeyControl.value;
	
	if(KeyWord.length<1 || KeyWord=="")
	{
		alert("请输入搜索关健字");
		return false;
	}
	if(t=="shop")
	{
		window.location.href="ShopList.aspx?KeyWord="+KeyWord;
	}
	else
	{
		window.location.href="ShopProductList.aspx?KeyWord="+KeyWord;
	}
}

//职位
function scjob(KeyControl)
{
	var KeyWord=escape(KeyControl.value);
	//var KeyWord=KeyControl.value;
	if(KeyWord.length<1 || KeyWord=="")
	{
		alert("请输入搜索关健字");
		return false;
	}
	else
	{
		document.location.href="WorkList.aspx?KeyWord="+KeyWord
	}
}

//展会
function scfair(KeyControl)
{
	var KeyWord=escape(KeyControl.value);
	//var KeyWord=KeyControl.value;
	if(KeyWord.length<1 || KeyWord=="")
	{
		alert("请输入搜索关健字");
		return false;
	}
	else
	{
		document.location.href="List.aspx?KeyWord="+KeyWord
	}
}

//商圈
function scbbs(Type,KeyControl)
{
	var t=Type.value;
	var KeyWord=KeyControl.value;
	
	if(KeyWord.length<1 || KeyWord=="")
	{
		alert("请输入搜索关健字");
		return false;
	}
	if(t=="gobbs")
	{
		window.location.href="ad.aspx?Type=gobbs&KeyWord="+KeyWord;
	}
	else
	{
		window.location.href="ad.aspx?Type="+t+"&KeyWord="+KeyWord;
	}
}
