

var all=2;

 function cometo()
{
	
	
	document.getElementById("keywords").focus();

document.getElementById("logo").src= "image/wangye.gif";

	if(document.form1.myid[0].checked == true)
	{
	document.form1.hi.value="百度一下";
	document.getElementById("b1").style.display="inline";
	}
	else
	document.getElementById("b1").style.display="none";
	if(document.form1.myid[1].checked == true)
	{
	document.form1.hi.value="Google";
	document.getElementById("g1").style.display="inline";
	}
	else
	document.getElementById("g1").style.display="none";	
	
	choice(all);
	}
function choice(that)
{

if(that==1)
{
	
	
	document.getElementById("keywords").focus();
	all=1;
	if(document.form1.myid[0].checked == true)
	document.getElementById("logo").src="image/news.gif";
		if(document.form1.myid[1].checked == true)
		document.getElementById("logo").src= "image/gnews.gif";
		
document.getElementById("news").style.backgroundColor="#ffff50";
document.getElementById("news").style.color="#ffffff";
document.getElementById("news").style.fontSize="16px";
document.getElementById("news").style.fontWeight="600";


document.getElementById("wangye").style.backgroundColor="#EEE";
document.getElementById("wangye").style.color="#000000";
document.getElementById("wangye").style.fontSize="14px";
document.getElementById("wangye").style.fontWeight="500";

document.getElementById("tupian").style.backgroundColor="#EEE";
document.getElementById("tupian").style.color="#000000";
document.getElementById("tupian").style.fontSize="14px";
document.getElementById("tupian").style.fontWeight="500";


document.getElementById("shiping").style.backgroundColor="#EEE";
document.getElementById("shiping").style.color="#000000";
document.getElementById("shiping").style.fontSize="14px";
document.getElementById("shiping").style.fontWeight="500";

document.getElementById("ditu").style.backgroundColor="#EEE";
document.getElementById("ditu").style.color="#000000";
document.getElementById("ditu").style.fontSize="14px";
document.getElementById("ditu").style.fontWeight="500";


document.getElementById("mp3").style.backgroundColor="#EEE";
document.getElementById("mp3").style.color="#000000";
document.getElementById("mp3").style.fontSize="14px";
document.getElementById("mp3").style.fontWeight="500";

document.getElementById("zhidao").style.backgroundColor="#EEE";
document.getElementById("zhidao").style.color="#000000";
document.getElementById("zhidao").style.fontSize="14px";
document.getElementById("zhidao").style.fontWeight="500";

}
if(that==2)
{
	
	document.getElementById("keywords").focus();
	all=2;
	if(document.form1.myid[0].checked == true)
	document.getElementById("logo").src= "image/wangye.gif";
	if(document.form1.myid[1].checked == true)
document.getElementById("logo").src= "image/google.gif";

document.getElementById("wangye").style.backgroundColor="#ffff50";
document.getElementById("wangye").style.color="#ffffff";
document.getElementById("wangye").style.fontSize="16px";
document.getElementById("wangye").style.fontWeight="600";

document.getElementById("news").style.backgroundColor="#EEE";
document.getElementById("news").style.color="#000000";
document.getElementById("news").style.fontSize="14px";
document.getElementById("news").style.fontWeight="500";

document.getElementById("tupian").style.backgroundColor="#EEE";
document.getElementById("tupian").style.color="#000000";
document.getElementById("tupian").style.fontSize="14px";
document.getElementById("tupian").style.fontWeight="500";


document.getElementById("shiping").style.backgroundColor="#EEE";
document.getElementById("shiping").style.color="#000000";
document.getElementById("shiping").style.fontSize="14px";
document.getElementById("shiping").style.fontWeight="500";

document.getElementById("ditu").style.backgroundColor="#EEE";
document.getElementById("ditu").style.color="#000000";
document.getElementById("ditu").style.fontSize="14px";
document.getElementById("ditu").style.fontWeight="500";


document.getElementById("mp3").style.backgroundColor="#EEE";
document.getElementById("mp3").style.color="#000000";
document.getElementById("mp3").style.fontSize="14px";
document.getElementById("mp3").style.fontWeight="500";

document.getElementById("zhidao").style.backgroundColor="#EEE";
document.getElementById("zhidao").style.color="#000000";
document.getElementById("zhidao").style.fontSize="14px";
document.getElementById("zhidao").style.fontWeight="500";

	
	}

	if(that==3)
	{
		
	document.getElementById("keywords").focus();
		all=3;
		if(document.form1.myid[0].checked == true)
		document.getElementById("logo").src= "image/img.gif";
		if(document.form1.myid[1].checked == true)
		document.getElementById("logo").src= "image/gimg.gif";
document.getElementById("tupian").style.backgroundColor="#ffff50";		
document.getElementById("tupian").style.color="#ffffff";
document.getElementById("tupian").style.fontSize="16px";
document.getElementById("tupian").style.fontWeight="600";

document.getElementById("news").style.backgroundColor="#EEE";
document.getElementById("news").style.color="#000000";
document.getElementById("news").style.fontSize="14px";
document.getElementById("news").style.fontWeight="500";

document.getElementById("wangye").style.backgroundColor="#EEE";
document.getElementById("wangye").style.color="#000000";
document.getElementById("wangye").style.fontSize="14px";
document.getElementById("wangye").style.fontWeight="500";


document.getElementById("shiping").style.backgroundColor="#EEE";
document.getElementById("shiping").style.color="#000000";
document.getElementById("shiping").style.fontSize="14px";
document.getElementById("shiping").style.fontWeight="500";

document.getElementById("ditu").style.backgroundColor="#EEE";
document.getElementById("ditu").style.color="#000000";
document.getElementById("ditu").style.fontSize="14px";
document.getElementById("ditu").style.fontWeight="500";


document.getElementById("mp3").style.backgroundColor="#EEE";
document.getElementById("mp3").style.color="#000000";
document.getElementById("mp3").style.fontSize="14px";
document.getElementById("mp3").style.fontWeight="500";

document.getElementById("zhidao").style.backgroundColor="#EEE";
document.getElementById("zhidao").style.color="#000000";
document.getElementById("zhidao").style.fontSize="14px";
document.getElementById("zhidao").style.fontWeight="500";

		}
		if(that==4)
	{
		
	document.getElementById("keywords").focus();
		all=4;
		if(document.form1.myid[0].checked == true)
		document.getElementById("logo").src= "image/mp3.gif";
		if(document.form1.myid[1].checked == true)
		document.getElementById("logo").src= "image/gmusic.gif";
		
		document.getElementById("mp3").style.backgroundColor="#ffff50";
document.getElementById("mp3").style.color="#ffffff";
document.getElementById("mp3").style.fontSize="16px";
document.getElementById("mp3").style.fontWeight="600";

document.getElementById("news").style.backgroundColor="#EEE";
document.getElementById("news").style.color="#000000";
document.getElementById("news").style.fontSize="14px";
document.getElementById("news").style.fontWeight="500";

document.getElementById("wangye").style.backgroundColor="#EEE";
document.getElementById("wangye").style.color="#000000";
document.getElementById("wangye").style.fontSize="14px";
document.getElementById("wangye").style.fontWeight="500";


document.getElementById("shiping").style.backgroundColor="#EEE";
document.getElementById("shiping").style.color="#000000";
document.getElementById("shiping").style.fontSize="14px";
document.getElementById("shiping").style.fontWeight="500";

document.getElementById("ditu").style.backgroundColor="#EEE";
document.getElementById("ditu").style.color="#000000";
document.getElementById("ditu").style.fontSize="14px";
document.getElementById("ditu").style.fontWeight="500";


document.getElementById("tupian").style.backgroundColor="#EEE";
document.getElementById("tupian").style.color="#000000";
document.getElementById("tupian").style.fontSize="14px";
document.getElementById("tupian").style.fontWeight="500";

document.getElementById("zhidao").style.backgroundColor="#EEE";
document.getElementById("zhidao").style.color="#000000";
document.getElementById("zhidao").style.fontSize="14px";
document.getElementById("zhidao").style.fontWeight="500";

	}
	if(that==5)
	{
		
	document.getElementById("keywords").focus();
		all=5;
		if(document.form1.myid[0].checked == true)
		document.getElementById("logo").src= "image/shiping.gif";
		if(document.form1.myid[1].checked == true)
document.getElementById("logo").src= "image/gshi.gif";
			
document.getElementById("shiping").style.backgroundColor="#ffff50";
document.getElementById("shiping").style.color="#ffffff";
document.getElementById("shiping").style.fontSize="16px";
document.getElementById("shiping").style.fontWeight="600";

document.getElementById("news").style.backgroundColor="#EEE";
document.getElementById("news").style.color="#000000";
document.getElementById("news").style.fontSize="14px";
document.getElementById("news").style.fontWeight="500";

document.getElementById("wangye").style.backgroundColor="#EEE";
document.getElementById("wangye").style.color="#000000";
document.getElementById("wangye").style.fontSize="14px";
document.getElementById("wangye").style.fontWeight="500";


document.getElementById("mp3").style.backgroundColor="#EEE";
document.getElementById("mp3").style.color="#000000";
document.getElementById("mp3").style.fontSize="14px";
document.getElementById("mp3").style.fontWeight="500";

document.getElementById("ditu").style.backgroundColor="#EEE";
document.getElementById("ditu").style.color="#000000";
document.getElementById("ditu").style.fontSize="14px";
document.getElementById("ditu").style.fontWeight="500";


document.getElementById("tupian").style.backgroundColor="#EEE";
document.getElementById("tupian").style.color="#000000";
document.getElementById("tupian").style.fontSize="14px";
document.getElementById("tupian").style.fontWeight="500";

document.getElementById("zhidao").style.backgroundColor="#EEE";
document.getElementById("zhidao").style.color="#000000";
document.getElementById("zhidao").style.fontSize="14px";
document.getElementById("zhidao").style.fontWeight="500";

	}
		if(that==6)
	{
		
	document.getElementById("keywords").focus();
		all=6;
		if(document.form1.myid[0].checked == true)
		document.getElementById("logo").src= "image/zhidao.gif";
		if(document.form1.myid[1].checked == true)
		document.getElementById("logo").src= "image/gwen.gif";
		
		document.getElementById("zhidao").style.backgroundColor="#ffff50";
document.getElementById("zhidao").style.color="#ffffff";
document.getElementById("zhidao").style.fontSize="16px";
document.getElementById("zhidao").style.fontWeight="600";

document.getElementById("news").style.backgroundColor="#EEE";
document.getElementById("news").style.color="#000000";
document.getElementById("news").style.fontSize="14px";
document.getElementById("news").style.fontWeight="500";

document.getElementById("wangye").style.backgroundColor="#EEE";
document.getElementById("wangye").style.color="#000000";
document.getElementById("wangye").style.fontSize="14px";
document.getElementById("wangye").style.fontWeight="500";


document.getElementById("mp3").style.backgroundColor="#EEE";
document.getElementById("mp3").style.color="#000000";
document.getElementById("mp3").style.fontSize="14px";
document.getElementById("mp3").style.fontWeight="500";

document.getElementById("ditu").style.backgroundColor="#EEE";
document.getElementById("ditu").style.color="#000000";
document.getElementById("ditu").style.fontSize="14px";
document.getElementById("ditu").style.fontWeight="500";


document.getElementById("tupian").style.backgroundColor="#EEE";
document.getElementById("tupian").style.color="#000000";
document.getElementById("tupian").style.fontSize="14px";
document.getElementById("tupian").style.fontWeight="500";

document.getElementById("shiping").style.backgroundColor="#EEE";
document.getElementById("shiping").style.color="#000000";
document.getElementById("shiping").style.fontSize="14px";
document.getElementById("shiping").style.fontWeight="500";

	}
	if(that==7)
	{
		
		
	document.getElementById("keywords").focus();
		
		all=7;
		if(document.form1.myid[0].checked == true)
		document.getElementById("logo").src= "image/ditu.gif";
		if(document.form1.myid[1].checked == true)
		document.getElementById("logo").src= "image/gditu.gif";
		
		document.getElementById("ditu").style.backgroundColor="#ffff50";
document.getElementById("ditu").style.color="#ffffff";
document.getElementById("ditu").style.fontSize="16px";
document.getElementById("ditu").style.fontWeight="600";

document.getElementById("news").style.backgroundColor="#EEE";
document.getElementById("news").style.color="#000000";
document.getElementById("news").style.fontSize="14px";
document.getElementById("news").style.fontWeight="500";

document.getElementById("wangye").style.backgroundColor="#EEE";
document.getElementById("wangye").style.color="#000000";
document.getElementById("wangye").style.fontSize="14px";
document.getElementById("wangye").style.fontWeight="500";


document.getElementById("mp3").style.backgroundColor="#EEE";
document.getElementById("mp3").style.color="#000000";
document.getElementById("mp3").style.fontSize="14px";
document.getElementById("mp3").style.fontWeight="500";

document.getElementById("zhidao").style.backgroundColor="#EEE";
document.getElementById("zhidao").style.color="#000000";
document.getElementById("zhidao").style.fontSize="14px";
document.getElementById("zhidao").style.fontWeight="500";


document.getElementById("tupian").style.backgroundColor="#EEE";
document.getElementById("tupian").style.color="#000000";
document.getElementById("tupian").style.fontSize="14px";
document.getElementById("tupian").style.fontWeight="500";

document.getElementById("shiping").style.backgroundColor="#EEE";
document.getElementById("shiping").style.color="#000000";
document.getElementById("shiping").style.fontSize="14px";
document.getElementById("shiping").style.fontWeight="500";

	}

}
function searchit()
{
	
 var url;
 
var searchwords=document.getElementById("keywords").value;

if(all==1)
{
if(document.form1.myid[0].checked == true)
url="http://news.baidu.com/ns?ie=utf-8&word="+encodeURI(searchwords);

if(document.form1.myid[1].checked == true)
url="http://news.google.com/news?hl=zh-cn&ie=UTF-8&q="+encodeURI(searchwords);


}
if(all==2)
{
	if(document.form1.myid[0].checked == true)
   url="http://www.baidu.com/s?wd="+encodeURI(searchwords);
   if(document.form1.myid[1].checked == true)
   url="http://www.google.com.hk/search?hl=zh-CN&q="+searchwords;
   
}
if(all==3)
{
	if(document.form1.myid[0].checked == true)
   url="http://image.baidu.com/i?ie=utf-8&tn=imageimage&ct=201326592&cl=2&lm=-1&word="+searchwords;
   if(document.form1.myid[1].checked == true)
  url="http://www.google.com.hk/images?hl=zh-CN&q="+searchwords+"&biw=1440&bih=809";

   
}
if(all==4)
{
	if(document.form1.myid[0].checked == true)
   url="http://mp3.baidu.com/m?ie=utf-8&word="+searchwords;
   if(document.form1.myid[1].checked == true)
  url="http://www.google.cn/music/search?q="+encodeURI(searchwords);
  
   
}

if(all==5)
{
	if(document.form1.myid[0].checked == true)
   url="http://video.baidu.com/v?ie=utf-8&word="+searchwords;
   if(document.form1.myid[1].checked == true)
url="http://www.google.com.hk/search?tbm=vid&hl=zh-CN&ie=UTF-8&q="+encodeURI(searchwords);

 
}
if(all==6)
{
	if(document.form1.myid[0].checked == true)
   url="http://zhidao.baidu.com/q?ie=utf-8&tn=ikaslist&ct=17&fr=search&lm=0&word="+searchwords;
   if(document.form1.myid[1].checked == true)
   url="http://www.google.com/products?hl=zh-cn&ie=UTF-8&q="+encodeURI(searchwords);
  
  
}
if(all==7)
{
	
	if(document.form1.myid[0].checked == true)
url="http://map.baidu.com/?newmap=1&ie=utf-8&s=s%26wd%3D"+searchwords;
if(document.form1.myid[1].checked == true)
   url="http://ditu.google.cn/maps?hl=zh-CN&ie=UTF-8&q="+encodeURI(searchwords);
   
}


window.open(url);
return false;
}

function goit()
{
if(document.form1.myid[0].checked == true)

window.open("http://www.baidu.com/");
if(document.form1.myid[1].checked == true)
window.open("http://www.google.com.hk");


}
