/* 
 * ../tags/1.5.2/vindicosuite.xumo.min.js
 * (c) 2010 BBE, Inc. All Rights Reserved.
 * VERSION 1.5.2.2
 *
 */
var VINDICOSUITE={};VINDICOSUITE.XUMO={version:"1.5.2.2",_banners:eval('[]'),_debug:eval('false'),_min:eval('false'),_inplace:eval('false'),_inject:eval('false'),jsfile:'../tags/1.5.2/vindicosuite.xumo.min.js',jsver:'',regexme:/vindicosuite\.xumo\.js(\.asp)?(\?.*)?$/i,iframeid:"vindicosuiteXumoCoAd_Iframe",EVENT:function(d){var a=VINDICOSUITE.XUMO,b=new VINDICOSUITE.XML.ObjTree(),c=b.parseXML(d);if(a._inplace&&a._banners.length==0){a.events.AdLoadCompanion=a.events.AdLoadCompanionInPlace}else{if(a._banners.length>0){a.events.AdLoadCompanion=a.events.loadCompanions}}if(a._debug){a.onscreenDebug.fire(c,a)}if(typeof a.events[c.event.eventName]=="function"){a.events[c.event.eventName](c,a)
}else{a.events.genericHandler(c,a)}},load:function(){if(this._inject){this._doOnLoad()}else{VINDICOSUITE.domReady.add(function(){VINDICOSUITE.XUMO._doOnLoad()})}},_doOnLoad:function(){window.top.VINDICOSUITE=VINDICOSUITE;if(typeof window.top.Vindicosuite_LoadedCallback==="function"){window.top.Vindicosuite_LoadedCallback(VINDICOSUITE)}this.onscreenDebug.init()},events:{addHandlers:function(a){var b;for(b in a){this.addHandler(b,a[b])}},addHandler:function(a,b){this[a]=b},genericHandler:function(b,a){if(a._debug){a.consoleDebug(b)}},AdLoadCompanionInPlace:function(f,k){var j=f.event.CompanionAds.Companion,d=k.iframeid,b,m,g,a,h,c,l;if(document.getElementById){g=k.findElement(k.regexme,"script");b=document.getElementById(d);if(b==null){b=this._injectIframe(d,g.parentNode)}for(c=0,l=j.length;c<l;c++){if(j[c]["@resourceType"]=="iframe"){m=j[c].URL||false;a=j[c]["@height"]+"px"||"100%";h=j[c]["@width"]+"px"||"100%";if(m){b.setAttribute("src",m);b.setAttribute("style","height:"+a+"; width:"+h);
b.setAttribute("height",j[c]["@height"]);b.setAttribute("width",j[c]["@width"]);c=l;break}}}}this.genericHandler(f,k)},loadCompanions:function(h,m){var l=h.event.CompanionAds.Companion,n=window.top.document,f=[],c=null,p,b,k,o=null,g,d,a;if(document.getElementById){for(d=0;d<m._banners.length;d++){if(m._banners[d].id){o=n.getElementById(m._banners[d].id);g=m.iframeid+"_"+m._banners[d].id;if(o!=null){c=n.getElementById(g);if(c==null){c=this._injectIframe(g,o)}f.push({obj:c,id:m._banners[d].id,width:m._banners[d].width,height:m._banners[d].height})}else{throw"Banner container element not in top window."}}}for(d=0;d<l.length;d++){if(l[d]["@resourceType"]=="iframe"){for(a=0;a<f.length;a++){if(l[d]["@width"]==f[a].width&&l[d]["@height"]==f[a].height){b=l[d]["@height"]+"px"||"100%";k=l[d]["@width"]+"px"||"100%";p=l[d].URL||false;if(p){f[a].obj.setAttribute("style","height:"+b+"; width:"+k);f[a].obj.setAttribute("height",l[d]["@height"]);f[a].obj.setAttribute("width",l[d]["@width"]);f[a].obj.src=p;
break}}}}}}this.genericHandler(h,m)},_injectIframe:function(c,b){var a;if(document.getElementById){if(b!=null){a=document.createElement("iframe");a.setAttribute("id",c);a.setAttribute("frameborder","0");a.setAttribute("marginheight","0");a.setAttribute("marginwidth","0");a.setAttribute("scrolling","no");b.appendChild(a);return a}else{throw"Banner parent container is null."}}}},findElement:function(f,d){var c,a,g,e=f,b=document.getElementsByTagName(d);for(c=0,a=b.length;c<a;c++){g=b[c].src;if(g.match(e)){return b[c]}}},_serialize:function(e){if(typeof e.toSource!=="undefined"&&typeof e.callee==="undefined"){return e.toSource()}switch(typeof e){case"number":case"boolean":case"function":return e;break;case"string":return"'"+e+"'";break;case"object":var d;if(e.constructor===Array||typeof e.callee!=="undefined"){d="[";var c,a=e.length;for(c=0;c<a-1;c++){d+=this._serialize(e[c])+","}d+=this._serialize(e[c])+"]"}else{d="{";var b;for(b in e){d+=b+":"+this._serialize(e[b])+","}d=d.replace(/\,$/,"")+"}"
}return d;break;default:return"UNKNOWN";break}},
/*
 * parseUri 1.2.1
 * (c) 2007 Steven Levithan <stevenlevithan.com>
 * MIT License
 * http://blog.stevenlevithan.com/archives/parseuri
 */
parseUri:function(e){var d=this.parseUriOptions,a=d.parser[d.strictMode?"strict":"loose"].exec(e),c={},b=14;while(b--){c[d.key[b]]=a[b]||""}c[d.q.name]={};c[d.key[12]].replace(d.q.parser,function(g,f,h){if(f){c[d.q.name][f]=h}});return c},parseUriOptions:{strictMode:false,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},onscreenDebug:{id:"XUMO_DEBUG",count:0,msgs:{},init:function(a){a=a||false;
if(VINDICOSUITE.XUMO._debug){this.count=0;if(!a){this._injectDebug();return}}},reinit:function(){this.init(true)},_injectDebug:function(){var f=this.id,d=null,a=null,b="position:fixed; left:20px; bottom:20px; width:600px; height:200px;text-align:left; font-size:11px; overflow:auto; padding:10px; border:2px solid red; background-color:white; z-index:100000";if(document.getElementById){try{d=parent.document.getElementById(f);a=parent.document.getElementsByTagName("body")[0]}catch(c){d=document.getElementById(f);a=document.getElementsByTagName("body")[0]}if(d==null){d=document.createElement("div");d.setAttribute("style",b);d.setAttribute("id",f)}d.innerHTML="<h3 style='text-align:center;margin:0px 0px 10px 0px;padding:0px;'>** Xumo Debug Output ** </h3>";a.appendChild(d)}},fire:function(b){var c=null,a=VINDICOSUITE.XUMO._serialize(b);this.count++;this.msgs[this.count]=a;if(document.getElementById){c=document.getElementById(this.id);if(c==null){try{c=parent.document.getElementById(this.id)}catch(b){}}if(c!=null){for(count in this.msgs){c.innerHTML+="<p>("+count+")"+this.msgs[count]+"</p>";
delete this.msgs[count]}}}}},consoleDebug:function(a){if(window.console){if(typeof a==="object"&&console.firebug){console.log(a)}else{console.log(a)}}}};
/*
 * domready.js
 * 
 * Copyright (c) 2007 Takanori Ishikawa.
 * License: MIT-style license.
 * 
 *
 */
VINDICOSUITE.domReady={add:function(b){if(VINDICOSUITE.domReady.loaded){return b()}var e=VINDICOSUITE.domReady.observers;if(!e){e=VINDICOSUITE.domReady.observers=[]}e[e.length]=b;if(VINDICOSUITE.domReady.callback){return}VINDICOSUITE.domReady.callback=function(){if(VINDICOSUITE.domReady.loaded){return}VINDICOSUITE.domReady.loaded=true;if(VINDICOSUITE.domReady.timer){clearInterval(VINDICOSUITE.domReady.timer);VINDICOSUITE.domReady.timer=null}var j=VINDICOSUITE.domReady.observers;for(var f=0,h=j.length;f<h;f++){var g=j[f];j[f]=null;g()}VINDICOSUITE.domReady.callback=VINDICOSUITE.domReady.observers=null};var d=!!(window.attachEvent&&!window.opera);var a=navigator.userAgent.indexOf("AppleWebKit/")>-1;if(document.readyState&&a){VINDICOSUITE.domReady.timer=setInterval(function(){var f=document.readyState;
if(f=="loaded"||f=="complete"){VINDICOSUITE.domReady.callback()}},50)}else{if(document.readyState&&d){var c=(window.location.protocol=="https:")?"://0":"javascript:void(0)";document.write('<script type="text/javascript" defer="defer" src="'+c+'" onreadystatechange="if (this.readyState == \'complete\') VINDICOSUITE.domReady.callback();"><\/script>')}else{if(window.addEventListener){document.addEventListener("DOMContentLoaded",VINDICOSUITE.domReady.callback,false);window.addEventListener("load",VINDICOSUITE.domReady.callback,false)}else{if(window.attachEvent){window.attachEvent("onload",VINDICOSUITE.domReady.callback)}else{var b=window.onload;window.onload=function(){VINDICOSUITE.domReady.callback();if(b){b()}}}}}}}};
/*
 * ===============================================================================
 *  XML.ObjTree -- XML source code from/to JavaScript object like E4X
 * ===============================================================================
 * AUTHOR
 * Yusuke Kawasaki http://www.kawa.net/
 * COPYRIGHT AND LICENSE
 * Copyright (c) 2005-2006 Yusuke Kawasaki. All rights reserved.
 * This program is free software; you can redistribute it and/or
 * modify it under the Artistic license. Or whatever license I choose,
 * which I will do instead of keeping this documentation like it is.
 */
VINDICOSUITE.XML={ObjTree:function(){return this
}};VINDICOSUITE.XML.ObjTree.VERSION="0.24";VINDICOSUITE.XML.ObjTree.prototype.xmlDecl='<?xml version="1.0" encoding="UTF-8" ?>\n';VINDICOSUITE.XML.ObjTree.prototype.attr_prefix="@";VINDICOSUITE.XML.ObjTree.prototype.overrideMimeType="text/xml";VINDICOSUITE.XML.ObjTree.prototype.parseXML=function(c){var b;if(window.DOMParser){var a=new DOMParser();var d=a.parseFromString(c,"application/xml");if(!d){return}b=d.documentElement}else{if(window.ActiveXObject){a=new ActiveXObject("Microsoft.XMLDOM");a.async=false;a.loadXML(c);b=a.documentElement}}if(!b){return}return this.parseDOM(b)};VINDICOSUITE.XML.ObjTree.prototype.parseDOM=function(a){if(!a){return}this.__force_array={};if(this.force_array){for(var d=0;d<this.force_array.length;d++){this.__force_array[this.force_array[d]]=1}}var c=this.parseElement(a);if(this.__force_array[a.nodeName]){c=[c]}if(a.nodeType!=11){var b={};b[a.nodeName]=c;c=b}return c};VINDICOSUITE.XML.ObjTree.prototype.parseElement=function(e){if(e.nodeType==7){return}if(e.nodeType==3||e.nodeType==4){var f=e.nodeValue.match(/[^\x00-\x20]/);
if(f==null){return}return e.nodeValue}var b;var d={};if(e.attributes&&e.attributes.length){b={};for(var g=0;g<e.attributes.length;g++){var j=e.attributes[g].nodeName;if(typeof(j)!="string"){continue}var c=e.attributes[g].nodeValue;if(!c){continue}j=this.attr_prefix+j;if(typeof(d[j])=="undefined"){d[j]=0}d[j]++;this.addNode(b,j,d[j],c)}}if(e.childNodes&&e.childNodes.length){var h=true;if(b){h=false}for(var g=0;g<e.childNodes.length&&h;g++){var a=e.childNodes[g].nodeType;if(a==3||a==4){continue}h=false}if(h){if(!b){b=""}for(var g=0;g<e.childNodes.length;g++){b+=e.childNodes[g].nodeValue}}else{if(!b){b={}}for(var g=0;g<e.childNodes.length;g++){var j=e.childNodes[g].nodeName;if(typeof(j)!="string"){continue}var c=this.parseElement(e.childNodes[g]);if(!c){continue}if(typeof(d[j])=="undefined"){d[j]=0}d[j]++;this.addNode(b,j,d[j],c)}}}return b};VINDICOSUITE.XML.ObjTree.prototype.addNode=function(c,a,b,d){if(this.__force_array[a]){if(b==1){c[a]=[]}c[a][c[a].length]=d}else{if(b==1){c[a]=d}else{if(b==2){c[a]=[c[a],d]
}else{c[a][c[a].length]=d}}}};VINDICOSUITE.XML.ObjTree.prototype.writeXML=function(a){var b=this.hash_to_xml(null,a);return this.xmlDecl+b};VINDICOSUITE.XML.ObjTree.prototype.hash_to_xml=function(c,b){var f=[];var a=[];for(var e in b){if(!b.hasOwnProperty(e)){continue}var h=b[e];if(e.charAt(0)!=this.attr_prefix){if(typeof(h)=="undefined"||h==null){f[f.length]="<"+e+" />"}else{if(typeof(h)=="object"&&h.constructor==Array){f[f.length]=this.array_to_xml(e,h)}else{if(typeof(h)=="object"){f[f.length]=this.hash_to_xml(e,h)}else{f[f.length]=this.scalar_to_xml(e,h)}}}}else{a[a.length]=" "+(e.substring(1))+'="'+(this.xml_escape(h))+'"'}}var g=a.join("");var d=f.join("");if(typeof(c)=="undefined"||c==null){}else{if(f.length>0){if(d.match(/\n/)){d="<"+c+g+">\n"+d+"</"+c+">\n"}else{d="<"+c+g+">"+d+"</"+c+">\n"}}else{d="<"+c+g+" />\n"}}return d};VINDICOSUITE.XML.ObjTree.prototype.array_to_xml=function(b,e){var a=[];for(var c=0;c<e.length;c++){var d=e[c];if(typeof(d)=="undefined"||d==null){a[a.length]="<"+b+" />"
}else{if(typeof(d)=="object"&&d.constructor==Array){a[a.length]=this.array_to_xml(b,d)}else{if(typeof(d)=="object"){a[a.length]=this.hash_to_xml(b,d)}else{a[a.length]=this.scalar_to_xml(b,d)}}}}return a.join("")};VINDICOSUITE.XML.ObjTree.prototype.scalar_to_xml=function(a,b){if(a=="#text"){return this.xml_escape(b)}else{return"<"+a+">"+this.xml_escape(b)+"</"+a+">\n"}};VINDICOSUITE.XML.ObjTree.prototype.xml_escape=function(a){return String(a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")};
/*
 * LOAD VINDICOSUITE.XUMO.js
 *
 */
VINDICOSUITE.XUMO.load();