/*======================================================================*\ || #################################################################### || || # vBulletin 4.1.9 || # ---------------------------------------------------------------- # || || # Copyright ©2000-2011 vBulletin Solutions Inc. All Rights Reserved. || || # This file may not be redistributed in whole or significant part. # || || # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # || || # http://www.vbulletin.com | http://www.vbulletin.com/license.html # || || #################################################################### || \*======================================================================*/ if(window.console===undefined){window.console={};var names=["log","debug","info","warn","error","assert","dir","dirxml","group","groupEnd","time","timeEnd","count","trace","profile","profileEnd"];for(var i=0;i0);var is_saf=(YAHOO.env.ua.webkit>0);var is_webtv=(userAgent.indexOf("webtv")!=-1);var is_ie=((YAHOO.env.ua.ie>0)&&(!is_opera)&&(!is_saf)&&(!is_webtv));var is_ie4=(YAHOO.env.ua.ie==4);var is_ie7=(YAHOO.env.ua.ie>=7);var is_ie6=(YAHOO.env.ua.ie==6);var is_ps3=(userAgent.indexOf("playstation 3")!=-1);var is_moz=(YAHOO.env.ua.gecko>0);var is_kon=(userAgent.indexOf("konqueror")!=-1);var is_ns=((userAgent.indexOf("compatible")==-1)&&(userAgent.indexOf("mozilla")!=-1)&&(!is_opera)&&(!is_webtv)&&(!is_saf));var is_ns4=((is_ns)&&(parseInt(navigator.appVersion)==4));var is_mac=(userAgent.indexOf("mac")!=-1);var pointer_cursor=(is_ie?"hand":"pointer");String.prototype.vBlength=function(){return(is_ie&&this.indexOf("\n")!=-1)?this.replace(/\r?\n/g,"_").length:this.length};if("1234".substr(-2,2)=="12"){String.prototype.substr_orig=String.prototype.substr;String.prototype.substr=function(B,A){if(typeof (A)=="undefined"){return this.substr_orig((B<0?this.length+B:B))}else{return this.substr_orig((B<0?this.length+B:B),A)}}}if(typeof Array.prototype.shift==="undefined"){Array.prototype.shift=function(){for(var C=0,A=this[0],B=this.length-1;C>>8)^A}return C^(-1)}function fetch_tag_count(B,A){return fetch_tags(B,A).length}function do_an_e(A){if(!A||is_ie){window.event.returnValue=false;window.event.cancelBubble=true;return window.event}else{A.stopPropagation();A.preventDefault();return A}}function e_by_gum(A){if(!A||is_ie){window.event.cancelBubble=true;return window.event}else{if(A.target.type=="submit"){A.target.form.submit()}A.stopPropagation();return A}}function validatemessage(B,D,A){if(D.length<1){alert(vbphrase.must_enter_subject);return false}else{var C=PHP.trim(stripcode(B,false,ignorequotechars));if(C.length2000){break}if((stopindex=PHP.stripos(F,"[/quote]"))!==false){fragment=F.substr(startindex,stopindex-startindex+8);F=F.replace(fragment,"")}else{break}F=PHP.trim(F)}}if(G){F=F.replace(/]+src="([^"]+)"[^>]*>/gi,"$1");var H=new RegExp("<(\\w+)[^>]*>","gi");var E=new RegExp("<\\/\\w+>","gi");F=F.replace(H,"");F=F.replace(E,"");var D=new RegExp("( )","gi");F=F.replace(D," ")}else{var A=new RegExp("\\[(\\w+)(=[^\\]]*)?\\]","gi");var I=new RegExp("\\[\\/(\\w+)\\]","gi");F=F.replace(A,"");F=F.replace(I,"")}return F}function truncate_to_word(D,A){var C,B;C=D.split("");if(C.length>A){for(B=C.length-1;B>-1;--B){if(B>A){C.length=B}else{if(" "===C[B]){C.length=B;break}}}C.push("...")}return C.join("")}function vB_PHP_Emulator(){}vB_PHP_Emulator.prototype.stripos=function(A,B,C){if(typeof C=="undefined"){C=0}index=A.toLowerCase().indexOf(B.toLowerCase(),C);return(index==-1?false:index)};vB_PHP_Emulator.prototype.ltrim=function(A){return A.replace(/^\s+/g,"")};vB_PHP_Emulator.prototype.rtrim=function(A){return A.replace(/(\s+)$/g,"")};vB_PHP_Emulator.prototype.trim=function(A){return this.ltrim(this.rtrim(A))};vB_PHP_Emulator.prototype.preg_quote=function(A){return A.replace(/(\+|\{|\}|\(|\)|\[|\]|\||\/|\?|\^|\$|\\|\.|\=|\!|\<|\>|\:|\*)/g,"\\$1")};vB_PHP_Emulator.prototype.match_all=function(C,E){var A=C.match(RegExp(E,"gim"));if(A){var F=new Array();var B=new RegExp(E,"im");for(var D=0;D",'"',"&");for(var B in D){if(YAHOO.lang.hasOwnProperty(D,B)){F=F.replace(D[B],C[B])}}if(E){if(is_ie){F=F.replace(/\n/g,"<#br#>")}var A=document.createElement("textarea");A.innerHTML=F;F=A.value;if(null!=A.parentNode){A.parentNode.removeChild(A)}if(is_ie){F=F.replace(/<#br#>/g,"\n")}return F}return F};vB_PHP_Emulator.prototype.unescape_cdata=function(C){var B=/<\=\!\=\[\=C\=D\=A\=T\=A\=\[/g;var A=/\]\=\]\=>/g;return C.replace(B,"")};vB_PHP_Emulator.prototype.htmlspecialchars=function(D){var C=new Array((is_mac&&is_ie?new RegExp("&","g"):new RegExp("&(?!#[0-9]+;)","g")),new RegExp("<","g"),new RegExp(">","g"),new RegExp('"',"g"));var B=new Array("&","<",">",""");for(var A=0;A=128){D=D.replace(B[C],"%u00"+A)}}}D=D.replace("%25","%u0025");return D};vB_PHP_Emulator.prototype.ucfirst=function(D,A){if(typeof A!="undefined"){var B=D.indexOf(A);if(B>0){D=D.substr(0,B)}}D=D.split(" ");for(var C=0;C-1){this.add_variable(D[E].name,D[E].options[D[E].selectedIndex].value)}}}};vB_Hidden_Form.prototype.fetch_variable=function(A){for(var B=0;B %s",this.action);document.body.appendChild(this.form).submit()};vB_Hidden_Form.prototype.build_query_string=function(){var B="";for(var A=0;A overlay handler for '%s'.",this.overlay.id)}}vB_Select_Overlay_Handler.prototype.hide=function(){if(this.browser_affected){var C=YAHOO.util.Dom.getRegion(this.overlay);var B=document.getElementsByTagName("select");for(var A=0;A=65&&A<=90&&!C&&!B)||(A>=97&&A<=122&&C)}function log_out(B){var A=document.getElementsByTagName("html")[0];A.style.filter="progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)";if(confirm(B)){return true}else{A.style.filter="";return false}}function set_cookie(B,C,A){console.log("Set Cookie :: %s = '%s'",B,C);document.cookie=B+"="+escape(C)+"; path=/"+(typeof A!="undefined"?"; expires="+A.toGMTString():"")}function set_subcookie(B,J,I,D,H,A){H=(typeof (H)=="undefined"?":":H);A=(typeof (A)=="undefined"?"#":A);var C=fetch_cookie(B);if(C!=null&&C!=""){C=C.split(H);if(C.length>0){var G="";for(var F=0;F0){for(var E=0;E0){B.style.width=parseInt(B.offsetWidth)+(E<0?-100:100)+"px"}if(A>0){B.style.height=parseInt(B.offsetHeight)+(E<0?-100:100)+"px"}return false}function region_intersects(B,A){B=typeof (B.left)=="undefined"?YAHOO.util.Dom.getRegion(B):B;A=typeof (A.left)=="undefined"?YAHOO.util.Dom.getRegion(A):A;return(B.left>A.right||B.rightA.bottom||B.bottomE){B=E}YAHOO.util.Dom.setXY(C,[viewport_info.w/2+viewport_info.x-C.clientWidth/2,B]);if(document.documentElement.dir=="rtl"){if(A){YAHOO.util.Dom.setStyle(C,"right",0)}else{YAHOO.util.Dom.setStyle(C,"right",YAHOO.util.Dom.getStyle(C,"left"))}YAHOO.util.Dom.setStyle(C,"left",null)}}function fetch_all_stylesheets(D){var G=new Array(),B=0,A=null,E=0,F=0;for(B=0;B0){window.location=vBmenu.menus[vBmenu.activemenu].addr+"&page="+pagenum}return false};vBpagenav.prototype.ibtn_onclick=function(A){return this.form.gotopage()};vBpagenav.prototype.itxt_onkeypress=function(A){return((A?A:window.event).keyCode==13?this.form.gotopage():true)};function vbmenu_register(B,A,C){if(typeof (vBmenu)=="object"){return vBmenu.register(B,A)}else{return false}}function string_to_node(B){var A=document.createElement("div");A.innerHTML=B;var C=A.firstChild;while(C&&C.nodeType!=1){C=C.nextSibling}if(!C){return A.firstChild.cloneNode(true)}else{return C.cloneNode(true)}}function set_unselectable(B){B=YAHOO.util.Dom.get(B);if(!is_ie4&&typeof B.tagName!="undefined"){if(B.hasChildNodes()){for(var A=0;A0){return A}}return new Array()};InlineModCollection.prototype.set_display_count=function(A){var B=YAHOO.util.Dom.get(this.type+"_inlinemod_count");if(B){B.innerHTML=A}};function InlineModControl(A,B,D){var C=D.type+"_imod_checkbox_"+B;this.container=YAHOO.util.Dom.get(A);this.checkbox=YAHOO.util.Dom.get(C);this.itemid=B;this.collection=D;if(this.checkbox){YAHOO.util.Event.on(this.checkbox,"click",this.set_inlinemod_state,this,true)}else{console.warn("No inlinemod selection checkbox found for "+C)}}InlineModControl.prototype.init_collection=function(A){if(typeof YAHOO.vBulletin.imodcollection=="undefined"){YAHOO.vBulletin.imodcollection=new InlineModCollection(A)}return YAHOO.vBulletin.imodcollection};InlineModControl.prototype.set_selection_from_checkbox=function(A){if(A.value!="all"){if(A.value!=this.checkbox.value){return }}this.checkbox.checked=A.checked;this.set_inlinemod_highlight()};InlineModControl.prototype.set_selection=function(A){switch(A[1]){case"invert":this.checkbox.checked=!this.checkbox.checked;break;case"none":this.checkbox.checked=false;break;case"class":this.checkbox.checked=YAHOO.util.Dom.hasClass(this.container,A[2]);break;case"flag":if(typeof A[2]!=undefined&&!isNaN(A[2])){this.checkbox.checked=this.checkbox.value&A[2]}else{this.checkbox.checked=true}break;default:case"all":this.checkbox.checked=true;break}this.set_inlinemod_highlight()};InlineModControl.prototype.set_inlinemod_state=function(){this.collection.update_state(this.itemid,this.checkbox.checked);this.set_inlinemod_highlight()};InlineModControl.prototype.set_inlinemod_highlight=function(){var A=(this.checkbox.checked?"addClass":"removeClass");YAHOO.util.Dom[A](this.container,"imod_highlight");console.log("Set Inlinemod State for %s - %s",this.itemid,A)};vB_XHTML_Ready.subscribe(init_searchboxes);function init_searchboxes(){var B=YAHOO.util.Dom.getElementsByClassName("searchbox","input");for(var A=0;AB.right){YAHOO.util.Dom.setX(H,B.right-(H.offsetWidth+2));F=YAHOO.util.Dom.getRegion(H)}if(F.leftB.bottom){YAHOO.util.Dom.setY(H,A-H.offsetHeight);F=YAHOO.util.Dom.getRegion(H)}if(F.top0){this.resizeall();YAHOO.util.Event.on(window,"resize",this.resizeall,this,true)}}vBRestrain.prototype.addcontainer=function(A){if(YAHOO.util.Dom.hasClass(A,"postcontainer")||YAHOO.util.Dom.hasClass(A,"bbcode_container")){if(!A.id){YAHOO.util.Dom.generateId(A)}var C=A.id;this.containers[C]={};this.containers[C].object=A;this.containers[C].objects={};this.additem(A,"object");this.additem(A,"iframe")}else{var B=YAHOO.util.Dom.getAncestorByClassName(A,"postcontainer");if(B){this.addcontainer(B)}}};vBRestrain.prototype.additem=function(B,A){var G=B.id;var F=YAHOO.util.Dom.getElementsByClassName("restrain",A,B);for(var E=0;EB.right){var A=D.width-(D.right-B.right)-10;if(A<=0){return }YAHOO.util.Dom.setStyle(C,"width",A+"px");YAHOO.util.Dom.setStyle(C,"height",Math.round(A/C.aspect)+"px")}else{if(D.width=C.origwidth){YAHOO.util.Dom.setStyle(C,"width",C.origwidth+"px");YAHOO.util.Dom.setStyle(C,"height",C.origheight+"px")}else{var A=D.width+G;if(A<=0){return }YAHOO.util.Dom.setStyle(C,"width",A+"px");YAHOO.util.Dom.setStyle(C,"height",Math.round(A/C.aspect)+"px")}}}}else{if(D.left=C.origwidth){YAHOO.util.Dom.setStyle(C,"width",C.origwidth+"px");YAHOO.util.Dom.setStyle(C,"height",C.origheight+"px")}else{var A=D.width+G;if(A<=0){return }YAHOO.util.Dom.setStyle(C,"width",A+"px");YAHOO.util.Dom.setStyle(C,"height",Math.round(A/C.aspect)+"px")}}}}}}};vBRestrain.prototype.resizeall=function(B){for(var A in this.containers){this.resize(this.containers[A].object)}};