var showListStyle="<li onmouseover=\"this.style.background='#8ACBE9'\" onmouseout=\"this.style.background=''\">"+"<font color=\"#E13E3F\" class=\"floatleft\">[{0}]</font>"+"<a href=\"http://{1}\" title=\"{2}\" target=\"_blank\" class=\"maxLen width110px\">{2}</a>"+"</li>";var fastOptListStyle="<li><a href=\"{0}\" title=\"{1}\" target=\"_blank\">{1}</a></li>";var locationListStyle="<li>"+"<span class=\"floatleft\">&nbsp;·</span>"+"<a href=\"{0}\" title=\"{1}\" target=\"_blank\" class=\"maxLen width150px\">{1}</a>"+"</li>";document.onclick=function(){if($("tc_showListDiv"))
$("tc_showListDiv").style.visibility="hidden";if($("tradeListDiv"))
$("tradeListDiv").style.visibility="hidden";}
function showLoginDiv()
{$("loginAdDiv").style.display=$("loginDiv").style.display=="none"?"none":"";$("loginDiv").style.display=$("loginDiv").style.display=="none"?"":"none";}
function showMyShow(e)
{if($("tradeListDiv"))
$("tradeListDiv").style.visibility="hidden";_cancelBubble(e);$("tc_showListDiv").style.visibility=$("tc_showListDiv").style.visibility=="visible"?"hidden":"visible";}
var allFastOpt=false;var oldMark=0;function showAllFastOpt(mark)
{if(allFastOpt==true&&oldMark==mark)
{$("tc_fastoptDiv"+cardType).style.height="48px";$("tc_locationDiv"+cardType).style.height="48px";$("tc_fastoptMark"+cardType).className="mark";$("tc_locationMark"+cardType).className="mark";allFastOpt=false;}
else if(mark==0)
{$("tc_fastoptDiv"+cardType).style.height="96px";$("tc_locationDiv"+cardType).style.height="0px";$("tc_fastoptMark"+cardType).className="mark1";$("tc_locationMark"+cardType).className="mark";allFastOpt=true;}
else
{$("tc_fastoptDiv"+cardType).style.height="0px";$("tc_locationDiv"+cardType).style.height="96px";$("tc_fastoptMark"+cardType).className="mark";$("tc_locationMark"+cardType).className="mark1";allFastOpt=true;}
oldMark=mark;}
function getTourCardDataList(cardtype)
{cardType=cardtype;$("pnlLogin").style.display="none";if(cardtype=="1")
{$("pnlCompanyLocation").style.display="";Show.Web.Skins.Source.TourCard.BindShowList(showListStyle,callbackBindShowList);}
else
$("pnlPersonalLocation").style.display="";Show.Web.Skins.Source.TourCard.BindMenuList(fastOptListStyle,tradeId,"1",callbackBindFastOptList);Show.Web.Skins.Source.TourCard.BindMenuList(locationListStyle,tradeId,menuType,callbackBindLocationList);}
function callbackBindShowList(res)
{$("tc_showListDiv").innerHTML=res.value;}
function callbackBindFastOptList(res)
{if(res.value==null){getTourCardDataList(cardType);return;}$("tc_fastoptDiv"+cardType).innerHTML=res.value;}
function callbackBindLocationList(res)
{if(res.value==null){getTourCardDataList(cardType);return;}$("tc_locationDiv"+cardType).innerHTML=res.value;}
function LoginCheck()
{if(Trim(txtLoginName.value)=="")
{txtLoginName.focus();alert("请输入用户名！");return false;}
else if(Trim(txtPassword.value)=="")
{txtPassword.focus();alert("请输入登陆密码！");return false;}
else
{Show.Web.Skins.Source.TourCard.LoginCheck(Trim(txtLoginName.value),Trim(txtPassword.value),$("chbremember").checked,tradeId,ComAdminUrl.hostUrl,callbackLoginCheck);return true;}}
function callbackLoginCheck(result)
{
var arr=result.value.split("&");
if(arr[0]=="-1")
{alert("帐号或密码无效,请重新输入！");}
else if(arr[0]=="-2")
{alert("对不起，该帐号在当前行业中无效！");}
else if(arr[0]=="0")
{alert("登录过程中遇到问题,请联系展览网客服！");}
else
{txtLoginName.value="";txtPassword.value="";if($("SupplyInfoDiv"))HideSupplyLogin();getTourCardDataList(arr[0]);

//设置展台后台Cookies
var oHead = document.getElementsByTagName("HEAD").item(0); 
var oScript= document.createElement("script"); 
oScript.type = "text/javascript"; 
oScript.src=arr[1];
oHead.appendChild(oScript); 

//设置论坛Cookies
var disScript= document.createElement("script"); 
disScript.type = "text/javascript"; 
disScript.src=arr[2];
oHead.appendChild(disScript); 
}
}
function LoginOut()
{Show.Web.Skins.Source.TourCard.LoginOut(callbackLoginOut);if($("SupplyInfoDiv"))ShowSupplyLogin();}
function callbackLoginOut(res)
{if(res.value==1)
{$("pnlLogin").style.display="";$("pnlCompanyLocation").style.display="none";$("pnlPersonalLocation").style.display="none";$("tc_fastoptDiv"+cardType).style.height="48px";$("tc_locationDiv"+cardType).style.height="48px";$("tc_fastoptMark"+cardType).className="mark";$("tc_locationMark"+cardType).className="mark";allFastOpt=false;}}
function GoToAdminUrl(url)
{openUrl(url);}