var mboxCopyright="&copy; 2004-2007 Offermatica &trade; Corporation";mboxCreate=function(f){if(!mboxEnv.isSupported()){return}var e=new Array();e[0]="mbox="+f;for(var h=1;h<arguments.length;h++){e[h]=arguments[h]}e[e.length]="mboxCount="+ ++mboxCount;var g=new mbox(f,e);g.put();return g};mbox=function mbox(g,d){try{this.f=null;this.g=0;this.h=null;this.i=new mboxOfferContent();this.j=this.show;this.error=null;this.k=new Object();this.l=0;if(mboxs[g]){this.hide();var c="Mbox name used multiple times: '"+g+'"';throw c}this.e=g;mboxs[g]=this;this.n=mboxBuildURL(g,d);this.o()}catch(f){mboxs[g].setError(f);this.hide();throw f}};mbox.prototype.o=function(){if(new RegExp("('|\"|%22|%27)").exec(this.e)){throw"Mbox Name "+this.e+" contains invalid characters."}if(this.e.length>250){throw"Mbox Name "+this.e+" exceeds max length of 250 characters."}};mbox.prototype.getName=function(){return this.e};mbox.prototype.parameters=function(){return mboxGetParamsFromQueryString(this.n)};mbox.prototype.setError=function(b){this.error=b;this.q=this.putNothing;this.j=this.hide};mbox.prototype.put=function(){if(mboxEnv.isEnabled()){this.setEventTime("put.start");document.write('<div id="'+this.getMarkerName()+'" style="visibility:hidden;display:none"><script language="JavaScript">mboxs["'+this.e+'"].startTimeout(15000);<\/script><script src="'+mboxEscapeQuote(this.n)+'" language="JavaScript"><\/script></div>');this.setEventTime("put.end")}else{document.write('<div id="'+this.getMarkerName()+'"></div>')}};mbox.prototype.putNothing=function(){document.write('<div id="'+this.getMarkerName()+'"></div>')};mbox.prototype.activate=function(){if(this.g){return this.g}this.setEventTime("activate"+ ++this.l+".start");if(this.j()){this.cancelTimeout();this.g=1}this.setEventTime("activate"+this.l+".end");return this.g};mbox.prototype.isActivated=function(){return this.g};mbox.prototype.setActivateAction=function(b){this.j=b};mbox.prototype.setOffer=function(b){this.i=b};mbox.prototype.getOffer=function(){return this.i};mbox.prototype.show=function(){this.setEventTime("show.start");var b=this.i.show(this);this.setEventTime(b==1?"show.end.ok":"show.end");return b};mbox.prototype.showContent=function(d){if(d==null){return 0}var c=this.getDefaultDiv();if(c!=null&&c.parentNode.replaceChild){c.parentNode.replaceChild(d,c)}else{var b=document.getElementById(this.getMarkerName());if(b==null){return 0}if(c!=null){mboxMakeDivInvisible(c)}mboxMakeDivVisible(b)}mboxMakeDivVisible(d);return 1};mbox.prototype.hide=function(){this.setEventTime("hide.start");var b=document.getElementById(this.getMarkerName());if(b!=null){b.style.visibility="hidden";b.style.display="none"}var c=this.getDefaultDiv();if(c!=null){c.style.visibility="visible";c.style.display="block";this.setEventTime("hide.end.ok");return 1}this.setEventTime("hide.end.fail");return 0};mbox.prototype.finalize=function(){this.setEventTime("finalize.start");this.cancelTimeout();if(!this.activate()){this.hide();this.setEventTime("finalize.end.hide")}this.setEventTime("finalize.end.ok")};mbox.prototype.startTimeout=function(b){this.f=setTimeout('mboxCheckTimeoutById("'+this.e+'")',b)};mbox.prototype.cancelTimeout=function(){if(this.f!=null){clearTimeout(this.f)}};mbox.prototype.getImportDiv=function(){return document.getElementById(this.getImportName())};mbox.prototype.getDefaultDiv=function(){if(this.h!=null){return this.h}var b=document.getElementById(this.getMarkerName());while(b!=null){if((b.nodeType==1)&&(b.nodeName=="DIV")){if(b.className.indexOf("mboxMarker-")>0){return null}else{if(b.className=="mboxDefault"){this.h=b;return b}}}b=b.previousSibling}return null};mbox.prototype.setActivateAction=function(b){this.j=b};mbox.prototype.getMarkerName=function(){return"mboxMarker-"+this.e};mbox.prototype.getImportName=function(){return"mboxImported-"+this.e};mbox.prototype.setEventTime=function(b){this.k[b]=(new Date()).getTime()};mbox.prototype.getEventTimes=function(){return this.k};mbox.prototype.getURL=function(){return this.n};mboxMakeDivVisible=function(b){b.style.visibility="visible";b.style.display="block"};mboxMakeDivInvisible=function(b){b.style.visibility="hidden";b.style.display="none"};mboxGetParamsFromQueryString=function(d){var b=new Object();var i=d.indexOf("?");if(i==-1||i==(d.length-1)){return b}var g=d.substring(i+1);var f=g.split("&");for(var h=0;h<f.length;h++){var e=f[h].split("=");if(e.length<2||e[0]==""||e[1]==""){continue}else{b[e[0]]=e[1]}}return b};mboxEscapeQuote=function(b){return b.replace(/\"/g,"&quot;").replace(/>/g,"&gt;")};mboxOfferContent=function(){};mboxOfferContent.prototype.show=function(c){var b=c.getImportDiv();return c.showContent(b)};mboxOfferDefault=function(){};mboxOfferDefault.prototype.show=function(b){return b.hide()};mboxParametersClient=function(){return""};mboxBuildURL=function(j,d){var h=mboxServerURL;var g=new RegExp("('|\"|%22|%27)");h+="?"+d[0];for(var k=1;k<d.length;k++){h+="&"+d[k];var i=d[k].split("=");if(g.exec(i[0])){throw"Mbox "+j+" has a parameter naming containing invalid characters: '"+d[k]+"'"}}if(document.location.protocol=="https:"){h=h.replace("http:","https:")}h+="&mboxHost="+document.location.hostname;if(h.indexOf("mboxSession")==-1){h+="&mboxSession="+mboxSessionId.getId()}h+="&mboxPC="+mboxPCId.getId();h+="&mboxPage="+mboxPageId;h+="&mboxURL="+escape(document.location);var f=escape(document.referrer);if(h.length+f.length<2000){h+="&mboxReferrer="+f}return h+"&mboxVersion="+mboxVersion};mboxIsSupported=function(){return true};mboxEnvironment=function(b){this.J=mboxIsSupported()&&document.getElementById&&(window.attachEvent||document.addEventListener||window.addEventListener);this.K=this.J;if(mboxGetPageParameter(b)!=null){this.K=false}if(!mboxCookies.isEnabled()){this.K=false}if(mboxCookies.getCookie("disable")=="true"){this.K=false}if(this.isAdmin()){this.enable()}};mboxEnvironment.prototype.isEnabled=function(){return this.K};mboxEnvironment.prototype.isSupported=function(){return this.J};mboxEnvironment.prototype.disable=function(b){if(typeof duration=="undefined"){b=60*60}if(!this.isAdmin()){this.K=false;mboxCookies.setCookie("disable","true",b)}};mboxEnvironment.prototype.enable=function(){this.K=true;mboxCookies.deleteCookie("disable")};mboxEnvironment.prototype.isAdmin=function(){return document.location.href.indexOf("mboxEnv")!=-1};mboxEnvironment.prototype.limitTraffic=function(b,c){if(b==100){return}var d=false;if(mboxCookies.getCookie("traffic")=="true"){d=true}if(this.isAdmin()){d=true;mboxCookies.setCookie("level",b,c);mboxCookies.setCookie("traffic",d,c)}else{if(parseInt(mboxCookies.getCookie("level"))!=b){d=(Math.random()*100)<=b;mboxCookies.setCookie("level",b,c);mboxCookies.setCookie("traffic",d,c)}}if(d){this.enable()}else{this.disable()}};mboxCookieManager=function mboxCookieManager(c,b){this.N=c;if(b.indexOf(".")==-1){b=""}this.O=b==""?"":"; domain="+b;this.loadCookies()};mboxCookieManager.prototype.isEnabled=function(){this.setCookie("check","true",60);this.loadCookies();return this.getCookie("check")=="true"};mboxCookieManager.prototype.setCookie=function(d,c,b){if(typeof d!="undefined"&&typeof c!="undefined"&&typeof b!="undefined"){this.Q[d]={name:d,value:escape(c),expireOn:Math.ceil(b+new Date().getTime()/1000)};this.saveCookies()}};mboxCookieManager.prototype.getCookie=function(c){var b=this.Q[c];if(typeof b=="undefined"||b==null){return null}return unescape(b.value)};mboxCookieManager.prototype.deleteCookie=function(c){var b=new Object();for(R in this.Q){if(R!=c){b[R]=this.Q[R]}}this.Q=b;this.saveCookies()};mboxCookieManager.prototype.getCookieNames=function(c){var b=new Object();for(R in this.Q){if(R.indexOf(c)==0){b[b.length]=R}}return b};mboxCookieManager.prototype.saveCookies=function(){var c=new Array();var b=0;for(R in this.Q){if(this.Q[R]!=null){c[c.length]=this.Q[R].name+"#"+this.Q[R].value+"#"+this.Q[R].expireOn;if(b<this.Q[R].expireOn){b=this.Q[R].expireOn}}}var d=new Date(b*1000);document.cookie=this.N+"="+c.join("|")+"; expires="+d.toGMTString()+"; path=/"+this.O};mboxCookieManager.prototype.loadCookies=function(){this.Q=new Object();var g=document.cookie.indexOf(this.N+"=");if(g!=-1){var f=document.cookie.indexOf(";",g);if(f==-1){f=document.cookie.indexOf(",",g);if(f==-1){f=document.cookie.length}}var b=document.cookie.substring(g+this.N.length+1,f).split("|");var e=Math.ceil(new Date().getTime()/1000);for(var h=0;h<b.length;h++){var d=b[h].split("#");if(e<=d[2]){this.Q[d[0]]={name:d[0],value:d[1],expireOn:d[2]}}}}};mboxSetCookie=function(d,c,b){mboxCookies.setCookie(d,c,b)};mboxGetCookie=function(b){return mboxCookies.getCookie(b)};mboxActivateById=function(b){mboxs[b].activate()};mboxCheckTimeoutById=function(b){mboxs[b].activate();if(!mboxs[b].isActivated()){mboxEnv.disable();window.location.reload(false)}};mboxCheckAll=function(){for(var b in mboxs){mboxs[b].finalize()}};mboxSetupSignal=function(f,e){var d=new Array();for(var g=1;g<arguments.length;g++){d[g-1]=arguments[g]}mboxCookies.setCookie("signal-"+f,d.join("&"),45*60)};mboxSignal=function(){var d=mboxCookies.getCookieNames("signal-");for(db in d){var f=mboxCookies.getCookie(d[db]);var c=f.split("&");var e=c[0];c[0]="mbox="+e;c[c.length]="mboxCount="+ --mboxSignalCount;var g=new mbox(e,c);g.put();mboxCookies.deleteCookie(d[db])}};mboxDefaultContentDisplayNone=function(){document.write("<style>.mboxDefault { visibility:hidden; }</style>")};mboxSession=function(d,e,b,c){this.hb=e;this.ib=b;this.jb=c;this.kb=false;this.e=mboxGetPageParameter(this.hb);if(this.e==null||this.e.length==0){this.e=mboxCookies.getCookie("session");if(this.e==null||this.e.length==0){this.e=d;this.kb=true}}mboxCookies.setCookie("session",this.e,c)};mboxSession.prototype.getId=function(){return this.e};mboxSession.prototype.forceId=function(b){this.e=b;mboxCookies.setCookie(this.ib,this.e,this.jb)};mboxPC=function(d,b,c){this.ib=b;this.jb=c;this.e=mboxCookies.getCookie(this.ib);if(this.e==null||this.e.length==0){this.e=d}};mboxPC.prototype.getId=function(){mboxCookies.setCookie("PC",this.e,this.jb);return this.e};mboxPC.prototype.forceId=function(b){if(this.e!=b){this.e=b;mboxCookies.setCookie(this.ib,this.e,this.jb);return true}return false};mboxGenerateId=function(){return(new Date()).getTime()+"-"+Math.floor(Math.random()*999999)};mboxGetPageParameter=function(e){var c=null;var d=new RegExp(e+"=([^&]*)");var b=d.exec(document.location);if(b!=null&&b.length>=2){c=b[1]}return c};mboxCookieIsEnabled=function(){mboxCookies.setCookie("check","true",60);return mboxCookies.getCookie("check")=="true"};mboxSafeBodyOnload=function(b){if(window.addEventListener){window.addEventListener("load",b,false)}else{if(document.addEventListener){document.addEventListener("load",b,false)}else{if(document.attachEvent){window.attachEvent("onload",b)}}}};mboxCookiePageDomain=function(){var d=(/([^:]*)(:[0-9]{0,5})?/).exec(document.location.host)[1];var b=/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/;if(!b.exec(d)){var c=(/([^\.]+\.[^\.]{3}|[^\.]+\.[^\.]+\.[^\.]{2})$/).exec(d);if(c){d=c[0]}}return d?d:""};mboxCookieDomain=function(){return mboxCookiePageDomain()};if(typeof mboxVersion=="undefined"){var mboxVersion=23;var mboxServerURL="http://mbox3.offermatica.com/m2/skype/mbox/standard";var mboxCookies=new mboxCookieManager("mbox",mboxCookieDomain());var mboxPageId=mboxGenerateId();var mboxSessionId=new mboxSession(mboxPageId,"mboxSession","session",31*60);var mboxPCId=new mboxPC(mboxPageId,"PC",63072000);var mboxs=new Object();var mboxCount=0;var mboxSignalCount=0;var mboxEnv=new mboxEnvironment("mboxDisable");var mboxPageStartTime=new Date().getTime();var mboxPageEndTime=mboxPageStartTime;mboxSafeBodyOnload(new Function("mboxPageEndTime = new Date().getTime()"));if(mboxEnv.isSupported()){mboxSafeBodyOnload(mboxCheckAll);mboxEnv.limitTraffic(100,10368000);if(mboxEnv.isEnabled()){mboxSignal();mboxDefaultContentDisplayNone()}}}mboxDisplayDebugInfo=function(){mboxDebugger.show()};mboxDebug=function(c,d,e){this.tb=c;this.r=null;var b=mboxGetPageParameter(d);if(b==null){b=mboxCookies.getCookie(this.tb)}if(b!=null){if(b.indexOf("x")==0){this.r=new mboxDebugActionNone();document.write('<script language="Javascript1.2" src="http://admin3.offermatica.com/admin/mbox/mbox_debug_'+b+'.jsp"><\/script>')}else{if(b.indexOf("log")==0){this.r=new mboxDebugActionLog(b)}else{if(b=="reset"){b=null}else{this.r=new mboxDebugActionDefault()}}}}if(this.r!=null){if(e.isSupported()){mboxSafeBodyOnload(mboxDisplayDebugInfo)}else{alert("mbox functionality is not supported on this browser");this.disable()}}if(b!=null){mboxCookies.setCookie(this.tb,b,45*60)}else{this.disable()}};mboxDebug.prototype.isEnabled=function(){return this.r!=null};mboxDebug.prototype.disable=function(){mboxCookies.deleteCookie(this.tb)};mboxDebug.prototype.setShowAction=function(b){this.r=b};mboxDebug.prototype.show=function(){if(this.r!=null){this.r.show()}};mboxDebugActionLog=function(b){this.ub=b;this.vb=(new Date()).getTime()};mboxDebugActionLog.prototype.show=function(){var b=(new Date()).getTime();var c=new mboxDebugWindow("Debug Log");c.putPageStart();c.put("<img src='http://mbox3.offermatica.com/admin/images/spacer.gif?mboxDebug="+this.ub+"&mboxClient=skype&mboxPageLoadTime="+(b-this.vb)+"&mboxCount="+mboxCount+"&mboxSignalCount="+mboxSignalCount+"'>");c.put("<br />");c.putCloseButton();c.putPageEnd()};mboxDebugActionNone=function(){};mboxDebugActionNone.prototype.show=function(){alert("Debug mode not defined\n('x-mode' not supported when debug is remote in mbox.js)")};mboxDebugActionDefault=function(){};mboxDebugActionDefault.prototype.show=function(){var c=new mboxDebugWindow("Debug");c.putPageStart();c.put("  <b>Mbox Debug Window (version:"+mboxVersion+")</b></br>");c.put("<p/>");c.put("<b>Page</b>: "+document.location);c.put(" <ul>");if(mboxEnv.isEnabled()){c.put("  <li>Enabled: true</li>")}else{c.put('  <li>Enabled: <span style="color:red"><b>false</b></span></li>')}c.put("  <li>Cookies enabled: "+mboxCookieIsEnabled()+"</li>");c.put("  <li>Page URL: '"+document.location+"'</li>");c.put("  <li>Cookies: '"+document.cookie+"'</li>");for(a in mboxs){c.put("  <li>mbox: '"+a+"'");c.put("   <ul>");if(mboxs[a].error!=null){c.put('   <li><span style="color: red"><b>Error: '+mboxs[a].error+"</b></span></li>")}var b=document.getElementById(mboxs[a].getMarkerName());if(b==null){c.put('    <li><span style="color: red"><b>Error: can not find mbox in dom</b></span></li>')}else{c.put("    <li>has mboxDefault content div tags: "+(mboxs[a].getDefaultDiv()!=null)+"</li>")}c.put('    <li><a href="'+mboxs[a].getURL()+'">'+mboxs[a].getURL()+"</a></li>");c.put("   </ul>");c.put("  </li>")}c.put(" </ul>");c.putCloseButton();c.putPageEnd()};mboxDebugWindow=function(d){this.N=d+" "+document.location.hostname;var b=/\W/g;var c=this.N.replace(b,"_");this.xb=window.open("","mboxDebugWindow"+c,"width=600,height=300,resizable,scrollbars=yes,toolbar=yes");if(this.xb==null){alert("Unable to open Offermatica's mboxDebugWindow Window.\nAre you blocking popups?\n")}};mboxDebugWindow.prototype.put=function(b){if(this.xb==null){return}try{this.xb.document.writeln(b);this.xb.scrollBy(0,1000)}catch(c){alert("Unable to write to the current mboxDebug window.\nPlease close any open debug window");this.xb=null}};mboxDebugWindow.prototype.putCloseButton=function(){this.put('<a href="javascript:mboxDebugWindowClose()">click here to close debug window</a>')};mboxDebugWindow.prototype.putPageStart=function(){this.put("<html><head> <title>"+this.N+"</title>  <script>   function mboxDebugWindowClose() {     try {       window.opener.mboxDebugger.disable();     } catch(e) {       alert('Could not disable debug mode.\\n'         + 'Browse to a page containing an mbox and\\n'         + 'click on close link.');     }     window.close();   }  <\/script> </head> <body>")};mboxDebugWindow.prototype.putPageEnd=function(){this.put("</body></html>");if(this.xb!=null){this.xb.document.close()}};if(typeof mboxDebugger=="undefined"){mboxDebugger=new mboxDebug("debug","mboxDebug",mboxEnv)};