var haoCurrHighLight = document.getElementById("haoweb");
function trim(str){
return str.replace(/(^\s*)|(\s*$)/g, "");
}
function setStyle(a,b){
var c=document.styleSheets[0];
if(c.addRule){
c.addRule(a,b);
}else if(c.insertRule){
c.insertRule(a+" { "+b+" }",c.cssRules.length);
}}
function haoValidate(source){
wval = trim(f.word.value);

if (f.sc.value=="img")
{
f.ct.value=201326592

 
}
if (f.sc.value=="zhidao")
{
f.c.value=2
f.k.value=f.word.value
}
if (f.sc.value=="web")
{


}
if (f.sc.value=="mp3")
{
f.c.value=1

f.k.value=f.word.value
}
if (f.sc.value=="google")
{
f.ct.value=201326592

}
if (f.sc.value=="Video")
{
	f.st.value=4
f.k.value=f.word.value
}

return true;
}
function haoSubSearch(sc){
changePage(sc);
imglogo=document.getElementById("imglogo");
if(sc != "baidu"){

 if(sc == "zhidao")
{
f.action = "http://www.moretoo.com/search.php";
imglogo.src="imagesuu7c/moretoo.jpg";
imglogo.alt="汽车报价搜索";
urllogo.href="http://www.moretoo.com/2";
}
else if(sc == "mp3")
{


f.action = "http://www.moretoo.com/search.php";

imglogo.src="imagesuu7c/moretoo.jpg";
imglogo.alt="车型搜索";
urllogo.href="http://www.moretoo.com/";
}
else if(sc == "img")
{
f.action = "http://image.baidu.com/i";
imglogo.src="imagesuu7c/logo_pic.gif";
imglogo.alt="百度图片";
urllogo.href="http://image.baidu.com/";
}
else if(sc == "Video")
{
f.action = "http://www.mogou.com/s.php";
imglogo.src="imagesuu7c/mogou.gif";
imglogo.alt="汽车新闻搜索";
urllogo.href="http://www.mogou.com/xinwen";
}
else if(sc == "Google")
{
f.action = "Google_so.htm";
imglogo.src="imagesuu7c/google.gif";
imglogo.alt="谷歌搜索";
urllogo.href="Google_so.htm";
}
else
{
f.action = "http://www.baidu.com/s";
imglogo.src="imagesuu7c/logox3.gif";
imglogo.alt="百度首页";
urllogo.href="http://www.baidu.com";
}
f.sc.value = sc;
}
else{
f.sc.value = "post";
haoGoSoba();
}
}

function haoGoSoba(){

f.action = "http://www.baidu.com/s";
f.kw.value = f.word.value;
}
function G(id)
{
return document.getElementById(id);
}
function changePage(sc){
if(haoCurrHighLight == null){
haoCurrHighLight = document.getElementById("haoweb");
}
haoCurrHighLight.className = "searchfod2";
haoCurrHighLight = document.getElementById("hao"+sc);
haoCurrHighLight.className = "searchfod1";
document.f.word.focus()
f.word.value="";
}

function isSoba(){
if(haoCurrHighLight == document.getElementById("haosoba")){
haoGoSoba();
return true;
}
else{
return true;
}
}

function goSearch(){
changeHotWords(document.f.sc.value);
if(!haoValidate(1))
{
return false;
}
else{
return false;feierte
}
}

function changeHotWords(category){
document.getElementById("td_hotlist").innerHTML = eval(category + "Words");
}
function init(){
haoSubSearch("web");
goSearch();
}



//网页
var webWords = '<a href="http://shop59406463.taobao.com/"  target="_blank"     ><span class=p14blue >汽车座套全国包邮</span></a>  <a href="http://union.9lin.com/gg/cx10.asp?siteid=397"  style="color:#225599">平安车险网上直销</a>   <A  href="http://game.uu7c.com/sg/index.php?q=32609755_102_0/" target=_blank><span class=p14blue >武林三国</span></A> ';
//谷歌
var GoogleWords = '<a href="http://ditu.google.cn/"   target="_blank" >google地图</a>　　　<a href="http://translate.google.cn/"   target="_blank" >google翻译</a>';

//知道
var zhidaoWords = '<a href="http://www.moretoo.com/2/%E6%EA%CD%FE"   target="_blank" >骊威</a>　<a href="http://www.moretoo.com/2/%D4%C3%B6%AF"   target="_blank" >悦动</a>　<a href="http://www.moretoo.com/2/%C2%ED%D7%D4%B4%EF2"   target="_blank" >马自达2</a>';
//MP3
var mp3Words = '<a href="http://www.moretoo.com/1/%D0%C2%CC%EC%F4%A5"   target="_blank" >新天籁</a>　<a href="http://www.moretoo.com/1/%D0%C2%CD%FE%B3%DB"   target="_blank" >新威驰</a>　<a href="http://www.moretoo.com/1/%B0%C2%B5%CFR8"   target="_blank" >奥迪R8</a>';
//图片
var imgWords = '<a href="http://image.baidu.com/i?ct=201326592&cl=2&lm=-1&tn=baiduimage&pv=&word=%C1%F5%C7%AB&z=0">刘谦</a>　<a href="http://image.baidu.com/i?ct=201326592&cl=2&lm=-1&tn=baiduimage&pv=&word=%C1%D6%D2%C0%B3%BF&z=0">林依晨</a>　<a href="http://image.baidu.com/i?ct=201326592&cl=2&lm=-1&tn=baiduimage&pv=&word=%CE%E2%D7%F0&z=0">吴尊</a>　<a href="http://www.baidu.com/search/image_wallpaper.html"><font class=blackfont>更多&nbsp;&raquo;</font></a>';
//视频
var VideoWords = '';

//ad
var adWords = '&nbsp;&nbsp;<IMG SRC="../ad/new_ad.gif" border="0"> <a href="http://www.uu7c.com/newhotel/list.asp?cityid=61" target="_blank">厦门文博会，住宿省钱小窍门</a>&nbsp;&nbsp;<a href="http://www.uu7c.com/ad.htm" style="color:#ff7600">“停车位出租”</a>&nbsp;&nbsp;<a href="http://www.uu7c.com/jd/list.asp?proviceid=16" target="_blank" style="color:#225599">六月畅游江南</a>&nbsp;&nbsp;<a href="http://jipiao.17u.cn/index-1921557.html" target="_blank" style="color:#ffa500">订机票，飞上海，观世博！</a>';
//topad
var adtopimg = '<a href="dealer/check.asp?id=18"   target="_blank" ><img src="ad/jt.gif" width="760px" height="80px" border="0"></a>';
//搜索右边
//搜索右边
var adtopse = '<a href="http://s.click.taobao.com/a/qXw59YK8YF8=-10361900">淘宝皇冠店</a>︱<a href="http://s.click.taobao.com/a/qXMWrijsZGA=-10361900">皇冠汽车用品店</a>︱<a href="http://count.chanet.com.cn/click.cgi?a=303716&d=112899&u=&e=" target="_blank"><IMG SRC="http://file.chanet.com.cn/image.cgi?a=303716&d=112899&u=&e=" width="1" height="1"  border="0">桔色网</a>︱<a href="http://s.click.taobao.com/a/qXMWq70mviQ=-10361900">渔具商城</a>︱<a href="http://s.click.taobao.com/a/qXw58kkAsn0=-10361900">芳疗产品</a>︱<a href="http://s.click.taobao.com/t_1?i=qz0qH3hLUVy0OA%3D%3D&p=mm_10361900_0_0&n=11">车载GPS</a>';
//cai
var ad77_87='<a href="http://www.046789.com">中国福利彩票</a>';