document.write('<style type="text/css">');
document.write('<!--');
document.write('.bar1{COLOR: white;font-size:12px}');
document.write('A.bar1:link {COLOR: white; TEXT-DECORATION: none;font-size:12px}');
document.write('A.bar1:hover {COLOR: white; TEXT-DECORATION: none;font-size:12px}');
document.write('A.bar1:visited {COLOR: white; TEXT-DECORATION: none;font-size:12px}');
document.write('A.bar1:active {COLOR: white; TEXT-DECORATION: none;font-size:12px}');

document.write('.bar2{COLOR: yellow;font-size:12px}');
document.write('A.bar2:link {COLOR: yellow; TEXT-DECORATION: none;font-size:12px}');
document.write('A.bar2:hover {COLOR: yellow; TEXT-DECORATION: none;font-size:12px}');
document.write('A.bar2:visited {COLOR: yellow; TEXT-DECORATION: none;font-size:12px}');
document.write('A.bar2:active {COLOR: yellow; TEXT-DECORATION: none;font-size:12px}');
document.write('-->');
document.write('</style>');
function Check(form) {
 var keyword = new String(form.word.value);
 if(keyword.valueOf() == "") {
  window.alert("请输入你的查询条件！");
  return false;
 }else{
  if( form.sw.value == "2" ) {
   form.action = "http://dsearch.cn.tom.com/baidu";
   form.tn.value = "tomds";
   form.cl.value = "2";
   form.method = "get";
  }
  else if( form.sw.value == "8" )
  {
   form.action = "http://bjap1.cn.tom.com/app/cntom/search/search.php";
   form.channel.value="";
  }
  else if( form.sw.value == "9" )
  {
   form.action = "http://bjap1.cn.tom.com/app/cntom/search/search.php";
   form.channel.value="ent";  
   }
 else if( form.sw.value == "10" )
  {
   form.action = "http://download.cn.tom.com/search.asp";
   document.tomsearch.search.value=document.tomsearch.word.value;
   } 
  else{
   form.action = "http://search.cn.tom.com/php/Search_PageAndDir.php";
   form.method = "post";
  }
  return true;
 }
}

document.write('<table width="773" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#632884" height="53">');
document.write('<tr>');
document.write('<td valign="top" width="173"><a href="/index.html"><img src="/images/1226/entlogo.gif" width="173" height="52" border=0></td>');
document.write('<td width="600">');
document.write('<table width="600" border="0" cellspacing="0" cellpadding="0">');
document.write('<tr>');
document.write('<td height="26" class=bar1>　');

// 定义栏目；
name1 = new Array(
                  "首　页",
                  "新　闻",
                  "专　题",
				  "电　影",
				  "电　视",
				  "音　乐",
				  "写　真",
				  "论　坛"
				  )


// 定义链接；
link1 = new Array(
                  "/index.html",
                  "/pop/",
				  "/feature/",
				  "/movie/",
				  "/tv/",
				  "http://music.tom.com/",
				  "/xiezhen/",
				  "http://bbs.tom.com/bbs/index.php?main_url=http://bbs.tom.com/bbs/forumdisplay.php?forumid=81"
				  )


// 定义栏目；
var name2 = new Array(
                  "日　韩",
                  "星　路",
				  "Flash ",
				  "评　论")

// 定义链接；
var link2 = new Array(
                  "/rihan/",
                  "http://www.starroad.com/tom/",
				  "http://arts.tom.com/flash/index.html",
				  "/comment/")


var pa=document.URL;
var nav=0;


if (pa.indexOf("/pop/")>0) {nav=1;}

if (pa.indexOf("/tv/")>0) {nav=4;}

if (pa.indexOf("/movie/")>0) {nav=3;}

//if (pa.indexOf("/xinsheng/")>0) {nav=5;}

if (pa.indexOf("/feature/")>0) {nav=2;}

if (pa.indexOf("/xiezhen/")>0) {nav=6;}

//if (pa.indexOf("/vip/")>0) {nav=8;}

if (pa.indexOf(".bj/index.html")>0 || pa.indexOf(".com/index.html")>0 ) {nav=0;}//首页

if (pa.indexOf("/rihan/")>0) {nav=10;}

//if (pa.indexOf("/xinsheng/xindie/")>0) {nav=11;}

if (pa.indexOf("/comment/")>0) {nav=13;}

//if (pa.indexOf("/movie/rank/")>0) {nav=13;}



for(i=0;i<8;i++){

	if(nav == i){
		class1 = "bar2";
	}else{
	    class1 = "bar1";
	}

if (i=="5" || i=="7" ) {tar="target=_blank";}
else {tar="";}

document.write('<a href='+link1[i]+'  class='+class1+' '+tar+'>'+name1[i]+'</a>');
document.write('　|　');
}

document.write('</td>');
document.write('</tr>');
document.write('<tr bgcolor="#FFFFFF"> ');
document.write('<td height="1"><img src="/images/shim.gif" width="1" height="1"></td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td height="26"> ');
document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0">');
document.write('<tr>');
document.write('<td width="50%" class=bar1>　');






for(i=10;i<14;i++){

	if(nav == i){
		class2 = "bar2";
	}else{
	    class2 = "bar1";
	}

if (i=="11" || i=="12" ) {tar="target=_blank";}
else {tar="";}

document.write('<a href='+link2[i-10]+'  class='+class2+' '+tar+'>'+name2[i-10]+'</a>');
document.write('　|　');
}

document.write('<td width="50%">');
document.write('<table width="300" border="0" cellspacing="0" cellpadding="0" align="center">');
document.write('<form name=tomsearch method=post onSubmit="return Check(this)" target="_blank">');
document.write('<tr>');
document.write('<td><img src="/images/1226/searchlogo.gif" width="35" height="17"></td>');

document.write('<td  align="center">');
document.write('<input type="hidden" name="tn">');
document.write('<input type="hidden" name="cl">');
document.write('<input type="hidden" name="channel">');
document.write('<input type="hidden" name="search">');
document.write('<input type="TEXT" name="word" size="15" class=input onMouseOver="this.focus()"onFocus="this.select()">');
document.write('</td><td width="81">');
document.write('<select name=sw style="font-size: 12px;">');
document.write('<option value="9">娱乐频道</option>');
document.write('<option value="8">站内搜索</option>');
document.write('<option value="2">中文网页</option>');
document.write('<option value="1">中文网站</option>');
document.write('<option value="10">软件下载</option>');
document.write('<option value="6">英汉字典</option>');
document.write('<option value="3">沪深股票</option>');
document.write('<option value="7">沪深B 股</option>');
document.write('<option value="5">美国股票</option>');
document.write('<option value="4">香港股票</option>');
document.write('</select>');
document.write('</td><td width="45">');
document.write('<input type="SUBMIT" value="搜索"style="font-size: 12px;" name="SUBMIT2">');
document.write('</td></tr></form></table>');
document.write('</td></tr></table></td></tr></table></td></tr></table>');
