BmOne2n=function(dependencies){var bbnautSettings={sharedObject:{flashBaseUrl:"http://bbnaut.bbelements.com"},serverCookie:{serviceUrl:"http://go.cz.bbelements.com/bbnaut/getBbnaut"}};var utils=new Util();dependencies=utils.createObjectIfUndefined(dependencies);this.dom=utils.initializeDependencies(dependencies.DOM,DOM);this.browser=utils.initializeDependencies(dependencies.Browser,Browser);this.bbnautService=new BbnautService(bbnautSettings);this.positions=new Object();this.adRepository=new Object();
var oldErrHandler=null;this.blockErrors=function(){if(typeof _bbdebug=="undefined"){if(!this.oldErrHandler){this.oldErrHandler=window.onerror}window.onerror=this.failGracefully}};this.unblockErrors=function(){if(typeof _bbdebug=="undefined"){window.onerror=this.oldErrHandler}};this.failGracefully=function(){return true};this.addPosition=function(posID,codeParams,objIDsSuccess,objStylesSuccess,objIDsFail,objStylesFail,callback){this.blockErrors();var target=this.dom.getReferenceTo("bmone2n-"+posID);
if(target&&(target.style.visibility.toUpperCase()!="HIDDEN")&&(target.style.display.toUpperCase()!="NONE")){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.positions[posID]["callback"]=callback}this.unblockErrors()};this.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()};this.makeAd=function(posID){this.blockErrors();var target,source,beaconCode="";var tomove=true;var that=this;var source;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.dom.getReferenceTo("bmone2n-"+posID);if(tmpstr.indexOf("<SC")!=-1||tmpstr.indexOf("SCRIPT")!=-1){source=this.dom.getReferenceTo("bmone2t-"+posID);document.write(this.adRepository[posID]["adCode"]+beaconCode);if(tomove){this.adRepository[posID]["tomove"]=true}if(this.browser.isMsie||this.browser.isOpera){setTimeout(function(){that.waitForScripts(source,posID)},0)}else{this.move1Ad(posID)}}else{target=this.dom.getReferenceTo("bmone2n-"+posID);
if(target){target.innerHTML=this.adRepository[posID]["adCode"]+beaconCode;this.callCallback(posID,true)}}}else{this.callCallback(posID,false)}this.unblockErrors()};var totalScripts={};var unreadyScripts={};this.waitForScripts=function(el,posID){var that=this;var scripts=el.getElementsByTagName("SCRIPT");unreadyScripts[posID]=totalScripts[posID]=scripts.length;if(scripts[0]&&!scripts[0].readyState){this.move1Ad(posID,true)}for(var i=0;i<scripts.length;i++){if(scripts[i].readyState=="complete"||(this.browser.isOpera&&scripts[i].readyState=="loaded")){this.checkReadiness(posID,el)
}else{if(this.browser.isOpera){scripts[i].onload=function(){that.checkReadiness(posID,el)}}else{scripts[i].onreadystatechange=function(){if(this.readyState=="complete"){that.checkReadiness(posID,el)}}}}}};this.checkReadiness=function(posID,el){var that=this;unreadyScripts[posID]--;if(unreadyScripts[posID]<1){if(el.getElementsByTagName("SCRIPT").length==totalScripts[posID]){BbSingleton.getEventDispatcher().registerListener("DOM",BbSingleton.getEventDispatcher().events.DOMLOADED,function(){that.move1Ad(posID)
})}else{this.waitForScripts(el,posID)}}};this.callCallback=function(posID,success){if(this.positions[posID]){if(typeof this.positions[posID]["callback"]!="function"){this.changeStyles(posID,success)}else{this.positions[posID]["callback"](posID,success)}}};this.move1Ad=function(posID,older){var spp;var child=null;var sibling=null;if(this.adRepository[posID]["tomove"]){var target=this.dom.getReferenceTo("bmone2n-"+posID);if(target){var source=this.dom.getReferenceTo("bmone2t-"+posID);
if(source){source.style.display="block";if(this.browser.isMsie){var scripts=source.getElementsByTagName("SCRIPT");for(var i=0;i<scripts.length;i++){if(scripts[i].src!=""){scripts[i].src=""}}}target.insertBefore(source,null);this.callCallback(posID,true)}}this.adRepository[posID]["tomove"]=false}};this.moveAd=function(){this.blockErrors();var that=this;if(!this.dom.isLoaded()){BbSingleton.getEventDispatcher().registerListener("DOM",BbSingleton.getEventDispatcher().events.DOMLOADED,function(){that.moveAd()
});return}for(var posID in this.adRepository){this.move1Ad(posID)}this.unblockErrors()};this.getMoveAdCall=function(posID){that=this;return function(){that.move1Ad(posID)}};this.getAd=function(adDomain,keywords,xtraprms,charset){this.blockErrors();var that=this;if(cannotProceedDueToServerLoad(adDomain)){return}var one2n=0;var one2nparams="";var locPro=(location.protocol.substring(0,2)!="ht")?"http:":location.protocol;if(locPro!="https:"){adDomain=this.correctDomain(adDomain)}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 bbnaut).toUpperCase()=="UNDEFINED"){bbnaut=this.bbnautService.getBbnaut()}if(bbnaut){bbh+="&bbnaut="+bbnaut}if(typeof keywords=="string"&&keywords!=""){bbh+="&keywords="+escape(keywords)}if(typeof xtraprms=="string"&&xtraprms!=""){bbh+=xtraprms}if(typeof charset!="string"){charset="windows-1250"}document.write("<script type='text/javascript' charset='"+charset+"' src='"+locPro+"//"+adDomain+"/please/showit/0/0/0/1/?typkodu=js"+bbh+"&alttext=0&border=0&bust="+Math.random()+"&target=_top'><\/script>")
}function cannotProceedDueToServerLoad(adDomain){var SERVER_POSITION_IN_ID=0;var dropDomain="ad2.ip.ro";var dropRate=100;var minimalDropRate=0;var sitesToDropImpsFor={5688:{domain:"go.cz.bbelements.com",dropRate:100}};if(typeof bb_dropDomain=="string"){dropDomain=bb_dropDomain}if(typeof bb_dropRate=="number"){if(bb_dropRate<minimalDropRate){dropRate=minimalDropRate}else{dropRate=bb_dropRate}}if(typeof bb_dropForServerId=="string"){sitesToDropImpsFor[bb_dropForServerId]={};sitesToDropImpsFor[bb_dropForServerId]["domain"]=dropDomain;
sitesToDropImpsFor[bb_dropForServerId]["dropRate"]=dropRate}for(var posID in that.positions){serverId=posID.split(".")[SERVER_POSITION_IN_ID];if(sitesToDropImpsFor[serverId]&&sitesToDropImpsFor[serverId]["domain"]==adDomain){return shouldStopProccessingForSomePageViews(sitesToDropImpsFor[serverId]["dropRate"])}}return false}function shouldStopProccessingForSomePageViews(dropRate){return Math.random()*100<dropRate}this.unblockErrors()};this.correctDomain=function(adDomain){var domainMap={};
domainMap["adarbo2.bbmedia.cz"]="go.arbo.bbelements.com";domainMap["adidnes2.bbmedia.cz"]="go.idnes.bbelements.com";domainMap["ad2.pl.mediainter.net"]="go.arbopl.bbelements.com";domainMap["ad2.bbmedia.cz"]="go.cz.bbelements.com";if(domainMap[adDomain]){return domainMap[adDomain]}else{return adDomain}};this.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.dom.getReferenceTo(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()};this.rotateAd=function(groupDefs){if(typeof bb_rotation=="function"){bb_rotation(groupDefs)}else{for(var i=0;i<groupDefs.length;i++){if(groupDefs[i].gId!=0&&groupDefs[i].poss.length>1){for(var j=0;j<groupDefs[i].poss.length-1;j++){sourceIdx=Math.floor(Math.random()*groupDefs[i].poss.length);
destIdx=Math.floor(Math.random()*groupDefs[i].poss.length);if(sourceIdx!=destIdx){source=document.getElementById("bmone2n-"+groupDefs[i].poss[sourceIdx]);dest=document.getElementById("bmone2n-"+groupDefs[i].poss[destIdx]);placeHolder=document.createElement("SPAN");if(source&&dest){sourcePar=source.parentNode;destPar=dest.parentNode;source=sourcePar.replaceChild(placeHolder,source);dest=destPar.replaceChild(source,dest);sourcePar.replaceChild(dest,placeHolder)}}}}}}};this.iniDivRotation=function(rotationInfo){var groups=new Object();
var groupDefs=[];var positionPairs=rotationInfo.split(";");for(var i=0;i<positionPairs.length;i++){groupInfo=positionPairs[i].split("#");groupId="grp"+groupInfo[1];if(typeof groups[groupId]!="undefined"){groups[groupId].push(groupInfo[0])}else{groups[groupId]=[groupInfo[0]]}}for(group in groups){gid=group.substr(3);groupDefs.push({gId:gid,poss:groups[group]})}this.rotateAd(groupDefs)};function BbnautService(options,dependencies){var utils=new Util();dependencies=utils.createObjectIfUndefined(dependencies);
var cookieDao=utils.initializeDependencies(dependencies.Cookie,Cookie);var dom=utils.initializeDependencies(dependencies.DOM,DOM);var clientDao=utils.initializeDependencies(dependencies.Client,Client);var communication=utils.initializeDependencies(dependencies.Communication,Communication);this.getDefaultOptions=function(){return{cookieName:"bbnaut",sharedObject:{flashBaseUrl:"http://localhost/Bbnaut"},serverCookie:{serviceUrl:"http://localhost/Bbnaut/getBbnaut"}}};var options=utils.createObjectIfUndefined(options);
utils.addMissingProperties(options,this.getDefaultOptions());this.getBbnautFromLocalCookie=function(){return cookieDao.getLocalCookie({localCookie:{name:options.cookieName}})};this.setBbnautToLocalCookie=function(bbnaut){cookieDao.setLocalCookie({localCookie:{name:options.cookieName},value:bbnaut})};this.setBbnautToSharedObject=function(bbnaut){cookieDao.setSharedCookie({value:bbnaut})};this.setBbnautToLocalCookieAndSharedObject=function(bbnautFromServerCookie){this.setBbnautToLocalCookie(bbnautFromServerCookie);
this.setBbnautToSharedObject(bbnautFromServerCookie)};function stripWhitespacesFromClientData(clientData){return clientData.replace(/\s/g,"")}this.propagateServerCookie=function(){var clientData=clientDao.getData();clientData=stripWhitespacesFromClientData(clientData);var that=this;BBCookie.serverCookieBbnautCallback=function(bbnaut){that.setBbnautToLocalCookie(bbnaut);that.setBbnautToSharedObject(bbnaut)};var requestAttributes={url:options.serverCookie.serviceUrl,params:{techPrint:clientData},longQueryStringClippingMethod:"MIDDLE"};
communication.doGetRequest(requestAttributes)};function synchronizeBbnautCookiesCallback(bbnautFromLocalCookie,bbnautFromSharedObject){if(bbnautFromSharedObject!=null&&bbnautFromSharedObject!=0){this.setBbnautToLocalCookie(bbnautFromSharedObject)}else{if(bbnautFromLocalCookie!=null&&bbnautFromLocalCookie!=0){this.setBbnautToSharedObject(bbnautFromLocalCookie)}else{this.propagateServerCookie()}}}function synchronizeBbnautCookies(bbnautFromLocalCookie){var that=this;cookieDao.getSharedCookieAsync({sharedCookie:{baseUrl:options.sharedObject.flashBaseUrl},callback:function(bbnautFromSharedObject){synchronizeBbnautCookiesCallback.call(that,bbnautFromLocalCookie,bbnautFromSharedObject)
}})}function synchronizeBbnautCookiesAsync(bbnautFromLocalCookie){var that=this;setTimeout(function(){synchronizeBbnautCookies.call(that,bbnautFromLocalCookie)},0)}this.getBbnaut=function(){var bbnautFromLocalCookie=this.getBbnautFromLocalCookie();synchronizeBbnautCookiesAsync.call(this,bbnautFromLocalCookie);return bbnautFromLocalCookie}}BbnautService.prototype.toString=function(){return"BbnautService object"};BBCookie={callbackFunction:null,runGetUserId:function(){this.callbackFunction()
},runServerCookieValue:function(cookieValue){this.callbackFunction(cookieValue)}};function Cookie(dependencies){var utils=new Util();dependencies=utils.createObjectIfUndefined(dependencies);var dom=utils.initializeDependencies(dependencies.DOM,DOM);var flash=utils.initializeDependencies(dependencies.Flash,Flash);var that=this;var sharedCookieManager=null;var currentCallbackOptions=null;var LOCAL_COOKIE_EXPIRATION_YEARS=2;this.getDefaultOptions=function(){return{sharedCookie:{baseUrl:"http://localhost:8080/CommonJsLib",flashPath:"/flash/",flashFile:"bbnaut.swf",flashVersion:8,name:"test_value",width:0,height:0},localCookie:{name:"test_value"},serverCookie:{baseUrl:"http://localhost:8080/CommonJsLib",scriptPath:"/",getScript:"getCookie.jsp",setScript:"setCookie.jsp",name:"test_value"},value:""}
};this.getLocalCookie=function(options){var nameEQ=options.localCookie.name+"=";var cookies=document.cookie.split(";");for(var i=0;i<cookies.length;i++){var c=cookies[i];while(c.charAt(0)==" "){c=c.substring(1,c.length)}if(c.indexOf(nameEQ)==0){return c.substring(nameEQ.length,c.length)}}return null};this.setLocalCookie=function(options){var expirationDate=new Date();expirationDate.setFullYear(expirationDate.getFullYear()+LOCAL_COOKIE_EXPIRATION_YEARS);document.cookie=options.localCookie.name+"="+options.value+"; path=/; expires="+expirationDate.toUTCString()
};this.getServerCookieAsync=function(options){if(!options.callback){throw"Cookie: callback must be specified for server cookies called asynchronously"}BBCookie.callbackFunction=that.adviseServerCookieIsReady;if(options.serverCookie){with(options.serverCookie){dom.addJavaScript(baseUrl+scriptPath+getScript+"?name="+escape(name))}}};this.setServerCookie=function(options){if(options.serverCookie){with(options.serverCookie){dom.addJavaScript(baseUrl+scriptPath+setScript+"?name="+escape(name)+"&value="+escape(options.value))
}}};function createSharedCookieManager(options){options=utils.addMissingProperties(options,that.getDefaultOptions());currentCallbackOptions=options;BBCookie.callbackFunction=that.adviseSharedManagerIsReady;var managerCode=flash.getCode(options.sharedCookie);if(dom.isLoaded()){dom.addFlash(options.sharedCookie.placement,managerCode)}else{BbSingleton.getEventDispatcher().registerListener("DOM",BbSingleton.getEventDispatcher().events.DOMLOADED,function(){dom.addFlash(options.sharedCookie.placement,managerCode)
})}}this.getSharedCookie=function(options){if(!sharedCookieManager){throw"Cookie: sharedCookieManager has not been set yet, call getSharedCookieAsync instead"}else{return sharedCookieManager.getFlashCookieUserId()}};this.getSharedCookieAsync=function(options){options.internalCallback=arguments.callee;if(!options.callback){throw"Cookie: callback must be specified for server cookies called asynchronously"}if(!sharedCookieManager){createSharedCookieManager(options)}else{options.callback(sharedCookieManager.getFlashCookieUserId())
}};this.setSharedCookie=function(options){options.internalCallback=arguments.callee;if(!sharedCookieManager){createSharedCookieManager(options)}else{sharedCookieManager.setFlashCookieUserId(options.value)}};this.adviseSharedManagerIsReady=function(){if(!currentCallbackOptions){throw"Cookie: missing callbackOptions for current asynchronous call"}else{options=currentCallbackOptions;sharedCookieManager=flash.getReferenceTo(options.sharedCookie.name);currentCallbackOptions=null;BBCookie.callbackFunction=null;
options.internalCallback(options)}};this.adviseServerCookieIsReady=function(cookieValue){BBCookie.callbackFunction=null;options.callback(cookieValue)}}Cookie.prototype=Cookie.prototype;function Communication(dependencies){var utils=new Util();dependencies=utils.createObjectIfUndefined(dependencies);var dom=utils.initializeDependencies(dependencies.DOM,DOM);var browser=utils.initializeDependencies(dependencies.Browser,Browser);this.setBrowser=function(givenBrowser){browser=givenBrowser
};this.doPostRequest=function(){};this.doGetRequest=function(requestAttributes){var request=this.buildGetRequest(requestAttributes);dom.addJavaScript(request)};this.buildGetRequest=function(requestAttributes){checkRequestAttributes(requestAttributes);var queryString=buildQueryString(requestAttributes);return requestAttributes.url+queryString};function checkRequestAttributes(requestAttributes){if(requestAttributes.url==""){throw"Communication: Missing url in request attributes"
}}function buildQueryString(requestAttributes){var queryString="?";for(var paramName in requestAttributes.params){if(queryString!="?"){queryString+="&"}queryString+=paramName+"="+requestAttributes.params[paramName]}if(queryString=="?"){return""}var maxLength=browser.maxGetRequestLength-requestAttributes.url.length;queryString=clipQueryStringIfOverflows(queryString,maxLength,requestAttributes.longQueryStringClippingMethod);return queryString}function clipQueryStringIfOverflows(queryString,maxLength,clippingMethod){if(queryString.length<=maxLength){return queryString
}if(clippingMethod=="MIDDLE"){var halfLength=maxLength/2;var firstPart=queryString.substring(0,halfLength);var secondPart=queryString.substring(queryString.length-halfLength);return firstPart.concat(secondPart)}if(clippingMethod=="TAIL"){return queryString.substring(0,maxLength)}throw"Communication: max available queryString length overflow"}}Communication.prototype.toString=function(){return"Communication object"};BbSingleton={eventDispatcher:null,getEventDispatcher:function(){if(!this.eventDispatcher){this.eventDispatcher=new EventDispatcher()
}return this.eventDispatcher}};function EventDispatcher(dependencies){var utils=new Util();dependencies=utils.createObjectIfUndefined(dependencies);var registeredListeners={};var dispatchedRetroactiveEvents={};this.events={DOMLOADED:{type:"domloaded",retroactive:true}};initializeListeners();this.registerListener=function(eventSource,evnt,listener){listeners=getListeners(eventSource,evnt.type);if(!isListenerRegisteredForEvent(listener,listeners)){listeners.push(listener)}if(evnt.retroactive){redispatchRetroactiveEvent(eventSource,evnt.type,listener)
}};this.dispatchEvent=function(eventSource,evnt){if(evnt.retroactive){registerDispatchedRetroactiveEvent(eventSource,evnt.type)}var listeners=getListeners(eventSource,evnt.type);for(var i=0;i<listeners.length;i++){listeners[i]()}};function isListenerRegisteredForEvent(listener,listeners){for(var i=0;i<listeners.length;i++){if(listener.toString()===listeners[i].toString()){return true}}return false}function initializeListeners(){for(var evnt in this.events){registeredListeners[evnt.type]={}
}}function redispatchRetroactiveEvent(eventSource,eventType,listener){var evnt=getDispatchedRetroactiveEvent(eventSource,eventType);if(evnt.dispatched){listener()}}function registerDispatchedRetroactiveEvent(eventSource,eventType){var evnt=getDispatchedRetroactiveEvent(eventSource,eventType);evnt.dispatched=true}function getListeners(eventSource,eventType){return utils.getPropertyValueOrInitializeItIfNotSet(registeredListeners,[eventSource,eventType],[])}function getDispatchedRetroactiveEvent(eventSource,eventType){return utils.getPropertyValueOrInitializeItIfNotSet(dispatchedRetroactiveEvents,[eventSource,eventType],{dispatched:false})
}}function DOM(){var utils=new Util();this.isLoaded=function(){return this.loaded};this.getReferenceTo=function(objectId,searchingScope){var objectReference=null;if(!searchingScope){searchingScope=document}if(searchingScope.getElementById&&searchingScope.getElementById(objectId)!=null){objectReference=searchingScope.getElementById(objectId)}else{if(searchingScope.layers&&searchingScope.layers[objectId]!=null){objectReference=searchingScope.layers[objectId]}else{if(searchingScope.all){objectReference=searchingScope.all[objectId]
}}}return objectReference};function prepareScriptObject(scriptUrl){var js=document.createElement("script");js.setAttribute("language","javascript");js.setAttribute("type","text/javascript");js.setAttribute("src",scriptUrl);return js}function addWhenReadyCallbackToScript(script,callbackFunction){if(callbackFunction&&(typeof callbackFunction).toUpperCase()=="FUNCTION"){if(script.readyState){script.onreadystatechange=function(){if(window.event.srcElement.readyState.toUpperCase()=="COMPLETE"){callbackFunction(script)
}}}else{script.onload=function(){callbackFunction(script)}}}return script}this.addJavaScript=function(scriptUrl,callbackFunction){var head=document.getElementsByTagName("head").item(0);var js=prepareScriptObject(scriptUrl);js=addWhenReadyCallbackToScript(js,callbackFunction);head.appendChild(js)};this.getDefaultFlashPlacement=function(){return{parentElement:document.body,elementType:"SPAN",elementAttributes:{id:"bbnautFlash"}}};this.createPlacement=function(placement){var element=document.createElement(placement.elementType);
for(attribute in placement.elementAttributes){eval("element."+attribute+"='"+placement.elementAttributes[attribute]+"'")}placement.parentElement.appendChild(element);return element};this.addFlash=function(placement,flashCode){var placement=utils.addMissingProperties(placement,this.getDefaultFlashPlacement());var element=this.createPlacement(placement);element.innerHTML=flashCode}}DOM.prototype.loaded=false;DOM.prototype.checked=false;(function(){var dom=new DOM();if(dom.checked==true){return
}DOM.prototype.checked=true;var browser=new Browser();var eventAttached=false;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){DOM.prototype.loaded=true;BbSingleton.getEventDispatcher().dispatchEvent("DOM",BbSingleton.getEventDispatcher().events.DOMLOADED)},false);eventAttached=true}else{if(browser.isMsie){(function(){try{document.documentElement.doScroll("left")}catch(error){setTimeout(arguments.callee,50);return}DOM.prototype.loaded=true;
BbSingleton.getEventDispatcher().dispatchEvent("DOM",BbSingleton.getEventDispatcher().events.DOMLOADED);return})();eventAttached=true}}if(!eventAttached){oldOnload=window.onload;window.onload=function(){DOM.prototype.loaded=true;if(oldOnload){oldOnload()}BbSingleton.getEventDispatcher().dispatchEvent("DOM",BbSingleton.getEventDispatcher().events.DOMLOADED)}}})();function Browser(){var userAgent=navigator.userAgent.toLowerCase();this.version=(userAgent.match(/.+(?:rv|it|ra|ie|me)[\/: ]([\d.]+)/)||[])[1];
this.isChrome=/chrome/.test(userAgent);this.isSafari=/webkit/.test(userAgent)&&!/chrome/.test(userAgent);this.isOpera=/opera/.test(userAgent);this.isMsie=/msie/.test(userAgent)&&!/opera/.test(userAgent);this.isMozilla=/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent);if(this.isChrome){this.maxGetRequestLength=2048}else{if(this.isSafari){this.maxGetRequestLength=2048}else{if(this.isOpera){this.maxGetRequestLength=8192}else{if(this.isMsie){this.maxGetRequestLength=2048
}else{if(this.isMozilla){this.maxGetRequestLength=8192}else{this.maxGetRequestLength=2048}}}}}}function Flash(dependencies){var utils=new Util();dependencies=utils.createObjectIfUndefined(dependencies);var browser=utils.initializeDependencies(dependencies.Browser,Browser);var flashNamePrefix="flash_";function getIEFlashCode(options){var flashcode="<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' ";flashcode+=getCommonParameterString(options)+">";flashcode+="<PARAM name='movie' value='"+options.baseUrl+options.flashPath+options.flashFile+"'>";
for(param in options.flashParams){flashcode+="<PARAM name='"+param+"' value='"+options.flashParams[param]+"'>"}return flashcode+"</OBJECT>"}function getNonIEFlashCode(options){var flashcode="<EMBED type='application/x-shockwave-flash' ";flashcode+="src='"+options.baseUrl+options.flashPath+options.flashFile+"' ";flashcode+=getCommonParameterString(options);for(param in options.flashParams){flashcode+=param+"='"+options.flashParams[param]+"' "}return flashcode+">"}function getCommonParameterString(options){var commonString="";
commonString+="id='"+flashNamePrefix+options.name+"' ";commonString+="name='"+flashNamePrefix+options.name+"' ";commonString+="width='"+options.width+"' height='"+options.height+"' ";return commonString}this.isRequiredVersionAvailable=function(options){options=utils.addMissingProperties(options,{flashVersion:1000});if(options.flashVersion<=this.getInstalledFlashVersion()){return true}else{return false}};this.getInstalledFlashVersion=function(){var flVer=0,x,axo;if(utils.isDefined(navigator.plugins)&&(navigator.mimeTypes.length>0)){x=navigator.plugins["Shockwave Flash"];
if(x&&x.description){flVer=parseInt(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split(".")[0])}}else{if(utils.isUndefined(ActiveXObject)){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(e){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");flVer=6}catch(e){}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(e){}}if(axo!=null){flVer=parseInt(axo.GetVariable("$version").split(" ")[1].split(",")[0])}}}return flVer
};this.getDefaultOptions=function(){return{baseUrl:"",flashPath:"/flash/",flashFile:"bbnaut.swf",name:"test_value",width:0,height:0,flashParams:{allowScriptAccess:"always",wmode:"window",flashVars:""}}};this.getCode=function(options){var flashcode="";options=utils.addMissingProperties(options,this.getDefaultOptions());if(browser.isMsie){flashcode=getIEFlashCode(options)}else{flashcode=getNonIEFlashCode(options)}return flashcode};this.getReferenceTo=function(flashName){var prefixedFlashName=flashNamePrefix+flashName;
if(window.document[prefixedFlashName]){return window.document[prefixedFlashName]}if(!browser.isMsie){if(document.embeds&&document.embeds[prefixedFlashName]){return document.embeds[prefixedFlashName]}}return document.getElementById(prefixedFlashName)}}Flash.prototype.toString=function(){return"Flash object"};function Client(dependencies){var utils=new Util();dependencies=utils.createObjectIfUndefined(dependencies);var browser=utils.initializeDependencies(dependencies.browser,Browser);
var nav=utils.getValueOrDefaultIfUndefined(dependencies.navigator,navigator);var win=utils.getValueOrDefaultIfUndefined(dependencies.window,window);var data={dataString:"",add:function(key,value){data.dataString+=key+":"+value+";";return this},toString:function(){return data.dataString}};function getOtherNavigatorData(){data.add("language",nav.language)}function getNavigatorMimeTypesData(){data.add("navigator.mimeTypes.length",nav.mimeTypes.length);for(i=0;i<nav.mimeTypes.length;
i++){mimeObject=nav.mimeTypes[i];if(mimeObject.enabledPlugin){if(mimeObject.description!=""){data.add("description",mimeObject.description)}}}}function getNavigatorPluginsData(){data.add("pluginsCount",nav.plugins.length);data.add("plugins","");for(i=0;i<nav.plugins.length;i++){data.add("puginName",nav.plugins[i].name).add("filename",nav.plugins[i].filename).add("description",nav.plugins[i].description)}}function collectNavigatorData(){getOtherNavigatorData();getNavigatorMimeTypesData();
getNavigatorPluginsData()}function collectExplorerData(){data.add("appMinorVersion",nav.appMinorVersion).add("cpuClass",nav.cpuClass).add("browserLanguage",nav.browserLanguage).add("userLanguage",nav.userLanguage).add("systemLanguage",nav.systemLanguage).add("onLine",nav.onLine).add("numberOfMimeTypes",nav.mimeTypes.length).add("numberOfPlugins",nav.plugins.length).add("userProfile",nav.userProfile)}function collectOperaData(){data.add("language",nav.language)}function collectAllOtherBrowserData(){data.add("screenWidth",win.screen.width).add("screenHeight",win.screen.height).add("cookieEnabled",win.cookieEnabled).add("userAgent",nav.userAgent).add("platform",nav.platform).add("appName",nav.appName).add("appVersion",nav.appVersion).add("appCodeName",nav.appCodeName).add("colorDepth",win.screen.colorDepth).add("screenAvailWidth",win.screen.availWidth).add("screenAvailHeight",win.screen.availHeight).add("windowPageXOffset",win.pageXOffset).add("windowPageYOffset",win.pageYOffset)
}this.getData=function(){if(browser.isOpera){collectOperaData()}else{if(browser.isMsie){collectExplorerData()}else{collectNavigatorData()}}collectAllOtherBrowserData();return data.toString()}}function Util(){this.isDefined=function(arg){if(typeof(arg)=="undefined"){return false}else{return true}};this.isUndefined=function(arg){return !this.isDefined(arg)};this.createObjectIfUndefined=function(obj){return this.getValueOrDefaultIfUndefined(obj,{})};this.getValueOrDefaultIfUndefined=function(obj,dfault){if(this.isUndefined(obj)){obj=dfault
}return obj};this.addMissingProperties=function(objectToBeCompleted,completeProperties){objectToBeCompleted=this.createObjectIfUndefined(objectToBeCompleted);completeProperties=this.createObjectIfUndefined(completeProperties);for(var property in completeProperties){if(this.canNestIntoObject(completeProperties[property])){if(objectToBeCompleted[property]==undefined){objectToBeCompleted[property]={}}objectToBeCompleted[property]=this.addMissingProperties(objectToBeCompleted[property],completeProperties[property])
}else{if(this.isUndefined(objectToBeCompleted[property])){objectToBeCompleted[property]=completeProperties[property]}}}return objectToBeCompleted};this.canNestIntoObject=function(obj){var canNest=true;if((typeof obj).toUpperCase()!="OBJECT"){canNest=false}else{if(obj===window){canNest=false}else{if(this.isDefined(obj.nodeType)&&obj.nodeType!=0){canNest=false}}}return canNest};this.initializeDependencies=function(injectedDependency,requiredType){if(this.isUndefined(requiredType)){throw"Util: required type must be defined!"
}var finalDependency=null;if(isInstanceOf(injectedDependency,requiredType)){finalDependency=injectedDependency}else{finalDependency=new requiredType()}return finalDependency};this.keyExists=function(object,keys){for(var i=0;i<keys.length;i++){if(this.isUndefined(object[keys[i]])){return false}else{object=object[keys[i]]}}return true};this.getPropertyValueOrInitializeItIfNotSet=function(obj,propertyKeylist,initialValue){var propertyValue=this.getPropertyValue(obj,propertyKeylist);
if(this.isDefined(propertyValue)){return propertyValue}else{this.initializePropertyValue(obj,propertyKeylist,initialValue);return initialValue}};this.getPropertyValue=function(obj,propertyKeylist){var propertyValue=obj;for(var i=0;i<propertyKeylist.length;i++){propertyValue=propertyValue[propertyKeylist[i]];if(this.isUndefined(propertyValue)){return}}return propertyValue};this.initializePropertyValue=function(obj,propertyKeylist,initialValue){var keyCount=propertyKeylist.length;
for(var i=0;i<propertyKeylist.length;i++){keyCount--;if(this.isUndefined(obj[propertyKeylist[i]])){if(keyCount==0){obj[propertyKeylist[i]]=initialValue}else{obj[propertyKeylist[i]]={}}}obj=obj[propertyKeylist[i]]}};function isInstanceOf(obj,type){if(obj&&((typeof obj).toUpperCase()=="OBJECT")&&(obj instanceof type)){return true}else{return false}}}Util.prototype.toString=function(){return"Util object"}};bmone2n=new BmOne2n();