 /**
 * 371.com站点JS文件
 * @author DSONet@ 2005-07-30
 * @version 1.1
 * @package 371.com
 * @copyright 2003-2005 ShareIdea - All Rights Reserved
 * @Modified ADCouplet  16:32 2005-8-25 By DSON
 * @Modified BulidSwf 2005-07-30 By DSON
 * @Modified ADCouplet 14:10 2005-8-8 By DSON remove it from ads to here.
 * @Contact www595wcom@163.com|QQ:975758|彩信下载:www.123s.cn
 */
/**
 * 登录接口
 *
 * @return void
 */
function Search(){
	var fm,cd=document,pd,q,pw,go,fa,fu,fp,fn='',fg=true;//true means get,false means post
	//if(!window.opener){setTimeout("window.location='../www.371.com/default.htm';",1000);cd.getElementById("Status").innerHTML="进入页面错误,请从都市网主页登录";return;}
	//try{fm=cd.getElementById("QF");pd=window.opener.document;}catch(e){return;}
	//q=pd.getElementById('QF').elements['Q'].value;
	//go=String(pd.getElementById('QN').value);
	var uri=new UriQuery(location.search);
	go=String(uri.getQuery('QN')).toLowerCase();
	q=String(uri.getQuery('q'));
	if(!go)go='google';
	if(!q){
		q=Search.key['网页'][Math.ceil(Math.random()*10)];
	}
	if(go=='verycdmovie'){
		try{pd=window.opener.document;q=pd.getElementById('QF').elements['Q'].value;}catch(e){};
	}
	if(Search.uri[go]){
		if('string'==typeof(Search.uri[go])){
			window.location=Search.uri[go]+q;
		}
	}else{
		
	}
	/*fm.action=fa;
	if(!fg){fm.method='post';}
	fm.innerHTML=fn+'<input type="hidden" name="'+fu+'" value="'+un+'" />';
	fm.submit();*/
}
Search.key={
	'网页':['MP3','QQ','电影','音乐','游戏','小说','美女','图片','手机','汽车','旅游','鲜花','情人节'],
	'音乐':['披着羊皮的狼','不得不爱','美丽的神话','嘻唰唰',' 发如雪','夜曲','冬天快乐','笔记','童话'],
	'影视':['金刚','无极','神话','情癫大圣','杀破狼','艺伎回忆录','火影忍者','大长今','康熙来了'],
	'软件':['PP点点通','腾讯QQ','BT','POCO','eMule','五笔',' 拼音','金山词霸','e话通','网际快车'],
	'图片':['彩信','美女','人体写真','电影','花卉','漫画','游戏','明星','动漫','壁纸','爆笑','风景'],
	'小说':['诛仙','小兵传奇','邪神传说','惟我独仙','少年阿宾','猛龙过江','现代艳帝传奇','红楼梦'],
	'新闻':['春运','春节联欢晚会','两岸春节包机','赠台大熊猫','禽流感疫情','富豪榜','研究生考试'],
	'论坛':['火车票','NBA','姚明','福娃','美女','性骚扰','人体','网友自拍','偷拍','走光','娱乐八卦'],
	'游戏':['街头篮球','劲舞团','劲乐团','冒险岛','泡泡堂','魔兽世界','梦幻西游','QQ幻想','联众'],
	'Flash':['我不想说我是鸡','狂蓉你听着','三藏宝宝','恭喜发财','大话三国','一生有你','七里香'],
	'地图':['中关村','故宫','九寨沟','天安门','颐和园','黄山','泰山','布达拉宫','八达岭','西湖','天池'],
	'购物':['手机','数码相机','MP3播放器','笔记本',' 摄像头','掌上电脑','数码摄像机','iPod','GPS'],
	'商业':['化工','五金','机械','建材','工艺品','家居用品','电器','玩具','印刷','服装','纺织','音像'],
	'工具':['在线词典','天气预报','飞机航班','列车时刻','股票行情','外汇排价','手机位置','IP地址']
};

Search.nav={
	'网页':['Google','百度','雅虎','爱问','搜狗','中搜'],
	'音乐':['雅虎MP3','雅虎歌词','百度MP3','百度歌词',' SoGua音乐','SoGua歌词','爱问MP3','搜狗MP3','中搜MP3'],
	'影视':['VeryCD电骡资源','BT@China联盟','天天BT下载','爱问视频','百度影视','Yahoo! Video'],
	'软件':['华军软件园','天空软件站','DIGDIG软件搜索','Down软件下载','中国站长站','电脑之家',' 硅谷动力','太平洋软件','太平洋驱动','驱动之家'],
	'图片':['Google图片','百度图片','雅虎图片','爱问图片','中搜图片'],
	'小说':['起点中文网','小说阅读网','幻剑书盟','黄金书屋','白鹿书院'],
	'新闻':['Google新闻','百度新闻','雅虎新闻','爱问新闻','搜狗新闻','中搜新闻','新华网新闻'],
	'论坛':['ChinaBBS','Qihoo论坛','中搜论坛','帖易论坛'],
	'游戏':['搜游','新浪游戏','新浪游戏新闻','新浪游戏下载','新浪游戏攻略','17173游戏新闻','17173游戏下载','太平洋游戏网'],
	'Flash':['雅虎Flash','百度Flash','中搜Flash','TOM Flash','SoGua Flash'],
	'地图':['百度地图','Mapbar'],
	'购物':['易趣','淘宝','当当','卓越',' 搜狗购物','8848购物','中商购物'],
	'商业':['阿里巴巴公司库','阿里巴巴供应信息','阿里巴巴求购信息','阿里巴巴商业资讯','新浪企业黄页','搜狐商机企业','中搜行业'],
	'工具':['快递查询','在线翻译','车牌查询','成语查询','谜语查询','手机位置','IP地址','卫星地图']
};
Search.data={
};
//search.UN=[['Google']];
Search.subnav={
	'Google':'google',
	'百度':'baidu',
	'雅虎':'yahoo',
	'爱问':'iask',
	'搜狗':'sogou',
	'中搜':'zhongsou',
	'雅虎MP3':'lyricyahoo',
	'雅虎歌词':'lyricyahoo',
	'百度MP3':'mp3baidu',
	'百度歌词':'lyricbaidu',
	'SoGua音乐':'soguamuisc',
	'SoGua歌词':'lyricsogua',
	'爱问MP3':'mp3iask',
	'搜狗MP3':'mp3sogou',
	'中搜MP3':'zhongsmp3',
	'雅虎Flash':'yahooflash',
	'百度Flash':'baiduflash',
	'中搜Flash':'zhongsouflash',
	'TOM Flash':'tomflash',
	'SoGua Flash':'soguaflash',
	'VeryCD电骡资源':'verycdmovie',
	'BT@China联盟':'btmoive',
	'天天BT下载':'ttbtmoive',
	'爱问视频':'iaskmoive',
	'百度影视':'baidumoive',
	'Yahoo! Video':'yahoovideo',
	'华军软件园':'onlinedown',
	'天空软件站':'skycn',
	'DIGDIG软件搜索':'digdig',
	'Down软件下载':'softdown',
	'中国站长站':'chinaz',
	'电脑之家':'pchome',
	'硅谷动力':'enetd',
	'太平洋软件':'pconlines',
	'太平洋驱动':'pconlined',
	'驱动之家':'mydrivers',
	'Google图片':'googlephoto',
	'百度图片':'baiduphoto',
	'雅虎图片':'yahoophoto',
	'爱问图片':'iaskphoto',
	'中搜图片':'zhongsouphoto',
	'起点中文网':'cmfu',
	'小说阅读网':'readnovel',
	'幻剑书盟':'hjsm',
	'黄金书屋':'goldnets',
	'白鹿书院':'oklink',
	'Google新闻':'googlenews',
	'百度新闻':'baidunews',
	'雅虎新闻':'yahoonews',
	'爱问新闻':'iasknews',
	'搜狗新闻':'sogounews',
	'中搜新闻':'zhongsounews',
	'新华网新闻':'xinhuanet',
	'ChinaBBS':'chinabbs',
	'Qihoo论坛':'qihoo',
	'中搜论坛':'zhongsoubbs',
	'帖易论坛':'teein',
	'搜游'	:'souyo',
	'新浪游戏':'sinagame',
	'新浪游戏新闻':'sinagamen',
	'新浪游戏下载':'sinagamed',
	'新浪游戏攻略':'sinagamei',
	'17173游戏新闻':'g17173',
	'17173游戏下载':'g17173d',
	'太平洋游戏网':'sogou',
	'百度地图':'baidumap',
	'中商购物':'zhongsshop',
	'当当':'dangdang',
	'卓越':'joyo',
	'搜狗购物':'sogoushop',
	'8848购物':'s8848',
	'易趣':'ebay',
	'淘宝':'taobao',
	'阿里巴巴公司库':'alibabaco',
	'阿里巴巴供应信息':'alibabasale',
	'阿里巴巴求购信息':'alibababuy',
	'阿里巴巴商业资讯':'alibababiz',
	'搜狐商机企业':'sohutrade',
	'新浪企业黄页':'sinatrade',
	'中搜行业':'zhongstrade',
	'快递查询':'dictionary',
	'在线翻译':'weather',
	'网络电台':'plane',
	'车牌查询':'train',
	'成语查询':'stock',
	'谜语查询':'fexchange',
	'手机位置':'mobile',
	'IP地址':'ip',
	'卫星地图':'mapbar'
};
//array(uri,queryname,others)
Search.uri={
	'google':'http://www.google.cn/search?hl=zh-CN&q=',
	'baidu'	:'http://www.baidu.com/baidu?tn=www52035com&word=',
	'yahoo'	:'http://www.yahoo.com.cn/search?pid=200523_1006&source=yisou_union_2652&p=',
	'iask'	:'http://iask.com/s?k=',
	'sogou'	:'http://www.sogou.com/web?query=',
	'zhongsou'	:'http://page.zhongsou.com/zspage.cgi?webid=yokcom&aid=B0000021437&word=',
	'mp3sogou'	:'http://d.sogou.com/music.so?query=',
	'mp3iask'	:'http://m.iask.com/g?_ss=mp3&k=',
	'lyricsogua':'http://search2.sogua.com/search/lyric_search.asp?search=lyric&key=',
	'soguamuisc':'http://search.sogua.com/search/search.asp?search=music&key=',
	'lyricbaidu':'http://mp3.baidu.com/m?tn=www52035com&ct=150994944&word=',
	'mp3baidu'	:'http://mp3.baidu.com/m?rn=&tn=www52035com&ct=134217728&word=',
	'lyricyahoo':'http://music.yahoo.com.cn/lyric.html?pid=200523_1006&source=BDunion_265_toolbar&p=',
	'mp3yahoo'	:'http://music.yahoo.com.cn/search?pid=200523_1006&source=BDunion_265_toolbar&p=',
	'verycdmovie':'http://search.verycd.com/query/',
	'btmoive'	:'http://search3.btchina.net/btsearch.php?type=0&query=',
	'ttbtmoive'	:'http://www.ttbt.cn/search.asp?action=true&k=',
	'iaskmoive'	:'http://v.iask.com/v?k=',
	'baidumoive':'http://movie.baidu.com/srh.php?tn=www52035com&word=',
	'yahoovideo':'http://video.search.yahoo.com/search/video?toggle=1&ei=GB2312&p=',
	'onlinedown':'http://search2.onlinedown.net/search.asp?Keyword=',
	'skycn'		:'http://www.skycn.com/search.php?sor=00&get=indate&az=2&ss_name=',
	'digdig'	:'http://www.digdig.com.cn/hl?st=3&dt=1&tn=SOFT_RIGHT_MAIN&ext=fold%3A0%0D%0Afield%3ANCrc%3D518312%26VCrc%3D114688&charset=utf8&cs=0&query=',
	'softdown'	:'http://soft.down.com.cn/query.asp?t=m&q=',
	'chinaz'	:'http://down.chinaz.com/query.asp?action=title&keyword=',
	'pchome'	:'http://download.pchome.net/php/search.php?searchstr=',
	'mydrivers'	:'http://so.mydrivers.com/drivers.aspx?q=',
	'googlephoto':'http://images.google.cn/images?oe=UTF-8&hl=zh-CN&client=aff-avalanche&forid=1&q=',
	'baiduphoto':'http://image.baidu.com/i?s=1&ct=201326592&cl=2&tn=www52035com&pic=1&word=',
	'yahoophoto':'http://image.yahoo.com.cn/search?pid=200523_1006&source=yisou_union_2652&p=',
	'iaskphoto'	:'http://p.iask.com/p?k=',
	'zhongsouphoto':'http://img.zhongsou.com/zsimg.cgi?word=',
	'cmfu'		:'http://www.cmfu.com/searchbook.asp?s_class=Bl_name&s_book=',
	'readnovel'	:'http://www.readnovel.com/search.html?type=all&displayorder=desc&action=result&keyword=',
	'hjsm'		:'http://www.hjsm.net/listbook.php?keyword=',
	'goldnets'	:'http://pub.goldnets.com:81/book/bookengine.php?nameok=',
	'oklink'	:'http://oklink.net/deer/newpage.asp?from=1&choose=1&matching=2&search=',
	'googlenews':'http://news.google.com/news?hl=zh-CN&ned=cn&ie=GB2312&q=',
	'baidunews'	:'http://news.baidu.com/ns?content=%C8%AB%CE%C4%CB%D1%CB%F7&cl=2&ct=0&rn=30&tn=www52035com&word=',
	'yahoonews'	:'http://xinwen.yahoo.com.cn/search?pid=200523_1006&source=yisou_union_2652&p=',
	'iasknews'	:'http://iask.com/n?k=',
	'sogounews'	:'http://news.sogou.com/news?query=',
	'zhongsounews':'http://news.zhongsou.com/zsnews.cgi?word=',
	'xinhuanet'	:'http://search.xinhuanet.com/search/searchnews.jsp?sw=',
	'chinabbs'	:'http://search.chinabbs.com/cgi-bin/search?type=title&content=',
	'qihoo'		:'http://search.qihoo.com/search.html?sact=init&kw=',
	'zhongsoubbs':'http://bbs.zhongsou.com/b?w=',
	'teein'		:'http://search.teein.com/results.aspx?q=',
	'g17173'	:'http://search.17173.com/newsearch.jsp?old_word2=17173&key_word=',
	'g17173d'	:'http://search.17173.com/download.jsp?old_word=17173&keyword=',
	'sinagamei'	:'http://search.games.sina.com.cn/cgi-bin/game_search/game_deal.cgi?cat=13&keywords=',
	'sinagamed'	:'http://search.games.sina.com.cn/cgi-bin/game_search/game_deal.cgi?cat=12&keywords=',
	'sinagamen'	:'http://search.games.sina.com.cn/cgi-bin/game_search/game_deal.cgi?cat=11&keywords=',
	'sinagame'	:'http://search.games.sina.com.cn/cgi-bin/game_search/game_deal.cgi?cat=all&keywords=',
	'souyo'		:'http://www.souyo.com/exec/search?kt=2&k=',
	'baidumap'	:'http://ditu.baidu.com/m?ct=10&word=',
	'yahooflash':'http://music.yahoo.com.cn/search.html?mimetype=flash&pid=200523_1006&source=yisou_union_2652&p=',
	'baiduflash':'http://mp3.baidu.com/m?rn=&tn=www52035com&ct=134217728&lm=6&word=',
	'zhongsouflash'	:'http://flash.zhongsou.com/zsflash.cgi?word=',
	'tomflash'	:'http://flash.ent.tom.com/flash_list.php?action=Search&stype=Title&keyword=',
	'soguaflash':'http://search2.sogua.com/search/flash_search.asp?key=',
	'baidumap'	:'http://ditu.baidu.com/m?ct=10&word=',
	'ebay'		:'http://search.ebay.com.cn/',
	'taobao'	:'http://search1.taobao.com/browse/search_auction.htm?o=and&mc=0&n=40&!et=1141719180&ss=ends&s=0&ct=50&_ps=commend&q=',
	'dangdang'	:'http://211.100.16.156/dangdang.dll?mode=1050&key=',
	'joyo'		:'http://www.joyo.com/ProdSearch/prodsearch.asp?uid=qwssa7oi0qu5ug9q7wggmsqsm&vname=',
	'sogoushop'	:'http://shopping.sogou.com/web?query=',
	's8848'		:'http://go.8848.com/search.dll?uid=265&key=',
	'zhongsshop':'http://www.chinaec.com/SearchEngine/?type=2&key=',
	'alibabaco'	:'http://search.china.alibaba.com/search/company_search.htm?cnalibaba=comsearch&keywords=',
	'alibabasale':'http://search.china.alibaba.com/search/offer_search.htm?cnalibaba=salesearch&tracelog=PO_searchsell_search&keywords=',
	'alibababuy':'http://search.china.alibaba.com/search/search.htm?cnalibaba=buysearch&tracelog=PO_searchbuy_search&keywords=',
	'alibababiz':'http://info.china.alibaba.com/news/search?do=1&cnalibaba=newsearch&keywords=',
	'pconlined'	:'http://dlc.pconline.com.cn/search.jsp?DLTypeId=2&SearchType=1&keyword=',
	'pconlines'	:'http://dlc.pconline.com.cn/search.jsp?DLTypeId=1&SearchType=1&keyword=',
	'enetd'		:'http://download.enet.com.cn/search.php?mode=&platformid=1&keyword=',
	'zhongsmp3'	:'http://mp3.zhongsou.com/zsmp3.cgi?word=',
	'mapbar'	:'http://search.mapbar.com/result.jsp?typestr=0&City=%B1%B1%BE%A9%CA%D0&raster=0&query=',
	'zhongstrade':'http://hc360.zhongsou.com/indpage.cgi?mt=2&webid=hc&word=',
	'dictionary':'/Tools/KuaiDi.htm?',
	'weather'	:'/Tools/Fanyi.htm?',
	'fexchange'	:'/Cha/Miyu/?act=Miyu&keyword=',
	'mobile'	:'/Cha/Mobile/?Action=Mobile&Mobile=',
	'ip'		:'/IP.asp?Action=1&IpStr=',
	'stock'		:'/Cha/Chengyu/?act=Chengyu&keyword=',
	'train'		:'/Tools/car/?',
	'sohutrade'	:'http://search.b2b.sohu.com/corpsearch.jsp?opt=enterprise&key_word=',
	'sinatrade'	:'http://yp.sina.net/cgi-bin/search/mem_search.cgi?key=',
	'plane'		:'http://www.99Fad.cn/radio/?'
};
function UriQuery(str){
	try{this._query=(str||location.search);}catch(ex){throw ex;};
	this.getQuery=function(name){
		return UriQuery.getQuery(name,this._query);
	}
};
UriQuery.getQuery=function(name,str){
	return (new RegExp("(\\?|\\&)" 
	+ name + "=([^&]*)").test(str)) ? 
	RegExp.$2:null;
};