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);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(b){if(typeof b!="object"||!b.length){return null}else{var c=b[b.length-1];b.length--;return c}}function array_push(b,c){b[b.length]=c;return b.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(typeof b.getElementsByTagName!="undefined"){return b.getElementsByTagName(a)}else{if(b.all&&b.all.tags){return b.all.tags(a)}else{return null}}}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{return true}}}}function stripcode(g,h,b){if(!is_regexp){return g}if(b){var c=new Date().getTime();while((startindex=PHP.stripos(g,"[quote"))!==false){if(new Date().getTime()-c>2000){break}if((stopindex=PHP.stripos(g,"[/quote]"))!==false){fragment=g.substr(startindex,stopindex-startindex+8);g=g.replace(fragment,"")}else{break}g=PHP.trim(g)}}if(h){g=g.replace(/<img[^>]+src="([^"]+)"[^>]*>/gi,"$1");var i=new RegExp("<(\\w+)[^>]*>","gi");var e=new RegExp("<\\/\\w+>","gi");g=g.replace(i,"");g=g.replace(e,"");var d=new RegExp("(&nbsp;)","gi");g=g.replace(d," ")}else{var a=new RegExp("\\[(\\w+)[^\\]]*\\]","gi");var j=new RegExp("\\[\\/(\\w+)\\]","gi");g=g.replace(a,"");g=g.replace(j,"")}return g}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.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(XMLHttpRequest){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};var AJAX_Compatible=vB_AJAX_Handler.prototype.is_compatible();function vB_Hidden_Form(a){this.form=document.createElement("form");this.form.method="post";this.form.action=a}vB_Hidden_Form.prototype.add_input=function(a,c){var b=document.createElement("input");b.type="hidden";b.name=a;b.value=c;this.form.appendChild(b)};vB_Hidden_Form.prototype.add_inputs_from_object=function(g){var b=fetch_tags(g,"input");for(var e=0;e<b.length;e++){switch(b[e].type){case"checkbox":case"radio":if(b[e].checked){this.add_input(b[e].name,b[e].value)}break;case"text":case"hidden":case"password":this.add_input(b[e].name,b[e].value);break;default:continue}}var a=fetch_tags(g,"textarea");for(var e=0;e<a.length;e++){this.add_input(a[e].name,a[e].value)}var d=fetch_tags(g,"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_input(d[e].name,d[e].options[c].value)}}}else{this.add_input(d[e].name,d[e].options[d[e].selectedIndex].value)}}};vB_Hidden_Form.prototype.submit_form=function(){document.body.appendChild(this.form).submit()};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 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 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,h){for(var b=0;b<d.elements.length;b++){var g=d.elements[b];if(g.type==e&&PHP.in_array(g.name,a,false)==-1){switch(e){case"radio":if(g.value==c){g.checked=h}break;case"select-one":g.selectedIndex=h;break;default:g.checked=h;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(h,g){if(h<0){var b=-5;var d=-10}else{var b=5;var d=10}var a=fetch_object(g);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"){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 PostBit_Init(c){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)}}function vBulletin_init(){if(is_webtv){return false}var g=fetch_tags(document,"img");for(var b=0;b<g.length;b++){if(!g[b].title&&g[b].alt!=""){g[b].title=g[b].alt}}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,"page_nav.gif");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};