    google.load("language", "1");
    var container;
    var AppId = "857B5A0A9328B8EF1510ED53ACCB59044C23457A";
    var thunder_url = "";
    var thunder_pid = "44556";
    var adlistdata;
    
    function  Year_Month(){
            var  now  =  new  Date();  
            var  yy  =  now.getYear();  
            var  mm  =  now.getMonth();  
      var  mmm=new  Array();
      mmm[0]="1";
      mmm[1]="2  ";
      mmm[2]="3";
      mmm[3]="4";
      mmm[4]="5";
      mmm[5]="6";
      mmm[6]="7";
      mmm[7]="8";
      mmm[8]="9";
      mmm[9]="10";
      mmm[10]="11";
      mmm[11]="12";
      mm=mmm[mm];
            return(mm  );  }
    function  thisYear(){  
            var  now  =  new  Date();  
            var  yy  =  now.getFullYear();
            return(yy  );  }
      function  Date_of_Today(){  
            var  now  =  new  Date();  
            return(now.getDate()  );  }
      function  CurentTime(){  
            var  now  =  new  Date();  
            var  hh  =  now.getHours();  
            var  mm  =  now.getMinutes();  
            var  ss  =  now.getTime()  %  60000;  
            ss  =  (ss  -  (ss  %  1000))  /  1000;  
            var  clock  =  hh+':';  
            if  (mm  <  10)  clock  +=  '0';  
            clock  +=  mm+':';  
            if  (ss  <  10)  clock  +=  '0';  
            clock  +=  ss;  
            return(clock);
      }  
    var nowtime = thisYear()+"-"+Year_Month()+"-"+Date_of_Today();
    var nowtime_dt = CurentTime();
    var nowtime_sys = thisYear()+"-"+Year_Month()+"-"+Date_of_Today()+" "+CurentTime();
    
    function prosearch(){
      window.open("http://www.amazon.cn/search/search.asp?source=ereddatecom&searchType=&searchWord="+document.getElementsByName("q")[0].value);
    }

    function getRequestStr(gstr,stype){
      var setStr = "";
      switch(stype){
        case "web":
          setStr = "http://api.bing.net/json.aspx?AppId="+AppId+"&Query="+gstr.searchTxt+"&Sources="+stype+"&Version="+gstr.ver+"&Market="+gstr.mk+"&Adult="+gstr.adult+"&Options="+gstr.options+"&UILanguage="+gstr.uilang+"&Web.Count="+gstr.wcount+"&Web.Offset="+gstr.woffset+"&Web.Options="+gstr.woptions+"&Web.FileType="+gstr.wfiletype+"&JsonType=callback&JsonCallback=SearchCompleted";
          break;
        case "RelatedSearch":
          setStr = "http://api.search.live.net/json.aspx?AppId="+AppId+"&Query="+gstr.searchTxt+"&Sources="+stype+"&Version="+gstr.ver+"&Market="+gstr.mk+"&Options="+gstr.options+"&JsonType=callback&JsonCallback=SearchCompletedRelated";
          break;
        case "Image":
          setStr = "http://api.search.live.net/json.aspx?AppId="+AppId+"&Query="+gstr.searchTxt+"&Sources="+stype+"&Version="+gstr.ver+"&Market="+gstr.mk+"&Adult="+gstr.adult+"&Image.Count="+gstr.icount+"&Image.Offset="+gstr.ioffset+"&Image.Filters="+gstr.ifilters+"&JsonType=callback&JsonCallback=SearchCompleted";
          break;
        case "News":
          setStr = "http://api.search.live.net/json.aspx?AppId="+AppId+"&Query="+gstr.searchTxt+"&Sources="+stype+"&Version="+gstr.ver+"&Market="+gstr.mk+"&Options="+gstr.options+"&News.Count="+gstr.ncount+"&News.Offset="+gstr.noffset+"&News.SortBy="+gstr.nsortby+gstr.ncategory+"&JsonType=callback&JsonCallback=SearchCompleted";
          break;
        case "Video":
          setStr = "http://api.search.live.net/json.aspx?AppId="+AppId+"&Query="+gstr.searchTxt+"&Sources="+stype+"&Version="+gstr.ver+"&Market="+gstr.mk+"&Adult="+gstr.adult+"&Video."+gstr.voptions+"&Video.Count="+gstr.vcount+"&Video.Offset="+gstr.voffset+"&Video.Filters="+gstr.vfilters+"&JsonType=callback&JsonCallback=SearchCompleted";
          break;
      }
      return setStr;
    }
    function CreateNewElement(elename,stype,surl){
      webhead = document.getElementsByTagName("head");
      var gele = document.getElementsByTagName(elename);
        var cne = document.createElement(elename);
        cne.type = stype;
        cne.src = surl;
        webhead[0].appendChild(cne);
    }
    function rightmenu(obj){
      $(".postyle > ul > li > div > a").each(function(){
        switch (this.innerHTML){
          case "网页搜索":
            $(this).attr("href","s.html?q="+obj);
            break;
          case "新闻搜索":
            $(this).attr("href","n.html?q="+obj);
            break;
          case "图片搜索":
            $(this).attr("href","p.html?q="+obj);
            break;
          case "视频搜索":
            $(this).attr("href","v.html?q="+obj);
            break;
          case "在线翻译":
            $(this).attr("href","Translation.html?q="+obj);
            break;
        }
      });
    }
    
    function sethome(obj){
      obj.style.behavior='url("#default#homepage")';
      obj.setHomePage("http://www.iliulan.com");
    }
    
    function sbiClass(){
      $("#sbi").mouseover(function(){
        $(this).css({border:"1px #ccc solid",color:"#cccccc",background:"#ffffff"});
        if ($(this).attr("value") == "请输入翻译并搜索的字词？")
          $(this).attr("value","");
      });
      $("#sbi").change(function(){
        $(this).css({border:"1px #ccc solid",color:"#000000",background:"#F9F9F9"});
        if ($(this).attr("value") == "请输入翻译并搜索的字词？"){
          $(this).css({border:"1px red solid",color:"#ffffff",background:"#FFD54D"});
        }
      });
      $("#sbi").mouseout(function(){
        $(this).css({border:"1px #000 solid",color:"#000000",background:"#ffffff"});
        if ($(this).attr("value") == "请输入翻译并搜索的字词？"){
          $(this).css({border:"1px red solid",color:"#ffffff",background:"#FFD54D"});
        }
      });
      $("#sbi").keydown(function(event){
        if (event.keyCode==13){
          createTab(this.id,"0","");
        }
        rightmenu($(this).attr("value"));
      });
      $("#sbi").keyup(function(){
        rightmenu($(this).attr("value"));
      });
    }
    
    function zfhtml(){
      var zfstr = "";
      zfstr = '<strong style="font-size:12px;">简繁转换：<a href="javascript:z2f()">简体</a> | <a href="javascript:f2z()">繁體</a></strong>';
      return zfstr;
    }
    
    function z2f(){
      document.body.innerHTML = document.body.innerHTML.t2s();
    }
    function f2z(){
      document.body.innerHTML = document.body.innerHTML.s2t();
    }
    function scrollit1() {
      for (I=document.body.scrollHeight; I>1; I=I-40){
        parent.scroll(1,I)
      }
    }
    function atips(){
      $("a").each(function(){
        $(this).mouseover(function(){
          
        });
        $(this).mouseout(function(){
          
        });
      });
    }
    function hidediv(obj){
      obj.parentNode.style.display = 'none';
    }
    function alertCut(obj,option){
        if (addForm==null){
          addForm = new newForm({t:"告诉我们应该如何改进：",c:"请<a href='http://blog.sina.com.cn/s/blog_593ae71a0100hajv.html' title='回答一些问题' target='_blank'>回答一些问题</a>，告诉我们您的使用体验，以便帮助我们完善。",tcolor:"#333",bcolor:"2px #6F96DE solid",kcolor:"#EEF4FF",top:"30",width:"300",pt:"right",ptv:"20"})
          obj.appendChild(addForm);
        }else{
          addForm.style.display = "block";
          addForm.getElementsByTagName("p")[0].style.display = "block";
        }
    }
    function newForm(option){
      newForm = document.createElement("div");
      var gStr = "<p style='line-height:160%;color:"+option.tcolor+";border:"+option.bcolor+";position:absolute;top:"+option.top+"px;"+option.pt+":"+option.ptv+"px;"+option.pt+":"+(option.ptv-10)+"px!important;+"+option.pt+":"+option.ptv+"px!important;background:"+option.kcolor+";width:"+option.width+"px;width:"+(option.width-20)+"px!important;+width:"+option.width+"px!important;text-align:center;padding:10px;margin:0 auto;overflow:hidden;'><a href='javascript:void(0);' onclick='hidediv(this);' title='关闭'><img src='img/x.gif' alt='关闭' style='position:absolute;top:-5px;right:0;' title='关闭' /></a><strong style='background:url(img/info.gif) no-repeat center left;padding:0 0 0 20px;'>"+option.t+"</strong>"+option.c+"</p>";
      newForm.innerHTML = gStr;
      return newForm;
    }