var currentCity = window.external.GetCity() || ""; var getJson = window.external.GetCloseButtonJson() || ""; var closeRule = "",otherRule =""; if(getJson){ var allCloseRule = JSON.parse(getJson); closeRule = allCloseRule[currentCity] || ""; otherRule = allCloseRule.others || ""; } function getCloseImg(type){ var defaultImg = "14"; switch(type){ case "dianshang": defaultImg = "14"; break; case "dsp": defaultImg = "8"; break; case "zhike": defaultImg = "8"; break; default: defaultImg = "14"; } var imgName = defaultImg; if(closeRule[type] && closeRule[type].level){ imgName = closeRule[type].level; }else if(otherRule[type] && otherRule[type].level){ imgName = otherRule[type].level; }else{ imgName = defaultImg; } var imgUrl = "../../libs/images/closebutton/"+imgName+".png"+"?v="+new Date().getTime(); return imgUrl; } function closePanel() { $('.close-panel').hide(); window.open('tag=boring'); } function showPanel() { if(ProjectConfig.GetQueryString('pop_menu') == 1){ $('.close-panel').show(); }else{ $('.close-panel').hide(); window.open('tag=close') } } function closeWindow(){ window.open('tag=close'); }