var bmone2n={positions: 		new Object(),adRepository:	new Object(),oldErrHandler:  null,blockErrors: function(){if(typeof _bbdebug=="undefined"){if(! this.oldErrHandler)this.oldErrHandler=window.onerror;window.onerror=this.failGracefully;}},unblockErrors: function(){if(typeof _bbdebug=="undefined"){window.onerror=this.oldErrHandler;}},failGracefully: function(){return true;},getRefTo:function(objID,dc){var objRef=null;if(!dc)dc=document;if(dc.getElementById && dc.getElementById(objID)!=null)objRef=dc.getElementById(objID);else if(dc.layers && dc.layers[objID]!=null)objRef=dc.layers[objID];else if(dc.all)objRef=dc.all[objID];return objRef;},addPosition:function(posID,codeParams,objIDsSuccess,objStylesSuccess,objIDsFail,objStylesFail){this.blockErrors();this.positions[posID]=new Object();this.positions[posID]["codeParams"]=typeof(codeParams)!="string" ? "" : codeParams;this.positions[posID]["objIDsS"]=objIDsSuccess=="this" || objIDsSuccess=="" ? "bmone2n-"+posID : objIDsSuccess;this.positions[posID]["objStylesS"]=objStylesSuccess;this.positions[posID]["objIDsF"]=objIDsFail=="this" || objIDsFail=="" ? "bmone2n-"+posID : objIDsFail;this.positions[posID]["objStylesF"]=objStylesFail;this.unblockErrors();},addAd:function(posID,adCode,beacon){this.blockErrors();this.adRepository[posID]=new Object();this.adRepository[posID]["adCode"]=adCode;this.adRepository[posID]["beacon"]=beacon ? true : false;this.unblockErrors();},makeAd:function(posID){this.blockErrors();var target,source,beaconCode="";var tomove=true;if(this.adRepository[posID]&& this.adRepository[posID]["adCode"]){if(this.adRepository[posID]["beacon"]){beaconCode="BBMEDIA ONE2MANY WARNING: INVISIBLE BEACON CODE TO BE PLACED HERE. IF YOU SEE THIS MESSAGE IT IS WRONG!";}var tmpstr=this.adRepository[posID]["adCode"].toUpperCase();target=this.getRefTo("bmone2n-"+posID);if(tmpstr.indexOf("<SC")!=-1  ||  tmpstr.indexOf("SCRIPT")!=-1){document.write(this.adRepository[posID]["adCode"]+beaconCode);if(tomove)this.adRepository[posID]["tomove"]=true;}else{target=this.getRefTo("bmone2n-"+posID);if(target){target.innerHTML=this.adRepository[posID]["adCode"]+beaconCode;this.changeStyles(posID,true);}}if(target && !target.outerHTML){this.move1Ad(posID);}}else{this.changeStyles(posID,false);}this.unblockErrors();},move1Ad:function(posID){if(this.adRepository[posID]["tomove"]){var target=this.getRefTo("bmone2n-"+posID);if(target){var source=this.getRefTo("bmone2t-"+posID);if(source){source.style.display='block';var skriptTags=source.getElementsByTagName("SCRIPT");while(skriptTags.length){skriptTags[0].parentNode.removeChild(skriptTags[0]);skriptTags=source.getElementsByTagName("SCRIPT");}if(source.outerHTML){target.insertBefore(source,null);}else{target.appendChild(source);}this.changeStyles(posID,true);}}this.adRepository[posID]["tomove"]=false;}},moveAd:function(){this.blockErrors();for(var posID in this.adRepository){this.move1Ad(posID);}this.unblockErrors();},getAd:function(adDomain,keywords,xtraprms){this.blockErrors();var one2n=0;var one2nparams='';for(var posID in this.positions){one2n++;one2nparams+="&one2n"+one2n+"=/"+posID.replace(/\./g,'/')+"/;"+posID+";"+escape(this.positions[posID]["codeParams"]);}if(one2n>0){one2nparams+="&one2n="+one2n;var bbs=screen,bbn=navigator,bbh;bbh='&ubl='+bbn.browserLanguage+'&ucc='+bbn.cpuClass+'&ucd='+bbs.colorDepth+'&uce='+bbn.cookieEnabled+'&udx='+bbs.deviceXDPI+'&udy='+bbs.deviceYDPI+'&usl='+bbn.systemLanguage+'&uje='+bbn.javaEnabled()+'&uah='+bbs.availHeight+'&uaw='+bbs.availWidth+'&ubd='+bbs.bufferDepth+'&uhe='+bbs.height+'&ulx='+bbs.logicalXDPI+'&uly='+bbs.logicalYDPI+'&use='+bbs.fontSmoothingEnabled+'&uto='+(new Date()).getTimezoneOffset()+'&uti='+(new Date()).getTime()+'&uui='+bbs.updateInterval+'&uul='+bbn.userLanguage+'&uwi='+bbs.width;bbh=one2nparams+bbh;if(typeof keywords=="string" && keywords!="")bbh+="&keywords="+escape(keywords);if(typeof xtraprms=="string" && xtraprms!="")bbh+=xtraprms;document.write("<scr"+"ipt language='JavaScript' type='text/javascript' src='http://"+adDomain+"/please/showit/0/0/0/1/?typkodu=js"+bbh+"&alttext=0&border=0&bust="+Math.random()+"&target=_top'><"+"\/scr"+"ipt>");}this.unblockErrors();},changeStyles:function(posID,success){this.blockErrors();finalL=success ? "S" : "F";var lastStyle="",eqSign,semiSign,styleValue,styleProperty;if(typeof((this.positions[posID])!="undefined")&& this.positions[posID]["objIDs"+finalL]){var arr_posIDs=(this.positions[posID]["objIDs"+finalL]).split(",");var arr_Styles=(this.positions[posID]["objStyles"+finalL]).split(",");for(var i in arr_posIDs){if(!arr_Styles[i]){if(lastStyle){arr_Styles[i]=lastStyle;}else{return;}}var myStyle=arr_Styles[i];lastStyle=myStyle;var toChange=this.getRefTo(arr_posIDs[i]);if(toChange){if(myStyle.indexOf('class=')==0){toChange.className=myStyle.substr(6);}else{while(myStyle){eqSign=myStyle.indexOf(":");if(eqSign==-1)return;semiSign=myStyle.indexOf(";");if(semiSign==-1)semiSign=myStyle.length;styleProperty=myStyle.substr(0,eqSign);styleValue=myStyle.substr(eqSign+1,semiSign-eqSign-1);toChange.style[styleProperty]=styleValue;myStyle=myStyle.substr(semiSign+1);}}}}}this.unblockErrors();}};