﻿
    var number=6;

    function LMYC() {
    var lbmc;
        for (i=0;i<=number;i++) {
            lbmc = document.getElementById('LM' + i);
            lbmc.style.display = 'none';
            $("MU" + i).className="";
            
        }
    }
     
    function ShowFLT(i) {
        lbmc =document.getElementById('LM' + i);
        if (lbmc.style.display == 'none') {
            LMYC();
            lbmc.style.display = '';
        }
        else {
            lbmc.style.display = 'none';
        }
        $("MU" + i).className="maishou_left_menunow";
        
        UpdateTips();
        __doPostBack('lnkBtnPost','');
    }
    
    function ShowFltAlbum()
    {
        var i=6;
        lbmc = eval('LM' + i);
        if (lbmc.style.display == 'none') {
            LMYC();
            lbmc.style.display = '';
        }
        else {
            lbmc.style.display = 'none';
        }
        $("MU" + i).className="maishou_left_menunow";
    }

    
    function scrollwin()
    { 
          window.scrollTo(0,0);
    } 
 
    
    
    function  open_SendMes(){
     document.getElementById("SendMes").style.display="block";
	 document.getElementById("Mesdi").style.display="block";
  
  }
  
    function  close_SendMes(){
     document.getElementById("SendMes").style.display="none";
	 document.getElementById("Mesdi").style.display="none";
  

  }
  
  
  var oldID="oldBrand";
  function setBrandStyle(thenID)
  {
    var oldCss="";
        var newCsll="maishou_menutwo";
        if(document.getElementById(oldID)!=null)
        {
            document.getElementById(oldID).className=oldCss;
        }
        if(document.getElementById(thenID)!=null)
        {
            document.getElementById(thenID).className=newCsll;
        }
        oldID=thenID;
    
  }
  
  var countSpace="oldBrand";
  
  
  function loadBrand()
    {
        getBrandItems(0,20,'getAllBrand',0,'allBrand');
        ShowFLT(4);
        BrandCount('HistoryCount','getHistoryBrand',0);
        
    }
  function BrandCount(spanCount,act,brandType) {
        countSpace=spanCount;
        PageMethods.BrandItemsCount(act,brandType,OnCountOK);
    }

  function OnCountOK(result) {
        $get(countSpace).innerHTML ="共" +  result + "个";
        
    }



        function ShowDialog(logId) {
            PageMethods.GetLogInfo(logId, SetLogInfo);
        }
        function SetLogInfo(res) {
            logInfo = Sys.Serialization.JavaScriptSerializer.deserialize(res);
            $get("h1Title").innerText = logInfo.Title;
            $get("iDate").innerText = logInfo.CreateTime.format("yyyy-MM-dd");
            $get("imgCover").src = logInfo.CoverImg;
            $find("ctl00_modalPnl").show();
        }
        function biaodan_open_new() {
            document.getElementById("biaodan_top").style.display = "block";
            document.getElementById("biaodan_di").style.display = "none";

        }
        
        // 注册提交
        function EnterPressed(e) {
            if (window.event) // IE
            {
                keynum = e.keyCode;
            }
            else if (e.which) // Netscape/Firefox/Opera
            {
                keynum = e.which;
            }

            if (keynum == 13)
                __doPostBack("btnOK", "");
        }

        function saveTrialInfo() {
            strDesc = "希望了解的资讯：";
            strDesc += $get("chkTrend").checked ? "流行趋势," : "";
            strDesc += $get("chkStyle").checked ? "服装款式," : "";
            strDesc += $get("chkTrappings").checked ? "配饰/鞋包," : "";
            strDesc += $get("txtOtherInfo").value;
            PageMethods.SaveTrialInfo($get("txtCompany").value, $get("txtContact").value, $get("txtTel").value, strDesc, SaveTrialInfoOK);
        }
        function SaveTrialInfoOK(result) {
            alert(result);
            location.href = "/brand/BuyerServer.aspx";
        }
        
          function  open_new(){
     document.getElementById("menu_top").style.display="block";
  
  }
  
    function  close_new(){
     document.getElementById("menu_top").style.display="none";
  }
  
  function EnterPressedPop(e) {
    if (window.event) // IE
    {
        keynum = e.keyCode;
    }
    else if (e.which) // Netscape/Firefox/Opera
    {
        keynum = e.which;
    }

    if (keynum == 13)
    {
        alert("登录");
        __doPostBack("btnTipsOK", "");
        //document.getElementById("btnTipsOK").click();
       
    }
}
