if(typeof SESSIONURL=="undefined"){SESSIONURL=""}if(typeof vbphrase=="undefined"){vbphrase=new Array()}var vB_Editor=new Array();var ignorequotechars=false;var pagenavcounter=0;var userAgent=navigator.userAgent.toLowerCase();var is_opera=((userAgent.indexOf("opera")!=-1)||(typeof (window.opera)!="undefined"));var is_saf=((userAgent.indexOf("applewebkit")!=-1)||(navigator.vendor=="Apple Computer, Inc."));var is_webtv=(userAgent.indexOf("webtv")!=-1);var is_ie=((userAgent.indexOf("msie")!=-1)&&(!is_opera)&&(!is_saf)&&(!is_webtv));var is_ie4=((is_ie)&&(userAgent.indexOf("msie 4.")!=-1));var is_moz=((navigator.product=="Gecko")&&(!is_saf));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 is_regexp=(window.RegExp)?true:false;var AJAX_Compatible=false;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};function array_pop(A){if(typeof A!="object"||!A.length){return null}else{var B=A[A.length-1];A.length--;return B}}if(typeof Array.prototype.shift==="undefined"){Array.prototype.shift=function(){for(var C=0,A=this[0],B=this.length-1;C<B;C++){this[C]=this[C+1]}this.length--;return A}}function array_push(A,B){A[A.length]=B;return A.length}function fetch_object(A){if(document.getElementById){return document.getElementById(A)}else{if(document.all){return document.all[A]}else{if(document.layers){return document.layers[A]}else{return null}}}}function fetch_tags(B,A){if(B==null){return new Array()}else{if(typeof B.getElementsByTagName!="undefined"){return B.getElementsByTagName(A)}else{if(B.all&&B.all.tags){return B.all.tags(A)}else{return new Array()}}}}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(is_kon||is_saf||is_webtv){return true}else{if(D.length<1){alert(vbphrase.must_enter_subject);return false}else{var C=PHP.trim(stripcode(B,false,ignorequotechars));if(C.length<A){alert(construct_phrase(vbphrase.message_too_short,A));return false}else{if(typeof (document.forms.vbform)!="undefined"&&typeof (document.forms.vbform.imagestamp)!="undefined"){if(document.forms.vbform.imagestamp.value.length!=6){alert(vbphrase.complete_image_verification);document.forms.vbform.imagestamp.focus();return false}else{return true}}else{return true}}}}}function stripcode(F,G,B){if(!is_regexp){return F}if(B){var C=new Date().getTime();while((startindex=PHP.stripos(F,"[quote"))!==false){if(new Date().getTime()-C>2000){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(/<img[^>]+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("(&nbsp;)","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 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.unhtmlspecialchars=function(B){f=new Array(/&lt;/g,/&gt;/g,/&quot;/g,/&amp;/g);r=new Array("<",">",'"',"&");for(var A in f){B=B.replace(f[A],r[A])}return B};vB_PHP_Emulator.prototype.unescape_cdata=function(C){var B=/<\=\!\=\[\=C\=D\=A\=T\=A\=\[/g;var A=/\]\=\]\=>/g;return C.replace(B,"<![CDATA[").replace(A,"]]>")};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("&amp;","&lt;","&gt;","&quot;");for(var A=0;A<C.length;A++){D=D.replace(C[A],B[A])}return D};vB_PHP_Emulator.prototype.in_array=function(D,C,B){var E=new String(D);if(B){E=E.toLowerCase();for(var A in C){if(C[A].toLowerCase()==E){return A}}}else{for(var A in C){if(C[A]==E){return A}}}return -1};vB_PHP_Emulator.prototype.str_pad=function(C,A,B){C=new String(C);B=new String(B);if(C.length<A){padtext=new String(B);while(padtext.length<(A-C.length)){padtext+=B}C=padtext.substr(0,(A-C.length))+C}return C};vB_PHP_Emulator.prototype.urlencode=function(D){D=D.toString();var B=D.match(/[\x90-\xFF]/g);if(B){for(var C=0;C<B.length;C++){var A=B[C].charCodeAt(0);D=D.replace(B[C],"%u00"+(A&255).toString(16).toUpperCase())}}return escape(D).replace(/\+/g,"%2B")};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<D.length;C++){D[C]=D[C].substr(0,1).toUpperCase()+D[C].substr(1)}return D.join(" ")};var PHP=new vB_PHP_Emulator();function vB_AJAX_Handler(A){this.async=A?true:false}vB_AJAX_Handler.prototype.init=function(){if(typeof vb_disable_ajax!="undefined"&&vb_disable_ajax==2){return false}try{this.handler=new XMLHttpRequest();return(this.handler.setRequestHeader?true:false)}catch(e){try{this.handler=eval("new ActiveXObject('Microsoft.XMLHTTP');");return true}catch(e){return false}}};vB_AJAX_Handler.prototype.is_compatible=function(){if(typeof vb_disable_ajax!="undefined"&&vb_disable_ajax==2){return false}if(is_ie&&!is_ie4){return true}else{if(typeof XMLHttpRequest!="undefined"){try{return XMLHttpRequest.prototype.setRequestHeader?true:false}catch(B){try{var A=new XMLHttpRequest();return A.setRequestHeader?true:false}catch(B){return false}}}else{return false}}};vB_AJAX_Handler.prototype.not_ready=function(){return(this.handler.readyState&&(this.handler.readyState<4))};vB_AJAX_Handler.prototype.onreadystatechange=function(A){if(!this.handler){if(!this.init()){return false}}if(typeof A=="function"){this.handler.onreadystatechange=A}else{alert("XML Sender OnReadyState event is not a function")}};vB_AJAX_Handler.prototype.send=function(A,B){if(!this.handler){if(!this.init()){return false}}if(!this.not_ready()){this.handler.open("POST",A,this.async);this.handler.setRequestHeader("Content-Type","application/x-www-form-urlencoded");this.handler.send(B+"&s="+fetch_sessionhash());if(!this.async&&this.handler.readyState==4&&this.handler.status==200){return true}}return false};vB_AJAX_Handler.prototype.fetch_data=function(A){if(A&&A.firstChild&&A.firstChild.nodeValue){return PHP.unescape_cdata(A.firstChild.nodeValue)}else{return""}};var AJAX_Compatible=vB_AJAX_Handler.prototype.is_compatible();function vB_Hidden_Form(A){this.action=A;this.variables=new Array()}vB_Hidden_Form.prototype.add_variable=function(A,B){this.variables[this.variables.length]=new Array(A,B)};vB_Hidden_Form.prototype.add_variables_from_object=function(F){var B=fetch_tags(F,"input");for(var E=0;E<B.length;E++){switch(B[E].type){case"checkbox":case"radio":if(B[E].checked){this.add_variable(B[E].name,B[E].value)}break;case"text":case"hidden":case"password":this.add_variable(B[E].name,B[E].value);break;default:continue}}var A=fetch_tags(F,"textarea");for(var E=0;E<A.length;E++){this.add_variable(A[E].name,A[E].value)}var D=fetch_tags(F,"select");for(var E=0;E<D.length;E++){if(D[E].multiple){for(var C=0;C<D[E].options.length;C++){if(D[E].options[C].selected){this.add_variable(D[E].name,D[E].options[C].value)}}}else{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<this.variables.length;B++){if(this.variables[B][0]==A){return this.variables[B][1]}}return null};vB_Hidden_Form.prototype.submit_form=function(){this.form=document.createElement("form");this.form.method="post";this.form.action=this.action;for(var A=0;A<this.variables.length;A++){var B=document.createElement("input");B.type="hidden";B.name=this.variables[A][0];B.value=this.variables[A][1];this.form.appendChild(B)}document.body.appendChild(this.form).submit()};vB_Hidden_Form.prototype.build_query_string=function(){var B="";for(var A=0;A<this.variables.length;A++){B+=this.variables[A][0]+"="+PHP.urlencode(this.variables[A][1])+"&"}return B};vB_Hidden_Form.prototype.add_input=vB_Hidden_Form.prototype.add_variable;vB_Hidden_Form.prototype.add_inputs_from_object=vB_Hidden_Form.prototype.add_variables_from_object;function openWindow(C,D,B,A){return window.open(C,(typeof A=="undefined"?"vBPopup":A),"statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes"+(typeof D!="undefined"?(",width="+D):"")+(typeof B!="undefined"?(",height="+B):""))}function js_open_help(B,C,A){return openWindow("help.php?s="+SESSIONHASH+"&do=answer&page="+B+"&pageaction="+C+"&option="+A,600,450,"helpwindow")}function attachments(A){return openWindow("misc.php?"+SESSIONURL+"do=showattachments&t="+A,480,300)}function who(A){return openWindow("misc.php?"+SESSIONURL+"do=whoposted&t="+A,230,300)}function imwindow(D,B,C,A){return openWindow("sendmessage.php?"+SESSIONURL+"do=im&type="+D+"&u="+B,C,A)}function SendMSNMessage(A){if(!is_ie){alert(vbphrase.msn_functions_only_work_in_ie);return false}else{MsgrObj.InstantMessage(A);return false}}function AddMSNContact(A){if(!is_ie){alert(vbphrase.msn_functions_only_work_in_ie);return false}else{MsgrObj.AddContact(0,A);return false}}function detect_caps_lock(D){D=(D?D:window.event);var A=(D.which?D.which:(D.keyCode?D.keyCode:(D.charCode?D.charCode:0)));var C=(D.shiftKey||(D.modifiers&&(D.modifiers&4)));var B=(D.ctrlKey||(D.modifiers&&(D.modifiers&2)));return(A>=65&&A<=90&&!C&&!B)||(A>=97&&A<=122&&C)}function set_cookie(B,C,A){document.cookie=B+"="+escape(C)+"; path=/"+(typeof A!="undefined"?"; expires="+A.toGMTString():"")}function delete_cookie(A){document.cookie=A+"=; expires=Thu, 01-Jan-70 00:00:01 GMT; path=/"}function fetch_cookie(A){cookie_name=A+"=";cookie_length=document.cookie.length;cookie_begin=0;while(cookie_begin<cookie_length){value_begin=cookie_begin+cookie_name.length;if(document.cookie.substring(cookie_begin,value_begin)==cookie_name){var B=document.cookie.indexOf(";",value_begin);if(B==-1){B=cookie_length}return unescape(document.cookie.substring(value_begin,B))}cookie_begin=document.cookie.indexOf(" ",cookie_begin)+1;if(cookie_begin==0){break}}return null}function js_toggle_all(D,E,C,A,G){for(var B=0;B<D.elements.length;B++){var F=D.elements[B];if(F.type==E&&PHP.in_array(F.name,A,false)==-1){switch(E){case"radio":if(F.value==C){F.checked=G}break;case"select-one":F.selectedIndex=G;break;default:F.checked=G;break}}}}function js_select_all(A){exclude=new Array();exclude[0]="selectall";js_toggle_all(A,"select-one","",exclude,A.selectall.selectedIndex)}function js_check_all(A){exclude=new Array();exclude[0]="keepattachments";exclude[1]="allbox";exclude[2]="removeall";js_toggle_all(A,"checkbox","",exclude,A.allbox.checked)}function js_check_all_option(B,A){exclude=new Array();exclude[0]="useusergroup";js_toggle_all(B,"radio",A,exclude,true)}function checkall(A){js_check_all(A)}function checkall_option(B,A){js_check_all_option(B,A)}function resize_textarea(G,F){if(G<0){var B=-5;var D=-10}else{var B=5;var D=10}var A=fetch_object(F);if(typeof A.orig_rows=="undefined"){A.orig_rows=A.rows;A.orig_cols=A.cols}var C=A.rows+B;var E=A.cols+D;if(C>=A.orig_rows&&E>=A.orig_cols){A.rows=C;A.cols=E}return false}function toggle_collapse(A){if(!is_regexp){return false}obj=fetch_object("collapseobj_"+A);img=fetch_object("collapseimg_"+A);cel=fetch_object("collapsecel_"+A);if(!obj){if(img){img.style.display="none"}return false}if(obj.style.display=="none"){obj.style.display="";save_collapsed(A,false);if(img){img_re=new RegExp("_collapsed\\.gif$");img.src=img.src.replace(img_re,".gif")}if(cel){cel_re=new RegExp("^(thead|tcat)(_collapsed)$");cel.className=cel.className.replace(cel_re,"$1")}}else{obj.style.display="none";save_collapsed(A,true);if(img){img_re=new RegExp("\\.gif$");img.src=img.src.replace(img_re,"_collapsed.gif")}if(cel){cel_re=new RegExp("^(thead|tcat)$");cel.className=cel.className.replace(cel_re,"$1_collapsed")}}return false}function save_collapsed(A,E){var D=fetch_cookie("vbulletin_collapse");var C=new Array();if(D!=null){D=D.split("\n");for(var B in D){if(D[B]!=A&&D[B]!=""){C[C.length]=D[B]}}}if(E){C[C.length]=A}expires=new Date();expires.setTime(expires.getTime()+(1000*86400*365));set_cookie("vbulletin_collapse",C.join("\n"),expires)}function vBpagenav(){}vBpagenav.prototype.controlobj_onclick=function(C){this._onclick(C);var A=fetch_tags(this.menu.menuobj,"input");for(var B=0;B<A.length;B++){if(A[B].type=="text"){A[B].focus();break}}};vBpagenav.prototype.form_gotopage=function(A){if((pagenum=parseInt(fetch_object("pagenav_itxt").value,10))>0){window.location=this.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)}}function set_unselectable(B){if(!is_ie4&&typeof B.tagName!="undefined"){if(B.hasChildNodes()){for(var A=0;A<B.childNodes.length;A++){set_unselectable(B.childNodes[A])}}B.unselectable="on"}}function fetch_sessionhash(){return(SESSIONURL==""?"":SESSIONURL.substr(2,32))}function construct_phrase(){if(!arguments||arguments.length<1||!is_regexp){return false}var A=arguments;var D=A[0];var C;for(var B=1;B<A.length;B++){C=new RegExp("%"+B+"\\$s","gi");D=D.replace(C,A[B])}return D}function switch_id(C,D){var E=C.options[C.selectedIndex].value;if(E==""){return }var B=new String(window.location);var A=new String("");B=B.split("#");if(B[1]){A="#"+B[1]}B=B[0];if(B.indexOf(D+"id=")!=-1&&is_regexp){re=new RegExp(D+"id=\\d+&?");B=B.replace(re,"")}if(B.indexOf("?")==-1){B+="?"}else{lastchar=B.substr(B.length-1);if(lastchar!="&"&&lastchar!="?"){B+="&"}}window.location=B+D+"id="+E+A}function img_alt_2_title(A){if(!A.title&&A.alt!=""){A.title=A.alt}}function PostBit_Init(C,D){if(typeof vBmenu!="undefined"){var B=fetch_tags(C,"div");for(var A=0;A<B.length;A++){if(B[A].id&&B[A].id.substr(0,9)=="postmenu_"){vBmenu.register(B[A].id,true)}}}if(typeof vB_QuickEditor!="undefined"){vB_AJAX_QuickEdit_Init(C)}if(typeof vB_QuickReply!="undefined"){qr_init_buttons(C)}if(typeof mq_init!="undefined"){mq_init(C)}if(typeof vBrep!="undefined"){if(typeof D!="undefined"){vbrep_register(D)}}if(typeof inlineMod!="undefined"){im_init(C)}}function vBulletin_init(){if(is_webtv){return false}var F=fetch_tags(document,"img");for(var B=0;B<F.length;B++){img_alt_2_title(F[B])}if(typeof vBmenu=="object"){if(window.attachEvent&&!is_saf){document.attachEvent("onclick",vbmenu_hide);window.attachEvent("onresize",vbmenu_hide)}else{if(document.addEventListener&&!is_saf){document.addEventListener("click",vbmenu_hide,false);window.addEventListener("resize",vbmenu_hide,false)}else{window.onclick=vbmenu_hide;window.onresize=vbmenu_hide}}var C=fetch_tags(document,"td");for(var E=0;E<C.length;E++){if(C[E].hasChildNodes()&&C[E].firstChild.name&&C[E].firstChild.name.indexOf("PageNav")!=-1){var D=C[E].title;C[E].title="";C[E].innerHTML="";C[E].id="pagenav."+E;var A=vBmenu.register(C[E].id);if(is_saf){A.controlobj._onclick=A.controlobj.onclick;A.controlobj.onclick=vBpagenav.prototype.controlobj_onclick}}}if(typeof D!="undefined"){fetch_object("pagenav_form").addr=D;fetch_object("pagenav_form").gotopage=vBpagenav.prototype.form_gotopage;fetch_object("pagenav_ibtn").onclick=vBpagenav.prototype.ibtn_onclick;fetch_object("pagenav_itxt").onkeypress=vBpagenav.prototype.itxt_onkeypress}vBmenu.activate(true)}return true};