document.write(""); document.write(""); var adHelper = new function(){ this.bind = function(key, pos, param, isHide){ if(key == ""){ return; } try{IYP_AdObject(key, pos, param);} catch(e){} try{if(isHide == true) adHelper.hide(key, pos, param);}catch(e){} } this.hide = function(key, pos, param){ if(key && pos){ var date = new Date(); var optional = ''; if(param) for(var i in param) optional += '&' + i + '=' + encodeURIComponent(param[i]); var sUrl = adHelperDomain + "/adServer/adCount.ashx?jsoncallback=?&key=" + encodeURIComponent(key) + "&pos=" + encodeURIComponent(pos) + optional + "&seed=" + date.getTime(); $.getJSON(sUrl, function(jsonData){ if(jsonData == 0) $("#ad_" + pos).hide(); else $("#ad_" + pos).show(); }); delete date, optional,sUrl; } } this.hideAll = function(){ $(document).ready(function(){ $("div.adBanner").hide(); }); } this.showAll = function(){ $(document).ready(function(){ $("div.adBanner").show(); }); } }