﻿function _include(filePath)
{
	document.write("<script type='text/javascript' src='"+filePath+"'></script>");
}
_include('/clientScript/U2GB.js');

var defaulttab_top3="tab_top3_1";
var currtab_top3=defaulttab_top3;
var bs_search = 0 ;
function switchTo3(tab_top,b)
{
document.getElementById(currtab_top3).style.display='none';
document.getElementById(currtab_top3+"_g").style.display='none';
document.getElementById(tab_top+b).style.display='inline';
document.getElementById(tab_top+b+"_g").style.display='inline';
currtab_top3=tab_top+b;
bs_search = b-1 ;
document.getElementById("SearchWord").focus();
}

function _search(key)
{
	var keyword = document.getElementById("SearchWord").value;
	if (keyword == "")
	{
		alert("请输入搜索关键字!");
		document.getElementById("SearchWord").focus();
		return;
	}
	switch(key)
	{
		case 0 :
			window.open("http://www.zhongwenlink.com/Search.aspx?job=web&q="+keyword);
			break;
		case 1 :
			window.open("http://www.google.com/search?hl=zh-CN&inlang=zh-CN&ie=GB2312&oe=GB2312&q="+UrlEncode(keyword));
			break;
		case 2 :
			window.open("http://www.baidu.com/s?cl=3&wd="+UrlEncode(keyword));
			break;
		case 3 :
			window.open("http://search.cn.yahoo.com/search?ei=gbk&fr=fp-tab-web-ycn&pid=ysearch&source=yahoo_yhp_0706_search_button&p="+UrlEncode(keyword));
			break;
		case 4 :
			window.open("http://mp3.baidu.com/m?f=ms&rn=&tn=baidump3&ct=134217728&word="+UrlEncode(keyword)+"&lm=-1");
			break;
		case 5 :
			window.open("http://image.baidu.com/i?ct=201326592&cl=2&lm=-1&tn=baiduimage&pv=&word="+UrlEncode(keyword)+"&z=0");
			break;
		case 6 :
			window.open("http://www.zhongwenlink.com/Search.aspx?job=rss&q="+keyword);
			break;
		case 7 :
			window.location.href="/searchnews.aspx?q="+encodeURIComponent(keyword);
			break;
		default :
			window.open("http://www.zhongwenlink.com/Search.aspx?job=web&q="+keyword);
			break;
	}
}

function goemail(email)
{

	switch(email)
	{
		case "Gmail" :
			window.open("http://www.gmail.com/");
			break;
		case "Hotmail" :
			window.open("http://www.Hotmail.com/");
			break;
		case "Yahoo" :
			window.open("http://mail.yahoo.com/");
			break;
		case "Sina" :
			window.open("http://mail.sina.com/");
			break;
		case "QQ" :
			window.open("http://mail.qq.com/");
			break;
		case "Aol" :
			window.open("http://www.aol.com/");
			break;
		case "sohu" :
			window.open("http://mail.sohu.com/");
			break;
		case "163" :
			window.open("http://mail.163.com/");
			break;
		case "comcast" :
			window.open("https://login.comcast.net/login?s=portal&continue=http%3A%2F%2Fwww6.comcast.net%2Fa%2F");
			break;
		default :
			break;
	}

}