function header(id,sid,url){
     var topMenu = ["首页","店铺管理","商品管理","订单管理","会员管理","信息管理","配置信息","扩展功能"];
     var topMenuImg = ["8.gif","1.gif","2.gif","4.gif","3.gif","5.gif","6.gif","10.gif"];
     var topMenuUrl = ["../admin/default.aspx","../admin/ShopList.aspx","../admin/Commodity_List.aspx","../admin/Orderlist.aspx","../admin/UserList.aspx","../admin/ArticleList.aspx","../admin/Title.aspx","../admin/Cnzz.aspx"];
     var secontMenu1 = ["系统信息","网站信息","商品分类","商品品牌","商品添加","商品管理","订单管理","付款通知","会员管理","操作日志",""] ;
     var secondMenuUrl1 = ["Default.aspx","Title.aspx","CommonityType.aspx","Brandlist.aspx","Commodity_Add.aspx","Commodity_List.aspx","Orderlist.aspx","Orderlist.aspx?state=0","UserList.aspx","AdminLogList.aspx",""];
     var secondMenu2 = ["店铺管理","类型管理","提现管理","店铺开通","回收站"];
     var secondMenuUrl2 = ["ShopList.aspx","ShopLevellist.aspx","Withdrawlist.aspx","ShopApproval.aspx","ShopListR.aspx"];
     var secondMenu3 = ["商品管理","分类管理","品牌管理","单位管理"];
     var secondMenuUrl3 = ["Commodity_List.aspx","CommonityType.aspx","Brandlist.aspx","Unitlist.aspx"];
     var secondMenu4 = ["订单管理","订单查询"];
     var secondMenuUrl4 = ["Orderlist.aspx","OrderFormSelect.aspx"]; 
     var secondMenu5 = ["会员管理","充值管理","实名认证"];
     var secondMenuUrl5 =  ["UserList.aspx","Accounts.aspx","Realnamelist.aspx"];
     var secondMenu6 = ["文章管理","文章类别","邮件营销","站内留言","帮助中心","回帖管理"];
     var secondMenuUrl6 =  ["ArticleList.aspx","ArticleTypeList.aspx","Admin_mail_tpl.aspx","AdminMessage_List.aspx","NoticeList.aspx","ForumList.aspx"];
     var secondMenu7 = ["网站信息","账号管理","在线支付","友情链接","标签广告","首页广告","导航设置","水印设置","关键字管理","系统管理"];
     var secondMenuUrl7 =  ["Title.aspx","AdminList.aspx","Onpaylist.aspx","FriLinks.aspx","Adv.aspx","AdvIndexList.aspx","TabList.aspx","WaterConfig.aspx","SearchKeyList.aspx","Corp.aspx"]; 
     var secondMenu8 = ["CNZZ统计","站点地图"];
     var secondMenuUrl8 =  ["Cnzz.aspx","Maps.aspx"]; 
     var secondMenu = [secontMenu1,secondMenu2,secondMenu3,secondMenu4,secondMenu5,secondMenu6,secondMenu7,secondMenu8];
     var secondMenuUrl = [secondMenuUrl1,secondMenuUrl2,secondMenuUrl3,secondMenuUrl4,secondMenuUrl5,secondMenuUrl6,secondMenuUrl7,secondMenuUrl8];
     var strs = "";
     strs = "<div class=\"head\">\n\r<div class=\"logo\"><img style=\"border-right-width: 0px; width: 227px; border-top-width: 0px; border-bottom-width: 0px;height: 53px; border-left-width: 0px\" src=\""+url+"Logo多用户.jpg\"><span><a id=\"ctl00_hlinkDefault\" href=\"../Default.aspx\" style=\"color:#FFFFFF; margin-top:5px;\"  target=\"_blank\">  商城首页</a></span><p>欢迎您，<span id=\"ctl00_lblUserName\">"+getCookie("adminUserName")+"</span> [<strong><a id=\"ctl00_hlinkLogout\"href=\"AdminLoginOut.aspx\">退出</a></strong>] <a href=\"http://www.lbmall.cn/service\" target=\"_blank\">购买咨询</a>-<a href=\"http://www.lbmall.cn/bbs\" target=\"_blank\">帮助中心</a></p> </div></div> ";
     strs += "<div class=\"fathermenu clearfix\"><div class=\"menus\"><div class=\"menutab\"><ul class=\"clearfix\">";
     for(var i=0;i<topMenu.length;i++){
        if(i==id){
           strs+="<li class=\"current\"><a href=\""+topMenuUrl[i]+"\"><span><img src=\""+url+topMenuImg[i]+"\">"+topMenu[i]+"</span></a> </li>"; 
        }else{
             strs+="<li><a href=\""+topMenuUrl[i]+"\"><span><img src=\""+url+topMenuImg[i]+"\">"+topMenu[i]+"</span></a> </li>"; 
            }
     }
     strs +=" </ul></div></div></div>";
     strs +="<div class=\"parentmenu clearfix\"><div class=\"menus\"><div class=\"menutab\"><ul class=\"clearfix\">";
   
     for(var i = 0;i< secondMenu[id].length ; i++){
        if(i==sid){
           strs +="<li class=\"visited\"><a href=\""+secondMenuUrl[id][i]+"\"><span>"+secondMenu[id][i]+"</span></a> </li>"; 
        }else{
            strs +="<li><a href=\""+secondMenuUrl[id][i]+"\"><span>"+secondMenu[id][i]+"</span></a> </li>"; 
        }
     }
     strs +=" </ul></div></div></div>";
     document.write(strs);
}

function tdshowm(obj,arr)
{   
    var cArr = arr||["#fff","#f8fbfd","#D2EFFF"];
    var trArr=document.getElementById(obj).getElementsByTagName("tr");
    for(var i=0,j=trArr.length;i<j;i++)
    {
        var o=trArr[i];
        o.style.backgroundColor=cArr[i%2];
        o.onmouseover=function(){this.style.backgroundColor=cArr[2];}
        o.onmouseout=function(){this.style.backgroundColor=cArr[this.sectionRowIndex%2];}
    }
}

var getCookie=function(objName){//获取指定名称的cookie的值 
    var name = ""; 
    var arrStr = document.cookie.split(";");
    for(var i = 0;i < arrStr.length;i++){ 
        var temp = arrStr[i].split("="); 
        if(temp[0].replace(/(^\s*)|(\s*$)/g, "")==objName){
            name = temp[1];
            break;
        }    
    } 
//    if(name==null||name==""){
//        alert("您还没有登陆或登陆超时， 请重新登陆！");
//        window.location.href("../admin/Login.aspx");
//    } 
    return name;       
};        