function setRefreshAd(b,a){for(adIdx in adAAMBs){if("AAMB"+adAAMBs[adIdx]==b){refreshAd[adIdx]=a=="yes"?true:false}}}function InsertAd(c,d,b){var a=String(c).toUpperCase();if((a.indexOf("BLANK AD")==-1)&&(a.indexOf("GOOGLE")==-1)&&(a.indexOf("ENGINE.GIF")==-1)&&(a.indexOf("BLANKHTML")==-1)){document.writeln('<div class="ad">');document.writeln('<div class="'+d+'" id="'+b+'">');c()}else{if(a.indexOf("GOOGLE")>-1){document.writeln('<div class="google_'+d+'" id="'+b+'">');c()}else{document.writeln("<!-- Blank Ad Suppressed -->")}}}function InsertAdEnd(c,d,b){var a=String(c).toUpperCase();if((a.indexOf("BLANK AD")==-1)&&(a.indexOf("GOOGLE")==-1)&&(a.indexOf("ENGINE.GIF")==-1)&&(a.indexOf("BLANKHTML")==-1)){document.writeln("</div></div>")}else{if(a.indexOf("GOOGLE")>-1){document.writeln("</div>")}else{document.writeln("<!-- Blank Ad Suppressed -->")}}}function GetAdsFromServer(){clearTimeout(adRefreshTimer);var oScript=document.createElement("script");var adstr="";adRefreshStr="";for(adIdx in adAAMBs){if(refreshAd[adIdx]==true){var strAdIdx=adIdx.toString();adRefreshStr=adRefreshStr+eval("ad"+strAdIdx)}}adRefreshStr=adRefreshStr+"?";aamRnd=Math.round(Math.random()*10000000000);allAdTags="/BSERVERS/AAMALL/ACC_RANDOM="+aamRnd+"/SITE="+siteName+"/PAGEID="+aamRnd+"/AREA="+adarea;adRefreshTimer=setTimeout("displayLoadedAds()",0.25*mins2MilliSecs);oScript.src=adserver+allAdTags+adRefreshStr;document.body.appendChild(oScript)}function prepareAdHTML(i,h){var c="",a="";var e=i.toUpperCase();var g=h.title;c=g.substr(0,g.indexOf(","));a=g.substring(g.indexOf(",")+1,g.length);var j="";if((e.indexOf("BLANK AD")==-1)&&(e.indexOf("GOOGLE")==-1)&&(e.indexOf("ENGINEERROR.GIF")==-1)&&(e.indexOf("ENGINE.GIF")==-1)&&(e.indexOf("BLANKHTML")==-1)&&(e.indexOf("NO_AD.GIF")==-1)){if(e.indexOf("DOCUMENT.WRITE")>-1){var d=document.getElementById("ifr_"+a);if(!d){var f;f=document.getElementById(a);f.innerHTML="<iframe id='ifr_"+a+"' src='about:blank' frameborder='0' marginheight='0' marginwidth='0' scrolling='no' width='300' height='90' visibility='hidden' onload='if (window.parent && window.parent.autoIframe) window.parent.autoIframe(\"ifr_"+a+"\");' ></iframe>";d=document.getElementById("ifr_"+a)}var b=d.contentWindow||iframe.contentDocument;if(b.document){b=b.document}b.open();b.write(i);b.close();if(!jQuery.support.scriptEval){d.contentWindow.location.reload(true)}d.setAttribute("visibility","visible")}else{var f=document.getElementById(a);if(f){f.innerHTML=i}}}}function displayLoadedAds(){clearTimeout(adRefreshTimer);var adIdx;for(adIdx in adAAMBs){if(refreshAd[adIdx]==true){var AdCount=adAAMBs[adIdx];eval("var Adstr=this.AAMB"+AdCount);var tmpStr="</script>";var ScriptEnd=-1;var $MyDiv;$MyDiv=document.getElementById("divAAMB"+adAAMBs[adIdx]);prepareAdHTML(Adstr,$MyDiv)}}adRefreshTimer=setTimeout("GetAdsFromServer()",refreshTime*mins2MilliSecs)}function autoIframe(b){try{iframe=document.getElementById(b);if(iframe.contentWindow){iframe.height=iframe.contentWindow.document.body.scrollHeight;iframe.width=iframe.contentWindow.document.body.scrollWidth;iframe.contentWindow.document.body.style.padding=0;iframe.contentWindow.document.body.style.border=0;iframe.contentWindow.document.body.style.margin=0;iframe.contentWindow.document.body.clientTop=0;iframe.contentWindow.document.body.clientLeft=0}else{if(iframe.contentDocument){iframe.height=iframe.contentDocument.body.scrollHeight;iframe.width=iframe.contentDocument.body.scrollWidth;iframe.width=iframe.contentDocument.body.padding=0;iframe.width=iframe.contentDocument.body.border=0;iframe.width=iframe.contentDocument.body.clientTop=0;iframe.width=iframe.contentDocument.body.clientLeft=0}}}catch(a){}};
