﻿// JScript 文件

function serachurl(id,scode)
{
    window.top.location.href='command.aspx?id='+id+'&scode='+scode;
}
function searchpro()
{
    var str=document.getElementById("textfield").value.replace(/\s+/g,"");
     if(str=="")
       {
         alert("请输入检索关键字");
         return;
       }
    var query = document.getElementById("textfield").value;
   var s = encodeURIComponent(query);
   location.href="http://search.lenovo.com.cn/lenovo/searchMain.jsp? moreHitsFromSite=&category=&similarTo=&similarType=find&breadcrumb=&old_query=&keywords=&sortBy1=&findInResult=&filter=&sortOrder1=&sortOrder2=&collapseField=&scopeSearchField=&queryLanguage=zh&numHits=10&offset=0&query="+s;
}

function searchString(str)
{
   var s = encodeURIComponent(str);
   location.href="http://search.lenovo.com.cn/lenovo/searchMain.jsp? moreHitsFromSite=&category=&similarTo=&similarType=find&breadcrumb=&old_query=&keywords=&sortBy1=&findInResult=&filter=&sortOrder1=&sortOrder2=&collapseField=&scopeSearchField=&queryLanguage=zh&numHits=10&offset=0&query="+s;
}

function onkeypresssubmit(event)
{
	if (event.keyCode==13){
	    var str=document.getElementById("textfield").value.replace(/\s+/g,"");
       if(str=="")
       {
         alert("请输入检索关键字");
         return false;
       }
       
	   var query = document.getElementById("textfield").value;
       var s = encodeURIComponent(query);
	   location.href="http://search.lenovo.com.cn/lenovo/searchMain.jsp? moreHitsFromSite=&category=&similarTo=&similarType=find&breadcrumb=&old_query=&keywords=&sortBy1=&findInResult=&filter=&sortOrder1=&sortOrder2=&collapseField=&scopeSearchField=&queryLanguage=zh&numHits=10&offset=0&query="+s;
	   return false;
	}

}
function GetPath3()
{
var strPath3="";
if(location.pathname.indexOf('web')==-1)
{
strPath3=location.protocol+"//"+location.host
}
else
{
strPath3=location.protocol+"//"+location.host+"/"+"web"
}
return strPath3; 

}
var path3=GetPath3();

document.write(" <div id='home_h_ri_top' style='z-index:-1'>");
document.write("<ul>");
document.write("<li class='aa'>");
document.write("<input class='input1' name='textfield' type='text' id='textfield' onkeypress='return onkeypresssubmit(event);' onmouseout='this.blur();' />");
document.write("</li>");
document.write("<li class='ab'><a href='#' onclick='searchpro();'>");
document.write("<img src='"+path3+"/shop/miages/go.jpg' width='62' height='22' /></a></li>");
document.write("</ul>");
document.write("<p>");
document.write("<a href='"+path3+"/shop/Shop_list.aspx?type=0&amp;rackcode=1'>笔记本</a>&nbsp;|&nbsp;");
document.write("<a href='"+path3+"/Lenovo_lepadSeries_List.aspx?CategoryCode=A21B03' target='blank'>乐Pad</a>&nbsp;|&nbsp;");
document.write("<a href='"+path3+"/shop/Shop_list.aspx?type=1&amp;rackcode=A03B07C13'>Y系列</a>&nbsp;|&nbsp;");
document.write("<a href='"+path3+"/shop/Shop_list.aspx?type=2&amp;rackcode=B'>特惠</a>&nbsp;|&nbsp;");
document.write("<a href='"+path3+"/shop/Shop_list.aspx?type=1&amp;rackcode=A07b04'>电脑周边 </a>");
document.write("</p>");
document.write("</div>");
