﻿document.writeln("<center><table width='1002' border='0' align='center' cellpadding='0' cellspacing='0' class='header'>");
document.writeln("  <tr>");
document.writeln("    <td width='214' align='center'><a href='http://www.lenovomobile.com/'><img src='http://www.lenovomobile.com/images/logo.gif' width='174' height='19' border='0' /></a></td>");
document.writeln("    <td class='f_gray f_en10' align='left' style='padding-top: 4px;'><a href='http://www.lenovomobile.com/' class='a_gray'>简体</a>&nbsp;|&nbsp;<a href='/en' class='a_gray f_en10'>English</a></td>");
document.writeln("    <td>&nbsp;</td>");
document.writeln("	<td width='40' style='padding-top:1px;'></td>");
document.writeln("    <td width='173'><img src='http://www.lenovomobile.com/images/head_tel.gif' /></td>");
document.writeln("    <td width='130'><input name='ProductGlobalSearchkey' type='text' id='ProductGlobalSearchkey' class='box_head_search' value='请输入您的检索条件'  onFocus='GlobalTopClearSearch(this.value);' onKeyDown='GlobalTopSearchkeyDown(event)' /></td>");
document.writeln("    <td width='37'><input name='ProductGlobalSearch' type='button' value='' class='but_head_search'  onclick='if(GlobalTopSearchSubmit()){return false;}' id='ProductGlobalSearch'/></td>");
document.writeln("  </tr>");
document.writeln("</table>");
document.writeln("<table width='1002' border='0' align='center' cellpadding='0' cellspacing='0' class='menu' id='GMeun'>");
document.writeln("  <tr>");
document.writeln("    <td width='143'><a href='http://www.lenovomobile.com/'><img src='http://www.lenovomobile.com/images/MenuB/menu_home_n.gif' id='GMeun_img0' /></a></td>");
document.writeln("    <td width='143'><a href='http://www.lenovomobile.com/product/producthtml.aspx'><img src='http://www.lenovomobile.com/images/MenuB/menu_mobile_n.gif' id='GMeun_img1' /></a></td>");
document.writeln("    <td width='143'><a href='http://www.lenovomobile.com/product/phoneFittList.aspx'><img src='http://www.lenovomobile.com/images/MenuB/menu_acc_n.gif' id='GMeun_img2' /></a></td>");
document.writeln("    <td width='143'><a href='http://www.lenovomobile.com/support/support.aspx'><img src='http://www.lenovomobile.com/images/MenuB/menu_support_n.gif' id='GMeun_img3' /></a></td>");
document.writeln("    <td width='143'><a href='http://www.lenovomobile.com/experience.html'><img src='http://www.lenovomobile.com/images/MenuB/menu_exp_n.gif' id='GMeun_img4' /></a></td>");
document.writeln("    <td width='143'><a href='http://www.lenovomobile.com/customize/index.html'><img src='http://www.lenovomobile.com/images/MenuB/menu_customize_n.gif' id='GMeun_img6' /></a></td>");
document.writeln("    <td width='144'><a href='http://www.lenovomobile.com/phoneshow/sale.aspx'><img src='http://www.lenovomobile.com/images/MenuB/menu_sale_n.gif' id='GMeun_img5' /></a></td>");
//document.writeln("    <td>&nbsp;</td>");
document.writeln("  </tr>");
document.writeln("</table></center>");
var MeunData=[
{url:"http://www.lenovomobile.com/phoneshow/product.aspx?queryPhoneType=newphone",name:"最新机型",type:1},
{url:"http://www.lenovomobile.com/phoneshow/product.aspx",name:"全部机型",type:1},
{url:"http://www.lenovomobile.com/product/producthtml.aspx",name:"全部机型",type:1},
{url:"http://www.lenovomobile.com/product/oldlist.aspx",name:"以往机型",type:1},
{url:"http://www.lenovomobile.com/product/olddetail.aspx",name:"以往机型",type:1},
{url:"http://www.lenovomobile.com/product/phonedetail.aspx",name:"",type:1},
{url:"http://www.lenovomobile.com/product/phonefittlist.aspx",name:"原厂配件",type:2},
{url:"http://www.lenovomobile.com/product/phonefitt.aspx",name:"",type:2},
{url:"http://www.lenovomobile.com/product/phonefittbyphone.aspx",name:"",type:2},

{url:"http://www.lenovomobile.com/support",name:"",type:3},
{url:"http://www.lenovomobile.com/support/warranty_maintenance.html",name:"保修和维护",type:3},
{url:"http://www.lenovomobile.com/support/contact_us.html",name:"服务热线",type:3},
{url:"http://www.lenovomobile.com/itemdetail/support",name:"",type:3},
{url:"http://www.lenovomobile.com/experience.html",name:"",type:4},
{url:"http://www.lenovomobile.com/customize",name:"",type:6}
];

var url=location.href;
url=url.toLowerCase().replace("http://","");
var urlpath=url.substring(url.indexOf("/"));


function InitMeun()
{
   var bool=false;
   var as=document.getElementById("GMeun").getElementsByTagName("a");
   for(var i=0;i<as.length;i++)
   {
      var src=as[i].getElementsByTagName("img")[0].src;
      as[i].getElementsByTagName("img")[0].src=src.replace("_f.gif","_n.gif");
      as[i].getElementsByTagName("img")[0].onmouseover=function(){this.src=this.src.replace("_n.gif","_f.gif");};
      as[i].getElementsByTagName("img")[0].onmouseout=function(){this.src=this.src.replace("_f.gif","_n.gif");};
   }
   for(var i=0;i<MeunData.length;i++)
    {
       if(urlpath.indexOf(MeunData[i].url.toLowerCase())>=0)
       {
          bool=true;
          var src=document.getElementById("GMeun_img"+MeunData[i].type).src;
          document.getElementById("GMeun_img"+MeunData[i].type).src=src.replace("_n.gif","_f.gif");
          document.getElementById("GMeun_img"+MeunData[i].type).onmouseover=function(){};
          document.getElementById("GMeun_img"+MeunData[i].type).onmouseout=function(){};
          return;
       }
    }   
}

var TimeMeun=window.setTimeout('setMeun()',100)
function setMeun()
{
   if(document.getElementById("GMeun")){clearTimeout(TimeMeun);InitMeun();}
}
function GlobalTopSearchSubmit(){
if(document.getElementById('ProductGlobalSearchkey').value=='' || document.getElementById('ProductGlobalSearchkey').value=='请输入您的检索条件' ){
alert('请输入检索条件');
}
else
{
location.href='http://www.lenovomobile.com/search.aspx?key='+document.getElementById('ProductGlobalSearchkey').value;
}
return true;
}
function GlobalTopSearchkeyDown(evt) {
    var k = window.event ? evt.keyCode : evt.which;
        if   (k==13)   { 
           document.getElementById("ProductGlobalSearch").click();
        }
        else
        {
        return ;
        }
   
}
function GlobalTopClearSearch(txtString){
 if( document.getElementById('ProductGlobalSearchkey').value=='请输入您的检索条件'){document.getElementById('ProductGlobalSearchkey').value='';}
}
