﻿// JScript 文件
//google搜索
function gg()
{
var temp=document.getElementsByName("radio"); 
 for (i=0;i<temp.length;i++)
 {  //遍历Radio 
   if(temp[i].checked)    
     {
//         alert("你选择了"+temp[i].value);         //获取Radio的值    
         if(temp[i].value=="wy")
         {
         document.aa.attributes["action"].value="http://www.google.com.hk/search"; 
         return;}
         if(temp[i].value=="pic")
         {
         document.aa.attributes["action"].value="http://images.google.com.hk/images"; 
         return;}
         if(temp[i].value=="sp")
         {
         document.aa.attributes["action"].value="http://video.google.cn/videosearch"; 
         return;}
         if(temp[i].value=="dt")
         {
         document.aa.attributes["action"].value="http://maps.google.com.hk/maps"; 
         return;}
         if(temp[i].value=="zx")
         {
         document.aa.attributes["action"].value="http://maps.google.com.hk/news"; 
         return;}
         if(temp[i].value=="yy"){
         document.aa.attributes["action"].value="http://www.google.cn/music/search"; 
         return;}
          if(temp[i].value=="wd"){
         document.aa.attributes["action"].value="http://wenda.tianya.cn/wenda/search"; 
         return;}
          if(temp[i].value=="lb"){
         document.aa.attributes["action"].value="http://laiba.tianya.cn/laiba/Glue"; 
         return;}
      }  
  }
}
//百度搜索
function gowhere1(formname)
{
 var url;
 if (formname.myselectvalue.value == "0")
 {
  url = "http://www.baidu.com/baidu";
  document.search_form1.tn.value = "baidu";
  formname.method = "get";
 }
 if (formname.myselectvalue.value == "1")
 {
  url = "http://mp3.baidu.com/m";
  document.search_form1.tn.value = "baidump3";
  document.search_form1.ct.value = "134217728";
  document.search_form1.lm.value = "-1";
 }

 if (formname.myselectvalue.value == "4")
 {
  document.search_form1.tn.value = "news";
  document.search_form1.cl.value = "2";
  document.search_form1.rn.value = "20";
  url = "http://news.baidu.com/ns";
 }
 if (formname.myselectvalue.value == "5")
 {
  document.search_form1.tn.value = "baiduiamge";
  document.search_form1.ct.value = "201326592";
  document.search_form1.cl.value = "2";
  document.search_form1.lm.value = "-1";
  url = "http://image.baidu.com/i";
}
if (formname.myselectvalue.value == "6")
 {
  url = "http://post.baidu.com/f";
  document.search_form1.tn.value = "baiduPostSearch";
  document.search_form1.ct.value = "352321536";
  document.search_form1.rn.value = "10";
  document.search_form1.lm.value = "65536";
 }

  formname.action = url;
 return true;
}
//bing 搜索
function bb()
{
var temp=document.getElementsByName("bingradio"); 
for (i=0;i<temp.length;i++)
 {  //遍历Radio 
   if(temp[i].checked)    
     {
         //alert("你选择了"+temp[i].value);         //获取Radio的值    
         if(temp[i].value=="wy")
         {
         document.bing.attributes["action"].value="http://cn.bing.com/search"; 
         return;}
         if(temp[i].value=="pic")
         {
         document.bing.attributes["action"].value="http://cn.bing.com/images/search"; 
         return;}
         if(temp[i].value=="sp")
         {
         document.bing.attributes["action"].value="http://cn.bing.com/videos/search"; 
         return;}
         if(temp[i].value=="dt")
         {
         document.bing.attributes["action"].value="http://cn.bing.com/ditu/"; 
         return;}
         if(temp[i].value=="zx")
         {
         document.bing.attributes["action"].value="http://cn.bing.com/news/search"; 
         return;}
        
      }  
  }
}
//搜索导航切换
 function overme(o)
    { 
	    for(var i=1;i<=4;i++){
			    document.getElementById("collbutton"+i).className="";
			   document.getElementById("collbutton"+i+"_1").style.display = "none";			  
		   if(i==o){
		   document.getElementById("collbutton"+i).className="currenttab";
			    document.getElementById("collbutton"+o+"_1").style.display = "block";
			    continue;
		    }
	    }
    }
    
    //查看投票结果
    function   check_id_window()   
          {   
    
  top.open("/tpview.aspx","查看投票结果","height=430,width=245,scrollbars=no,Top=180,Left=400");   
            
          }   
    

