﻿function GetPath()
{
var strPath="";
if(location.pathname.indexOf('web')==-1)
{
strPath=location.protocol+"//"+location.host
}
else
{
strPath=location.protocol+"//"+location.host+"/"+"web"
}
return strPath; 

}

var Path=GetPath();

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;
	}
}

document.write("<div   id=\"head_top\" class=\"top\">")
document.write("<div class=\"logo\"><a href=\"http://www.lenovo.com.cn/\"><img src=\""+Path+"/shop/image/logo.gif\" width=\"216\" height=\"23\" border=\"0\" /></a></div>")
document.write("<div class=\"store_online\"><a href=\""+Path+"/shop/index.aspx\"><img src=\""+Path+"/shop/image/store_online.gif\" width=\"130\" height=\"58\" border=\"0\" /></a></div>")


if(location.pathname.toLowerCase().indexOf('lenovoshop03_cto.aspx')==-1)
{
document.write("<div class=\"store_tel\"><img src=\""+Path+"/shop/image/store_tel.gif\" width=\"295\" height=\"35\" border=\"0\" /></div>")
}else{
document.write("<div class=\"store_tel\"><img src=\""+Path+"/shop/image/store_tel_cto.gif\" width=\"295\" height=\"35\" border=\"0\" /></div>")
}


document.write(" <div id='loginInfo_lenovo' class='logoutdiv'></div>")

document.write(" <style>")
document.write(" 		.store_head .top .logoutdiv { width:400px; height:16px; position:absolute; z-index:100; top:69px; right:358px; text-align:right;}")
document.write(" 		.store_head .top .logoutdiv span { margin-right:21px; color:#ff8119; font-weight:bold;}")
document.write(" 		.store_head .top .logoutdiv a:link { color:#0688be;}")
document.write(" 		.store_head .top .logoutdiv a:hover { color:#0688be; text-decoration:underline;}")
document.write(" </style>  ")

document.write("</div>")
document.write("<div class=\"flower\">&nbsp;</div>")
document.write("<div class=\"nav\">	<ul class=\"MainMenu_ul\">")
document.write("<li class=\"line\">&nbsp;</li>")
document.write("<li  id=\"m_1\" class=\"nav_li\"  ><a href=\""+Path+"/shop/index.aspx\"><img src=\""+Path+"/shop/image/nav_index.gif\"alt=\"商城首页\" width=\"59\"height=\"26\" border=\"0\"/></a></li>")
document.write("<li class=\"line\">&nbsp;</li>")
document.write("<li id=\"m_2\" class=\"nav_li\"  ><img src=\""+Path+"/shop/image/nav_2.gif\" width=\"120\" height=\"29\" alt=\"笔记本电脑\" /></li>")
document.write("<li class=\"line\">&nbsp;</li>")
document.write("<li id=\"m_3\" class=\"nav_li\" ><img src=\""+Path+"/shop/image/nav_3.gif\" width=\"101\" height=\"29\" alt=\"台式电脑\" /></li>")
document.write("<li class=\"line\">&nbsp;</li>")
document.write("<li id=\"m_4\" class=\"nav_li\" ><img src=\""+Path+"/shop/image/nav_4.gif\" width=\"99\" height=\"29\" alt=\"特惠专区\" /></li>")
document.write("<li class=\"line\">&nbsp;</li>")
document.write("<li id=\"m_7\" class=\"nav_li\" ><a href=\""+Path+"/shop/LenovoShop03_MainPage_fq.aspx\"><img src=\""+Path+"/shop/image/nav_7.gif\" width=\"60\" height=\"29\" border=\"0\" alt=\"网上分期\" /></a></li>")
document.write("<li class=\"line\">&nbsp;</li>")
document.write("<li id=\"m_5\" class=\"nav_li\"  ><a href=\""+Path+"/member/my_account.aspx\"><img src=\""+Path+"/shop/image/nav_5.gif\" width=\"57\" height=\"29\" border=\"0\"alt=\"我的账户\"/></a></li>")
document.write("<li class=\"line\">&nbsp;</li>")
document.write("<li id=\"m_6\" class=\"gwc\"  ><a href=\""+Path+"/shop/LenovoShop_ShopCart.aspx\"><img src=\""+Path+"/shop/image/nav_6.gif\" width=\"76\" height=\"35\"border=\"0\"/></a></li>")
document.write("</ul>")
document.write("<div  id=\"ShortMenu\" class=\"store_affiliate_menu\"><a href=\"http://www.lenovo.com.cn/\">联想首页</a> | <a href=\""+Path+"/member/Login.aspx\">登录</a> | <a href=\""+Path+"/member/Login.aspx\">注册</a> | <a href=\""+Path+"/member/Login.aspx\">会员专区</a> | <a href=\""+Path+"/Lenovo_help.aspx\">帮助中心</a></div>")






document.write("<div id='menunav'>")   
document.write("<div id='navDiv'>")
document.write("<!--m1-->")
document.write("<div id='m1' class='mDiv'  >")
document.write("<div id='nav_left1'>&nbsp;</div>")
document.write("<div id='nav_right1'>&nbsp;</div>")
document.write("<div id='nav_bottom1'>&nbsp;</div>")
document.write("<div class='subnav'>")
document.write("<div class='notebook'>")
document.write("<h1><font color='#ffffff'>笔记本电脑</font></h1>")
document.write("<ul>")
document.write("<li><a href='"+Path+"/shop/Shop_list.aspx?type=0&rackcode=1' class='subimg'><img src='"+Path+"/lenovoImage/Lenovo_index_grow_45.jpg'  border='0' width='75' height='21' /></a></li>")
document.write("<li class='frist'><span>影音娱乐<br />")
document.write("强悍性能</span><a href='"+Path+"/shop/Shop_list.aspx?type=1&rackcode=A03B07C13'><b>Y</b> 系列</a></li>")
document.write("<li><span>时尚超薄<br />")
document.write("长效续航</span><a href='"+Path+"/shop/Shop_list.aspx?type=1&rackcode=A03B07C12'><b>U</b> 系列</a></li>")	
document.write("<li><span>超级便携<br />")
document.write("多彩互联</span><a href='"+Path+"/shop/Shop_list.aspx?type=1&rackcode=A03B07C14'><b>S</b> 系列</a></li>")
document.write("<li><span>新潮时尚<br />")
document.write("影音劲享</span><a href='"+Path+"/shop/Shop_list.aspx?type=1&rackcode=A03B07C16'><b>Z</b> 系列</a></li>")

document.write("</ul>")
document.write("<div class='menu_line' ></div>")

document.write("<ul>")
document.write("<li  class='title'>Lenovo</li>")
document.write("<li class='frist'><span>超值实用<br/>")
document.write("稳定耐用</span><a href='"+Path+"/shop/Shop_list.aspx?type=1&rackcode=A03B08'><b>G</b>系列</a></li>")
document.write("<li class='menu_line_x'></li>")
document.write("<li><a href='"+Path+"/shop/Shop_list.aspx?type=2&rackcode=B'><b>商城特惠系列</b></a></li>")
document.write("</ul>")

document.write("</div>")

document.write("</div>")
document.write("<div class='other_nav'>&nbsp;</div>")
document.write("</div>")
document.write("<!--m1 End-->")
document.write("<!--m2-->")
document.write("<div id='m2' class='mDiv1'   >")
document.write("<div id='nav_left2'>&nbsp;</div>")
document.write("<div id='nav_right2'>&nbsp;</div>")
document.write("<div id='nav_bottom2'>&nbsp;</div>")
document.write("<div class='subnav'>")
document.write("<div class='business-note'>")
document.write("<h1><font color='#ffffff'>台式机电脑 </font></h1>")

document.write("<ul>")
document.write("<li><a href='"+Path+"/shop/Shop_list.aspx?type=0&rackcode=4' class='subimg'><img src='"+Path+"/lenovoImage/Lenovo_index_person_46.jpg' width='93' height='23' /></a></li>")
document.write("<li class='frist'><span>圆成长梦</span><a href='"+Path+"/shop/Shop_list.aspx?type=1&rackcode=A01B37'><b>新圆梦F</b></a></li>")
document.write("<li class='frist'><span>游戏设计</span><a href='"+Path+"/shop/Shop_list.aspx?type=1&rackcode=A01B32C05'><b>锋行 King</b></a></li>")
document.write("<li  class='title'>Lenovo</li>")
document.write("<li class='frist'><span>时尚教育</span><a href='"+Path+"/shop/Shop_list.aspx?type=1&rackcode=A01B36'><b>家悦 i</b></a></li>")
document.write(" </ul>"); 

document.write("<div class='menu_line' ></div>")
document.write("</div>")   
document.write("<div class='business-desk'>")
document.write("<h1><font color='#ffffff'>一体台式电脑 </font></h1>")
document.write("<ul class='ul164'>")
document.write("<li ><a href='"+Path+"/shop/Shop_list.aspx?type=0&rackcode=4' class='subimg'><img src='"+Path+"/lenovoImage/Lenovo_index_person_46.jpg' width='93' height='23' /></a></li>")
document.write("<li class='frist'><span>娱乐旗舰</span><a href='"+Path+"/shop/Shop_list.aspx?type=1&rackcode=A18B08'><b>A7</b>系列</a></li>")
document.write("<li class='frist'><span>时尚科技</span><a href='"+Path+"/shop/Shop_list.aspx?type=1&rackcode=A18B01'><b>A6</b>系列</a></li>")
document.write("<li class='frist'><span>至清至薄</span><a href='"+Path+"/shop/Shop_list.aspx?type=1&rackcode=A18B05'><b>A3</b>系列</a></li>")
document.write("<li class='frist'><span>澎湃性能</span><a href='"+Path+"/shop/Shop_list.aspx?type=1&rackcode=A18B04'><b>B5</b>系列</a></li>")
document.write("<li class='frist'><span>新潮娱乐</span><a href='"+Path+"/shop/Shop_list.aspx?type=1&rackcode=A18B09'><b>B3</b>系列</a></li>")
document.write("<li  class='title'>Lenovo</li>")
document.write("<li class='frist'><span>全能一体</span><a href='"+Path+"/shop/Shop_list.aspx?type=1&rackcode=A18B07'><b>C2</b>系列</a></li>")
document.write("</ul>")
document.write("</div>")   
document.write("</div>")
document.write("<div class='other_nav'>&nbsp;</div>")
document.write("</div>")
document.write("<!--m2 End-->")
document.write("<!--m3-->")
document.write("<div id='m3' class='mDiv2' >")
document.write("<div id='nav_left3'>&nbsp;</div>")
document.write("<div id='nav_right3'>&nbsp;</div>")
document.write("<div id='nav_bottom3'>&nbsp;</div>")
document.write("<div class='subnav'>")
document.write("<div class='printer'>")
document.write("<h1><a href='#' >&nbsp; </a></h1>")
document.write("<ul>")
document.write("<li><a href=http://appserver.lenovo.com.cn/promotion/z/index.html target='_blank'>Z470多彩新品上市! </a></li>")
document.write("<li><a href=http://appserver.lenovo.com.cn/promotion/xs/index.html target='_blank'>联想学生特惠促销季</a></li>")
document.write("<li><a href=http://appserver.lenovo.com.cn/promotion/y/index.html target='_blank'>彪悍的小Y，霸气外露，最高直降1000元！</a></li>")
document.write("</ul>")              
document.write("</div>")
document.write("</div>")
document.write("<div class='other_nav'>&nbsp;</div>")
document.write("</div>")

document.write("<!--m3 end -->")

document.write("<!--网上分期 m4-->")
document.write("<div id='m4' class='mDiv3' >")
        document.write("<div id='nav_left4'>&nbsp;</div>")
        document.write("<div id='nav_right4'>&nbsp;</div>")
        document.write("<div id='nav_bottom4'>&nbsp;</div>") 
            document.write("<div class='subnav'>")
                document.write("<div class='printer'>")
                    document.write("<h1><a href='#' >&nbsp; </a></h1>")
                    document.write("<ul>")
                    document.write("<li><a href='http://shop.cmbc.com.cn/feature/zt/0511lenovo.htm' target='_blank'>联想盛大入驻民生商城  华丽促销中</a></li>")
                    document.write("<li><a href='https://creditcard.ecitic.com/eshop/advertise/1755/index.html' target='_blank'>联想6月盛夏，款款本本冰点价</a></li>")
                    document.write("<li><a href='http://appserver.lenovo.com.cn/shop/LenovoShop03_Shop_list_fq.aspx?bankcode=icbc' target='_blank'>新品上市 霸气外露--联想彪悍小Y第三代</a></li>")
                    document.write("</ul>")              
                document.write("</div>")
            document.write("</div>")
        document.write("<div class='other_nav'>&nbsp;</div>")
document.write("</div>")

document.write("<!--m4 end -->")

document.write("</div>")
document.write("</div>")
document.write("</div>")

if(location.pathname.toLowerCase().indexOf('lenovoshop03_mainpage_fq.aspx')==-1
&&location.pathname.toLowerCase().indexOf('lenovoshop03_shop_list_fq.aspx')==-1
&&location.pathname.toLowerCase().indexOf('shop_detail_fq.aspx')==-1
)
{
document.write("<table width=\"1003\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"search\">")
document.write("<tr>")
document.write("<td width=\"165\"><img src=\""+Path+"/shop/image/store_search.gif\" width=\"127\" height=\"23\" hspace=\"15\" vspace=\"8\" align=\"absmiddle\" /></td>")
document.write("<td width=\"269\"><input name=\"textfield\" type=\"text\" id=\"textfield\" class=\"searchinput\" onkeypress='return onkeypresssubmit(event);' /></td>")
document.write("<td width=\"127\"><input type=\"button\" name=\"button\" id=\"button\" value=\" \" class=\"searchbutton\" onclick=\"searchpro();\" /></td>")
//document.write("<td class=\"searchhot\">热点搜索：<a href='#' onclick=\"searchString('ideapad');\">ideapad</a> <a href='#' onclick=\"searchString('一体台式电脑');\">一体台式电脑</a> <a href='#' onclick=\"searchString('扬天');\">扬天</a> <a href='#' onclick=\"searchString('大学生');\">大学生</a> <a href='#' onclick=\"searchString('特惠');\">特惠</a> <a href='#' onclick=\"searchString('电脑周边');\">电脑周边 </a></td>")
document.write("<td class=\"searchhot\">热点搜索：<a href='http://appserver.lenovo.com.cn/shop/Shop_list.aspx?type=0&rackcode=1'>ideapad</a> <a href='http://appserver.lenovo.com.cn/shop/Shop_list.aspx?type=0&rackcode=1'>笔记本</a> <a href='http://appserver.lenovo.com.cn/Lenovo_lepadSeries_List.aspx?CategoryCode=A21B03' target=blank><font color='red'>乐Pad</font></a> <a href='http://appserver.lenovo.com.cn/shop/Shop_list.aspx?type=1&rackcode=A03B07C13'>Y系列</a> <a href='http://appserver.lenovo.com.cn/shop/Shop_list.aspx?type=2&rackcode=B'>特惠</a> <a href='http://appserver.lenovo.com.cn/shop/Shop_list.aspx?type=1&rackcode=A07b04'>电脑周边 </a></td>")
document.write("</tr>")
document.write("</table>")
}

