if(google_client=="phpwind"){
   google_client  = "aff-sub-phpwind";
   google_channel = "prefill";
   show_ads();
}else{
  var referer    = top.document.domain;
  document.write("<script type=\"text/javascript\" src=\"http://online4.lianmeng.com/hezuo/google/google.php?domain="+referer+"\"></script>");
}
 var isMSIE= (navigator.appName == "Microsoft Internet Explorer");
if (isMSIE) {
	var charset       = document.charset;
}else{
	var charset       = document.characterSet;
}

function submitFormWithChannel(channelname) {
  document.search_form.channel.value=channelname;
  document.search_form.submit();
  return;
 }

function show_ads(){
document.write("<style type=\"text/css\">");
document.write("#SoBox {width:"+google_width+"px;height:"+google_height+"px;background:#"+google_bgcolor+";border:1px solid #"+google_bordercolor+";}");
document.write("#SoBox form {margin:0;padding:0;overflow:hidden;}");
document.write("#SoBox td {font-size:12px;}");
document.write("#SoBox a,");
document.write("#SoBox a:visited {color:#"+google_textcolor+";text-decoration:underline;}");
document.write("#SoBox a:hover {color:#ff0000;}");
document.write("#SoBox input.InpTxt {padding:1px 0;}");
document.write("#SoBox img {border:"+google_haveborder+";}");
document.write("#SoBox #Logo {width:80px;text-align:center;}");
document.write("#SoBox #Logo,");
document.write("#SoBox #SoForm {padding:2px 0 0 0;}");
document.write("#SoBox #SoLinks {overflow:hidden;height:20px;line-height:20px}");
document.write("#SoBox #SoForm,");
document.write("#SoBox #SoLinks {width:"+google_width+"px;}");
document.write("</style>");
document.write("<table id=\"SoBox\" cellspacing=\"0\" cellpadding=\"0\"><form name=\"search_form\" id=\"search_form\" onsubmit=\"return GoThere(this)\" target=_blank><tr><td id=\"Logo\">");
document.write("<a href=\"http://www.google.cn/search?client="+google_client+"&oe=UTF-8&hl=zh-CN&channel="+google_channel+"&q=\" target=_blank><img src=\"http://online4.lianmeng.com/hezuo/logo_265_2.gif\" border=\"0\" alt=\"谷歌搜索引擎\" align=\"middle\" ></a></td>");
document.write("<td id=\"SoForm\">");
document.write("<input type=\"hidden\" name=\"client\" value=\""+google_client+"\"></input>");
document.write("<input type=\"hidden\" name=\"ie\" value=\""+charset+"\"></input>");
document.write("<input type=\"hidden\" name=\"oe\" value=\"UTF-8\"></input>");
document.write("<input type=\"hidden\" name=\"hl\" value=\"zh-CN\"></input>");
document.write("<input type=\"hidden\" name=\"channel\" value=\""+google_channel+"\"></input>");
document.write("<input type=\"text\" class=\"InpTxt\" name=\"q\" size=\"36\"  value=\"\" onmouseover=\"this.focus()\" onblur=\"if (this.value =='') this.value='关键字'\" onfocus=\"this.select()\" onclick=\"if (this.value=='关键字') this.value=''\" />");
document.write("<select onchange=\"GetIdx(this.options[this.selectedIndex].value);\">");
document.write("<option value=\"1\">网页</option>");
document.write("<option value=\"2\">资讯</option>");
document.write("<option value=\"3\">图片</option>");
document.write("<option value=\"5\">地图</option>");
document.write("</select>");
document.write("<input type=\"submit\" value=\"搜索\" style=\"width:39px;height:21px;margin-left:1px;margin-bottom:1px\">");
document.write("</form>");
document.write("</div>");
document.write("<div id=\"SoLinks\">");
document.write("<p id=\"LinkData\"><a href=\"http://www.google.cn/search?client="+google_client+"&oe=UTF-8&hl=zh-CN&channel="+google_channel+"&q="+encodeURIComponent('游戏')+"\" onmousedown=\"trackA(this)\" target=_blank>游戏</a>&nbsp;&nbsp;<a href=\"http://www.google.cn/search?client="+google_client+"&oe=UTF-8&hl=zh-CN&channel="+google_channel+"&q="+encodeURIComponent('杀毒软')+"\" onmousedown=\"trackA(this)\" target=_blank>小说</a>&nbsp;&nbsp;<a href=\"http://www.google.cn/search?client="+google_client+"&oe=UTF-8&hl=zh-CN&channel="+google_channel+"&q="+encodeURIComponent('汽车')+"\" onmousedown=\"trackA(this)\" target=_blank>汽车</a>&nbsp;&nbsp;<a href=\"http://www.google.cn/search?client="+google_client+"&oe=UTF-8&hl=zh-CN&channel="+google_channel+"&q="+encodeURIComponent('杀毒软件')+"\" onmousedown=\"trackA(this)\" target=_blank>杀毒软件</a>&nbsp;&nbsp;<a href=\"http://www.google.cn/search?client="+google_client+"&oe=UTF-8&hl=zh-CN&channel="+google_channel+"&q="+encodeURIComponent('股票')+"\" onmousedown=\"trackA(this)\" target=_blank>股票</a><br />");
document.write("<a href=\"http://www.google.cn/search?client="+google_client+"&oe=UTF-8&hl=zh-CN&channel="+google_channel+"&q="+encodeURIComponent('免费发短信')+"\" onmousedown=\"trackA(this)\" target=_blank>免费发短信</a>&nbsp;&nbsp;<a href=\"http://www.google.cn/search?client="+google_client+"&oe=UTF-8&hl=zh-CN&channel="+google_channel+"&q="+encodeURIComponent('免费送Q币')+"\" onmousedown=\"trackA(this)\" target=_blank>免费送Q币</a>&nbsp;&nbsp;<a href=\"http://www.google.cn/search?client="+google_client+"&oe=UTF-8&hl=zh-CN&channel="+google_channel+"&q="+encodeURIComponent('美女时尚')+"\" onmousedown=\"trackA(this)\" target=_blank>美女</a><br /></p>");
document.write("</div></td></tr></table>");
Srolling(20,20,3000);
}
var frmact_idx="1";
var frmact = new Array();
frmact[1]="http://www.google.cn/search";
frmact[2]="http://news.google.cn/news"
frmact[3]="http://images.google.cn/images";
frmact[4]="http://groups.google.cn/groups";
frmact[5]="http://ditu.google.cn/maps";
function GetIdx(idx) {
 frmact_idx=idx;
}

function trackA(o){
 var t = o.innerText ? o.innerText : o.textContent;
  try{
   new Image().src = "http://211.147.4.45:11288/url?a=A&u="+o.href+"&t="+t+"&r="+escape(top.location.href);
  }catch(ex){}
}

function GoThere(formname) {
 var url;
 var idx = frmact_idx;
 if (frmact[idx] == null || frmact[idx] == "")  idx = "1";
 url = frmact[idx];
 formname.method = "get";
 formname.action = url;
 var r = top.location.href;
 var u = formname.action.value+"?client="+formname.client.value+"&oe=UTF-8&hl=zh-CN&channel="+formname.channel.value;
 new Image().src="http://211.147.4.45:11288/url?a=S&u="+escape(u)+"&t="+escape(formname.q.value)+"&r="+escape(r);
 return true;
} 

function Srolling(lh,speed,delay) {
this.p=false;
var t;
var o=document.getElementById("LinkData");
o.innerHTML+=o.innerHTML;
o.style.marginTop=0;
o.onmouseover=function(){this.p=true;}
o.onmouseout=function(){this.p=false;}

this.startScroll=function(){
  t=setInterval(this.doScroll,speed);
  if(!this.p) o.style.marginTop=parseInt(o.style.marginTop)-1+"px";
 }
this.doScroll=function(){
   if(parseInt(o.style.marginTop)%lh!=0){
   o.style.marginTop=parseInt(o.style.marginTop)-1+"px";
   if(Math.abs(parseInt(o.style.marginTop))>=o.scrollHeight/2) o.style.marginTop=0;
   }else{
   clearInterval(t);
   setTimeout(this.startScroll,delay);
  }
 }
 setTimeout(this.startScroll,delay);
}


