min.js                                                                                              0000644 0000000 0000000 00000565147 11040740736 010721  0                                                                                                    ustar   root                            root                                                                                                                                                                                                                   
function NiftyCheck(){if(!document.getElementById||!document.createElement)
return(false);isXHTML=/html\:/.test(document.getElementsByTagName('body')[0].nodeName);if(Array.prototype.push==null){Array.prototype.push=function(){this[this.length]=arguments[0];return(this.length);}}
return(true);}
function Rounded(selector,wich,bk,color,opt){var i,prefixt,prefixb,cn="r",ecolor="",edges=false,eclass="",b=false,t=false;if(color=="transparent"){cn=cn+"x";ecolor=bk;bk="transparent";}
else if(opt&&opt.indexOf("border")>=0){var optar=opt.split(" ");for(i=0;i<optar.length;i++)
if(optar[i].indexOf("#")>=0)ecolor=optar[i];if(ecolor=="")ecolor="#666";cn+="e";edges=true;}
else if(opt&&opt.indexOf("smooth")>=0){cn+="a";ecolor=Mix(bk,color);}
if(opt&&opt.indexOf("small")>=0)cn+="s";prefixt=cn;prefixb=cn;if(wich.indexOf("all")>=0){t=true;b=true}
else if(wich.indexOf("top")>=0)t="true";else if(wich.indexOf("tl")>=0){t="true";if(wich.indexOf("tr")<0)prefixt+="l";}
else if(wich.indexOf("tr")>=0){t="true";prefixt+="r";}
if(wich.indexOf("bottom")>=0)b=true;else if(wich.indexOf("bl")>=0){b="true";if(wich.indexOf("br")<0)prefixb+="l";}
else if(wich.indexOf("br")>=0){b="true";prefixb+="r";}
var v=getElementsBySelector(selector);var l=v.length;for(i=0;i<l;i++){if(edges)AddBorder(v[i],ecolor);if(t)AddTop(v[i],bk,color,ecolor,prefixt);if(b)AddBottom(v[i],bk,color,ecolor,prefixb);}}
function AddBorder(el,bc){var i;if(!el.passed){if(el.childNodes.length==1&&el.childNodes[0].nodeType==3){var t=el.firstChild.nodeValue;el.removeChild(el.lastChild);var d=CreateEl("span");d.style.display="block";d.appendChild(document.createTextNode(t));el.appendChild(d);}
for(i=0;i<el.childNodes.length;i++){if(el.childNodes[i].nodeType==1){el.childNodes[i].style.borderLeft="1px solid "+bc;el.childNodes[i].style.borderRight="1px solid "+bc;}}}
el.passed=true;}
function AddTop(el,bk,color,bc,cn){var i,lim=4,d=CreateEl("b");if(cn.indexOf("s")>=0)lim=2;if(bc)d.className="artop";else d.className="rtop";d.style.backgroundColor=bk;for(i=1;i<=lim;i++){var x=CreateEl("b");x.className=cn+i;x.style.backgroundColor=color;if(bc)x.style.borderColor=bc;d.appendChild(x);}
el.style.paddingTop=0;el.insertBefore(d,el.firstChild);}
function AddBottom(el,bk,color,bc,cn){var i,lim=4,d=CreateEl("b");if(cn.indexOf("s")>=0)lim=2;if(bc)d.className="artop";else d.className="rtop";d.style.backgroundColor=bk;for(i=lim;i>0;i--){var x=CreateEl("b");x.className=cn+i;x.style.backgroundColor=color;if(bc)x.style.borderColor=bc;d.appendChild(x);}
el.style.paddingBottom=0;el.appendChild(d);}
function CreateEl(x){if(isXHTML)return(document.createElementNS('http://www.w3.org/1999/xhtml',x));else return(document.createElement(x));}
function getElementsBySelector(selector){var i,selid="",selclass="",tag=selector,f,s=[],objlist=[];if(selector.indexOf(" ")>0){s=selector.split(" ");var fs=s[0].split("#");if(fs.length==1)return(objlist);f=document.getElementById(fs[1]);if(f)return(f.getElementsByTagName(s[1]));return(objlist);}
if(selector.indexOf("#")>0){s=selector.split("#");tag=s[0];selid=s[1];}
if(selid!=""){f=document.getElementById(selid);if(f)objlist.push(f);return(objlist);}
if(selector.indexOf(".")>0){s=selector.split(".");tag=s[0];selclass=s[1];}
var v=document.getElementsByTagName(tag);if(selclass=="")
return(v);for(i=0;i<v.length;i++){if(v[i].className.indexOf(selclass)>=0){objlist.push(v[i]);}}
return(objlist);}
function Mix(c1,c2){var i,step1,step2,x,y,r=new Array(3);if(c1.length==4)step1=1;else step1=2;if(c2.length==4)step2=1;else step2=2;for(i=0;i<3;i++){x=parseInt(c1.substr(1+step1*i,step1),16);if(step1==1)x=16*x+x;y=parseInt(c2.substr(1+step2*i,step2),16);if(step2==1)y=16*y+y;r[i]=Math.floor((x*50+y*50)/100);}
return("#"+r[0].toString(16)+r[1].toString(16)+r[2].toString(16));}
function post_groan_give(postid,integrate)
{fetch_object('post_groan_button_'+postid).style.display='none';if(integrate==true)
{fetch_object('post_thanks_button_'+postid).style.display='none';}
do_groan_add=new vB_AJAX_Handler(true);do_groan_add.postid=postid;do_groan_add.onreadystatechange(groan_add_Done);do_groan_add.send('post_groan.php?do=post_groan_add&using_ajax=1&p='+postid);}
function groan_add_Done()
{if(do_groan_add.handler.readyState==4&&do_groan_add.handler.status==200)
{fetch_object('post_groan_box_'+do_groan_add.postid).innerHTML=do_groan_add.handler.responseText;}}
function post_groan_remove_all(postid,integrate)
{do_groan_remove_all=new vB_AJAX_Handler(true)
do_groan_remove_all.postid=postid
do_groan_remove_all.onreadystatechange(groan_remove_all_Done)
do_groan_remove_all.send('post_groan.php?do=post_groan_remove_all&using_ajax=1&p='+postid)
fetch_object('post_groan_button_'+postid).style.display=''
if(integrate==true)
{fetch_object('post_thanks_button_'+postid).style.display='';}}
function groan_remove_all_Done()
{if(do_groan_remove_all.handler.readyState==4&&do_groan_remove_all.handler.status==200)
{fetch_object('post_groan_box_'+do_groan_remove_all.postid).innerHTML=do_groan_remove_all.handler.responseText}}
function post_groan_remove_user(postid,integrate)
{do_groan_remove_user=new vB_AJAX_Handler(true)
do_groan_remove_user.postid=postid
do_groan_remove_user.onreadystatechange(groan_remove_user_Done)
do_groan_remove_user.send('post_groan.php?do=post_groan_remove_user&using_ajax=1&p='+postid)
fetch_object('post_groan_button_'+postid).style.display=''
if(integrate==true)
{fetch_object('post_thanks_button_'+postid).style.display='';}}
function groan_remove_user_Done()
{if(do_groan_remove_user.handler.readyState==4&&do_groan_remove_user.handler.status==200)
{fetch_object('post_groan_box_'+do_groan_remove_user.postid).innerHTML=do_groan_remove_user.handler.responseText}}
function post_thanks_give(postid,integrate)
{fetch_object('post_thanks_button_'+postid).style.display='none';if(integrate==true)
{fetch_object('post_groan_button_'+postid).style.display='none';}
do_thanks_add=new vB_AJAX_Handler(true);do_thanks_add.postid=postid;do_thanks_add.onreadystatechange(thanks_add_Done);do_thanks_add.send('post_thanks.php?do=post_thanks_add&using_ajax=1&p='+postid);}
function thanks_add_Done()
{if(do_thanks_add.handler.readyState==4&&do_thanks_add.handler.status==200)
{fetch_object('post_thanks_box_'+do_thanks_add.postid).innerHTML=do_thanks_add.handler.responseText;}}
function post_thanks_remove_all(postid,integrate)
{do_thanks_remove_all=new vB_AJAX_Handler(true)
do_thanks_remove_all.postid=postid
do_thanks_remove_all.onreadystatechange(thanks_remove_all_Done)
do_thanks_remove_all.send('post_thanks.php?do=post_thanks_remove_all&using_ajax=1&p='+postid)
fetch_object('post_thanks_button_'+postid).style.display=''
if(integrate==true)
{fetch_object('post_groan_button_'+postid).style.display='';}}
function thanks_remove_all_Done()
{if(do_thanks_remove_all.handler.readyState==4&&do_thanks_remove_all.handler.status==200)
{fetch_object('post_thanks_box_'+do_thanks_remove_all.postid).innerHTML=do_thanks_remove_all.handler.responseText}}
function post_thanks_remove_user(postid,integrate)
{do_thanks_remove_user=new vB_AJAX_Handler(true)
do_thanks_remove_user.postid=postid
do_thanks_remove_user.onreadystatechange(thanks_remove_user_Done)
do_thanks_remove_user.send('post_thanks.php?do=post_thanks_remove_user&using_ajax=1&p='+postid)
fetch_object('post_thanks_button_'+postid).style.display=''
if(integrate==true)
{fetch_object('post_groan_button_'+postid).style.display='';}}
function thanks_remove_user_Done()
{if(do_thanks_remove_user.handler.readyState==4&&do_thanks_remove_user.handler.status==200)
{fetch_object('post_thanks_box_'+do_thanks_remove_user.postid).innerHTML=do_thanks_remove_user.handler.responseText}}var is_ie7 = false;

function check_all_array(allbox, inputname, secondary)
{
	if (secondary)
	{
		var matchname = inputname + "\\[" + secondary + "\\]";
	}
	else
	{
		var matchname = inputname;
	}

	var	checkitarray = new Array()
	var	allInputs	=	allbox.form.getElementsByTagName('input')

	for	(var i = 0;	i	<	allInputs.length;	i++)
	{
		if (allInputs[i].type	!= 'checkbox')
		{
			continue;
		}

		if (allInputs[i].name.match(matchname))
		{
			allInputs[i].checked = allbox.checked;
		}
	}
}

function preview_bbcode(previewtype)
{
	xml_sender = new vB_AJAX_Handler(true);
	xml_sender.init();

	if(!xml_sender.is_compatible() )
	{
		return true;
	}

	if (previewtype == 'module')
	{
		var inputname = 'module[options]';
	}
	else
	{
		var inputname = 'setting[custompage]';
	}

	var allow_html = 0;
	var allow_smilies = 0;
	var allow_imgcode = 0;

	if (vbform.elements[inputname + "[allow_html]"][0].checked)
	{
		var allow_html = 1;
	}

	if (vbform.elements[inputname + "[allow_smilies]"][0].checked)
	{
		var allow_smilies = 1;
	}

	if (vbform.elements[inputname + "[allow_image_code]"][0].checked)
	{
		var allow_imgcode = 1;
	}

	var message_code = vB_Editor['vB_Editor_001'].get_editor_contents();

	xml_sender.onreadystatechange(fetch_preview_output);
	xml_sender.send("vba_cmps_admin.php?do=preview", "message=" + PHP.urlencode(message_code) + "&html=" + allow_html + "&smilies=" + allow_smilies + "&imgcode=" + allow_imgcode);
	return false;
}

function fetch_preview_output()
{
	if( xml_sender.handler.readyState == 4 && xml_sender.handler.status == 200 )
	{
		if( xml_sender.handler.responseXML && fetch_tags(xml_sender.handler.responseXML, 'bbcode_text')[0] )
		{
			newwin = window.open ('vba_cmps_admin.php?do=previewcode&type=module', 'mywindow');
			newwin.document.open();
			newwin.document.write(xml_sender.fetch_data(fetch_tags(xml_sender.handler.responseXML, 'bbcode_text')[0]));
		}
	}
}
function vB_AJAX_ImageReg_Init()
{if(AJAX_Compatible&&(typeof vb_disable_ajax=='undefined'||vb_disable_ajax<2)&&fetch_object('refresh_imagereg'))
{fetch_object('refresh_imagereg').onclick=vB_AJAX_ImageReg.prototype.image_click;fetch_object('refresh_imagereg').style.cursor=pointer_cursor;fetch_object('refresh_imagereg').style.display='';if(fetch_object('imagereg'))
{fetch_object('imagereg').style.cursor=pointer_cursor;fetch_object('imagereg').onclick=vB_AJAX_ImageReg.prototype.image_click;}}};function vB_AJAX_ImageReg()
{this.xml_sender=null;this.imagehash='';var me=this;this.handle_ajax_response=function()
{if(me.xml_sender.handler.readyState==4&&me.xml_sender.handler.status==200)
{fetch_object('progress_imagereg').style.display='none';if(me.xml_sender.handler.responseXML)
{var error=me.xml_sender.fetch_data(fetch_tags(me.xml_sender.handler.responseXML,'error')[0]);if(error)
{alert(error);}
else
{var imagehash=me.xml_sender.fetch_data(fetch_tags(me.xml_sender.handler.responseXML,'imagehash')[0]);if(imagehash)
{fetch_object('imagehash').value=imagehash;fetch_object('imagereg').src='image.php?'+SESSIONURL+'type=regcheck&imagehash='+imagehash;}}}
if(is_ie)
{me.xml_sender.handler.abort();}}}};vB_AJAX_ImageReg.prototype.fetch_image=function()
{fetch_object('progress_imagereg').style.display='';this.xml_sender=new vB_AJAX_Handler(true);this.xml_sender.onreadystatechange(this.handle_ajax_response);this.xml_sender.send('ajax.php?do=imagereg&imagehash='+this.imagehash,'do=imagereg&imagehash='+this.imagehash);};vB_AJAX_ImageReg.prototype.image_click=function()
{var AJAX_ImageReg=new vB_AJAX_ImageReg();AJAX_ImageReg.imagehash=fetch_object('imagehash').value;AJAX_ImageReg.fetch_image();return false;};
function vB_AJAX_NameSuggest(varname,textobjid,menukey)
{var webkit_version=userAgent.match(/applewebkit\/([0-9]+)/);if(AJAX_Compatible&&!(is_saf&&!(webkit_version[1]>=412)))
{this.menuobj=fetch_object(menukey+'_menu');this.textobj=fetch_object(textobjid);this.textobj.onfocus=function(e){this.obj.active=true;};this.textobj.onblur=function(e){this.obj.active=false;};this.textobj.obj=this;this.varname=varname;this.menukey=menukey;this.fragment='';this.donenames='';this.selected=0;this.menuopen=false;this.timeout=null;this.names=new Array();this.xml_sender=null;this.active=false;this.allow_multiple=false;this.min_chars=3;this.get_text=function()
{if(this.allow_multiple)
{var semicolon=this.textobj.value.lastIndexOf(';');if(semicolon==-1)
{this.donenames=new String('');this.fragment=new String(this.textobj.value);}
else
{this.donenames=new String(this.textobj.value.substring(0,semicolon+1));this.fragment=new String(this.textobj.value.substring(semicolon+1));}}
else
{this.fragment=new String(this.textobj.value);}
this.fragment=PHP.trim(this.fragment);}
this.set_text=function(i)
{if(this.allow_multiple)
{this.textobj.value=PHP.ltrim(this.donenames+" "+PHP.unhtmlspecialchars(this.names[i])+" ; ");}
else
{this.textobj.value=PHP.unhtmlspecialchars(this.names[i]);}
this.textobj.focus();this.menu_hide();return false;}
this.move_row_selection=function(increment)
{var newval=parseInt(this.selected,10)+parseInt(increment,10);if(newval<0)
{newval=this.names.length-1;}
else if(newval>=this.names.length)
{newval=0;}
this.set_row_selection(newval);return false;}
this.set_row_selection=function(i)
{var tds=fetch_tags(this.menuobj,'td');tds[this.selected].className='vbmenu_option';this.selected=i;tds[this.selected].className='vbmenu_hilite';}
this.key_event_handler=function(evt)
{evt=evt?evt:window.event;if(this.menuopen)
{switch(evt.keyCode)
{case 38:{this.move_row_selection(-1);return false;}
case 40:{this.move_row_selection(1);return false;}
case 27:{this.menu_hide();return false;}
case 13:{this.set_text(this.selected);return false;}}}
this.get_text();if(this.fragment.length>=this.min_chars)
{clearTimeout(this.timeout);this.timeout=setTimeout(this.varname+'.name_search();',500);}
else
{this.menu_hide();}}
this.name_search=function()
{if(this.active)
{this.names=new Array();if(!this.xml_sender)
{this.xml_sender=new vB_AJAX_Handler(true);}
this.xml_sender.onreadystatechange(this.onreadystatechange);this.xml_sender.send('ajax.php?do=usersearch','do=usersearch&fragment='+PHP.urlencode(this.fragment));}}
var me=this;this.onreadystatechange=function()
{if(me.xml_sender.handler.readyState==4&&me.xml_sender.handler.status==200&&me.xml_sender.handler.responseXML)
{var users=fetch_tags(me.xml_sender.handler.responseXML,'user');for(i=0;i<users.length;i++)
{me.names[i]=me.xml_sender.fetch_data(users[i]);}
if(me.names.length>0)
{me.menu_build();me.menu_show();}
else
{me.menu_hide();}
me.xml_sender.handler.abort();}}
this.menu_build=function()
{this.menu_empty();var re=new RegExp('^('+PHP.preg_quote(this.fragment)+')',"i");var table=document.createElement('table');table.cellPadding=4;table.cellSpacing=1;table.border=0;for(i in this.names)
{var td=table.insertRow(-1).insertCell(-1);td.className=(i==this.selected?'vbmenu_hilite':'vbmenu_option');td.title='nohilite';td.innerHTML='<a onclick="return '+this.varname+'.set_text('+i+')">'+this.names[i].replace(re,'<strong>$1</strong>')+'</a>';}
this.menuobj.appendChild(table);if(this.vbmenu==null)
{if(typeof(vBmenu.menus[this.menukey])!='undefined')
{this.vbmenu=vBmenu.menus[this.menukey];}
else
{this.vbmenu=vBmenu.register(this.menukey,true);}}
else
{this.vbmenu.init_menu_contents();}}
this.menu_empty=function()
{this.selected=0;while(this.menuobj.firstChild)
{this.menuobj.removeChild(this.menuobj.firstChild);}}
this.menu_show=function()
{if(this.active)
{this.vbmenu.show(fetch_object(this.menukey),this.menuopen);this.menuopen=true;}}
this.menu_hide=function()
{try
{this.vbmenu.hide();}
catch(e){}
this.menuopen=false;}
this.textobj.onkeyup=function(e){return this.obj.key_event_handler(e);};this.textobj.onkeypress=function(e)
{e=e?e:window.event;if(e.keyCode==13)
{return(this.obj.menuopen?false:true);}};}}
var quote_editorid;var quote_xml;function init_unquoted_posts(editorid,threadid)
{var fetch_link=fetch_object('multiquote_more');if(fetch_link)
{fetch_link.onclick=function(){return handle_unquoted_posts(editorid,threadid,'fetch');};}
var deselect_link=fetch_object('multiquote_deselect');if(deselect_link)
{deselect_link.onclick=function(){return handle_unquoted_posts(editorid,threadid,'deselect');};}}
function handle_unquoted_posts(editorid,threadid,type)
{quote_editorid=editorid;quote_xml=new vB_AJAX_Handler(true);quote_xml.onreadystatechange(handle_ajax_unquoted_response);quote_xml.send('newreply.php?do=unquotedposts&threadid='+threadid,'do=unquotedposts&threadid='+threadid
+'&wysiwyg='+(vB_Editor[quote_editorid].wysiwyg_mode?1:0)
+'&type='+PHP.urlencode(type));return false;}
function handle_ajax_unquoted_response()
{if(quote_xml.handler.readyState==4&&quote_xml.handler.status==200)
{if(quote_xml.handler.responseXML)
{if(fetch_tags(quote_xml.handler.responseXML,'quotes')[0])
{vB_Editor[quote_editorid].history.add_snapshot(vB_Editor[quote_editorid].get_editor_contents());vB_Editor[quote_editorid].insert_text(quote_xml.fetch_data(fetch_tags(quote_xml.handler.responseXML,'quotes')[0]));vB_Editor[quote_editorid].collapse_selection_end();vB_Editor[quote_editorid].history.add_snapshot(vB_Editor[quote_editorid].get_editor_contents());var multiquote_empty_input=fetch_object('multiquote_empty_input');if(multiquote_empty_input)
{multiquote_empty_input.value='all';}}
else if(fetch_tags(quote_xml.handler.responseXML,'mqpostids')[0])
{set_cookie('vbulletin_multiquote',quote_xml.fetch_data(fetch_tags(quote_xml.handler.responseXML,'mqpostids')[0]));}
var unquoted_posts=fetch_object('unquoted_posts');if(unquoted_posts)
{unquoted_posts.style.display='none';}}
if(is_ie)
{quote_xml.handler.abort();}}}
function vbrep_register(postid)
{if(typeof vBrep=='object'&&typeof postid!='undefined')
{return vBrep.register(postid);}}
function vB_Reputation_Handler()
{this.reps=new Array();this.ajax=new Array();};vB_Reputation_Handler.prototype.register=function(postid)
{if(AJAX_Compatible&&(typeof vb_disable_ajax=='undefined'||vb_disable_ajax<2))
{this.reps[postid]=new vB_Reputation_Object(postid);if(obj=fetch_object('reputation_'+postid))
{obj.onclick=vB_Reputation_Object.prototype.reputation_click;return this.reps[postid];}}};vBrep=new vB_Reputation_Handler();function vB_Reputation_Object(postid)
{this.postid=postid;this.divname='reputationmenu_'+postid+'_menu';this.divobj=null;this.postobj=fetch_object('post'+postid);this.vbmenuname='reputationmenu_'+postid;this.vbmenu=null;this.xml_sender_populate=null;this.xml_sender_submit=null;var me=this;this.onreadystatechange_populate=function()
{if(me.xml_sender_populate.handler.readyState==4&&me.xml_sender_populate.handler.status==200)
{if(me.xml_sender_populate.handler.responseXML)
{var error=me.xml_sender_populate.fetch_data(fetch_tags(me.xml_sender_populate.handler.responseXML,'error')[0]);if(error)
{alert(error);}
else
{if(!me.divobj)
{me.divobj=document.createElement('div');me.divobj.id=me.divname;me.divobj.style.display='none';me.divobj.onkeypress=vB_Reputation_Object.prototype.repinput_onkeypress;me.postobj.parentNode.appendChild(me.divobj);me.vbmenu=vbmenu_register(me.vbmenuname,true);fetch_object(me.vbmenu.controlkey).onmouseover='';fetch_object(me.vbmenu.controlkey).onclick='';}
me.divobj.innerHTML=me.xml_sender_populate.fetch_data(fetch_tags(me.xml_sender_populate.handler.responseXML,'reputationbit')[0]);var inputs=fetch_tags(me.divobj,'input');for(var i=0;i<inputs.length;i++)
{if(inputs[i].type=='submit')
{var sbutton=inputs[i];var button=document.createElement('input');button.type='button';button.className=sbutton.className;button.value=sbutton.value;button.onclick=vB_Reputation_Object.prototype.submit_onclick;sbutton.parentNode.insertBefore(button,sbutton);sbutton.parentNode.removeChild(sbutton);button.name=sbutton.name;button.id=sbutton.name+'_'+me.postid}}
me.vbmenu.show(fetch_object(me.vbmenuname));}}
if(is_ie)
{me.xml_sender_populate.handler.abort();}}}
this.onreadystatechange_submit=function()
{if(me.xml_sender_submit.handler.readyState==4&&me.xml_sender_submit.handler.status==200)
{if(me.xml_sender_submit.handler.responseXML)
{if(!me.vbmenu)
{me.vbmenu=vbmenu_register(me.vbmenuname,true);fetch_object(me.vbmenu.controlkey).onmouseover='';fetch_object(me.vbmenu.controlkey).onclick='';}
var error=me.xml_sender_submit.fetch_data(fetch_tags(me.xml_sender_submit.handler.responseXML,'error')[0]);if(error)
{me.vbmenu.hide(fetch_object(me.vbmenuname));alert(error);}
else
{me.vbmenu.hide(fetch_object(me.vbmenuname));var repinfo=fetch_tags(me.xml_sender_submit.handler.responseXML,'reputation')[0];var repdisplay=repinfo.getAttribute('repdisplay');var reppower=repinfo.getAttribute('reppower');var userid=repinfo.getAttribute('userid');var spans=fetch_tags(document,'span');var postid=null;var match=null;for(var i=0;i<spans.length;i++)
{if(match=spans[i].id.match(/^reppower_(\d+)_(\d+)$/))
{if(match[2]==userid)
{spans[i].innerHTML=reppower;}}
else if(match=spans[i].id.match(/^repdisplay_(\d+)_(\d+)$/))
{if(match[2]==userid)
{spans[i].innerHTML=repdisplay;}}}
alert(me.xml_sender_submit.fetch_data(repinfo));}}
if(is_ie)
{me.xml_sender_submit.handler.abort();}}}}
vB_Reputation_Object.prototype.reputation_click=function(e)
{e=e?e:window.event;do_an_e(e);var postid=this.id.substr(this.id.lastIndexOf('_')+1);var repobj=vBrep.reps[postid];if(repobj.vbmenu==null)
{repobj.populate();}
else if(vBmenu.activemenu!=repobj.vbmenuname)
{repobj.vbmenu.show(fetch_object(repobj.vbmenuname));}
else
{repobj.vbmenu.hide();}
return true;}
vB_Reputation_Object.prototype.submit_onclick=function(e)
{e=e?e:window.event;do_an_e(e);var postid=this.id.substr(this.id.lastIndexOf('_')+1);var repobj=vBrep.reps[postid];repobj.submit();return false;}
vB_Reputation_Object.prototype.repinput_onkeypress=function(e)
{e=e?e:window.event;switch(e.keyCode)
{case 13:{vBrep.reps[this.id.split(/_/)[1]].submit();return false;}
default:{return true;}}}
vB_Reputation_Object.prototype.populate=function()
{this.xml_sender_populate=new vB_AJAX_Handler(true);this.xml_sender_populate.onreadystatechange(this.onreadystatechange_populate);this.xml_sender_populate.send('reputation.php?p='+this.postid,'p='+this.postid+'&ajax=1');}
vB_Reputation_Object.prototype.submit=function()
{this.psuedoform=new vB_Hidden_Form('reputation.php');this.psuedoform.add_variable('ajax',1);this.psuedoform.add_variables_from_object(this.divobj);this.xml_sender_submit=new vB_AJAX_Handler(true);this.xml_sender_submit.onreadystatechange(this.onreadystatechange_submit)
this.xml_sender_submit.send('reputation.php?do=addreputation&p='+this.psuedoform.fetch_variable('p')+'&reputation='+this.psuedoform.fetch_variable('reputation')+'&reason='+PHP.urlencode(this.psuedoform.fetch_variable('reason')),this.psuedoform.build_query_string());}
function vB_AJAX_SearchPrefs_Init(buttonid)
{if(AJAX_Compatible&&(typeof vb_disable_ajax=='undefined'||vb_disable_ajax<2)&&fetch_object(buttonid))
{var sbutton=fetch_object(buttonid);sbutton.onclick=vB_AJAX_SearchPrefs.prototype.form_click;}};function vB_AJAX_SearchPrefs(formobj)
{this.xml_sender=null;this.pseudoform=new vB_Hidden_Form('search.php');this.pseudoform.add_variable('ajax',1);this.pseudoform.add_variable('doprefs',1);this.pseudoform.add_variables_from_object(formobj);var me=this;this.handle_ajax_response=function()
{if(me.xml_sender.handler.readyState==4&&me.xml_sender.handler.status==200)
{if(me.xml_sender.handler.responseXML)
{var obj=fetch_object(me.objid);var error=me.xml_sender.fetch_data(fetch_tags(me.xml_sender.handler.responseXML,'error')[0]);if(error)
{alert(error);}
else
{var message=me.xml_sender.fetch_data(fetch_tags(me.xml_sender.handler.responseXML,'message')[0]);if(message)
{alert(message);}}}
if(is_ie)
{me.xml_sender.handler.abort();}}}};vB_AJAX_SearchPrefs.prototype.submit=function()
{this.xml_sender=new vB_AJAX_Handler(true);this.xml_sender.onreadystatechange(this.handle_ajax_response);this.xml_sender.send('search.php?',this.pseudoform.build_query_string());};vB_AJAX_SearchPrefs.prototype.form_click=function()
{var AJAX_SearchPrefs=new vB_AJAX_SearchPrefs(this.form);AJAX_SearchPrefs.submit();return false;};
function vB_AJAX_ThreadRate_Init(formid)
{var formobj=fetch_object(formid);if(AJAX_Compatible&&(typeof vb_disable_ajax=='undefined'||vb_disable_ajax<2)&&formobj)
{for(var i=0;i<formobj.elements.length;i++)
{if(formobj.elements[i].type=='submit')
{var sbutton=formobj.elements[i];var button=document.createElement('input');button.type='button';button.className=sbutton.className;button.value=sbutton.value;button.onclick=vB_AJAX_ThreadRate.prototype.form_click;sbutton.parentNode.insertBefore(button,sbutton);sbutton.parentNode.removeChild(sbutton);}}}};function vB_AJAX_ThreadRate(formobj)
{this.xml_sender=null;this.pseudoform=new vB_Hidden_Form('threadrate.php');this.pseudoform.add_variable('ajax',1);this.pseudoform.add_variables_from_object(formobj);this.output_element_id='threadrating_current';var me=this;this.handle_ajax_response=function()
{if(me.xml_sender.handler.readyState==4&&me.xml_sender.handler.status==200)
{if(me.xml_sender.handler.responseXML)
{var obj=fetch_object(me.objid);var error=me.xml_sender.fetch_data(fetch_tags(me.xml_sender.handler.responseXML,'error')[0]);if(error)
{if(vBmenu.activemenu=='threadrating')
{vBmenu.hide();}
alert(error);}
else
{var newrating=me.xml_sender.fetch_data(fetch_tags(me.xml_sender.handler.responseXML,'voteavg')[0]);if(newrating!='')
{fetch_object(me.output_element_id).innerHTML=newrating;}
if(vBmenu.activemenu=='threadrating')
{vBmenu.hide();}
var message=me.xml_sender.fetch_data(fetch_tags(me.xml_sender.handler.responseXML,'message')[0]);if(message)
{alert(message);}}}
if(is_ie)
{me.xml_sender.handler.abort();}}}};vB_AJAX_ThreadRate.prototype.rate=function()
{this.xml_sender=new vB_AJAX_Handler(true);this.xml_sender.onreadystatechange(this.handle_ajax_response);this.xml_sender.send('threadrate.php?t='+threadid+'&vote='+PHP.urlencode(this.pseudoform.fetch_variable('vote')),this.pseudoform.build_query_string());};vB_AJAX_ThreadRate.prototype.form_click=function()
{var AJAX_ThreadRate=new vB_AJAX_ThreadRate(this.form);AJAX_ThreadRate.rate();return false;};
var vB_ThreadTitle_Editor=null;function vB_AJAX_Threadlist_Init(threadlistid)
{if(AJAX_Compatible&&(typeof vb_disable_ajax=='undefined'||vb_disable_ajax<2))
{var tds=fetch_tags(fetch_object(threadlistid),'td');for(var i=0;i<tds.length;i++)
{if(tds[i].hasChildNodes()&&tds[i].id&&tds[i].id.substr(0,3)=='td_')
{var anchors=fetch_tags(tds[i],'a');for(var j=0;j<anchors.length;j++)
{if(anchors[j].name&&anchors[j].name.indexOf('vB::AJAX')!=-1)
{var details=tds[i].id.split('_');switch(details[1])
{case'threadtitle':{if(typeof vb_disable_ajax=='undefined'||vb_disable_ajax==0)
{tds[i].style.cursor='default';tds[i].ondblclick=vB_AJAX_ThreadList_Events.prototype.threadtitle_doubleclick;}}
break;case'threadstatusicon':{tds[i].style.cursor=pointer_cursor;tds[i].ondblclick=vB_AJAX_ThreadList_Events.prototype.threadicon_doubleclick;}
break;}
break;}}}}}}
function vB_AJAX_OpenClose(obj)
{this.obj=obj;this.threadid=this.obj.id.substr(this.obj.id.lastIndexOf('_')+1);this.imgobj=fetch_object('thread_statusicon_'+this.threadid);this.xml_sender=null;this.toggle=function()
{this.xml_sender=new vB_AJAX_Handler(true);this.xml_sender.onreadystatechange(this.onreadystatechange);this.xml_sender.send('ajax.php?do=updatethreadopen&t='+this.threadid,'do=updatethreadopen&t='+this.threadid+'&src='+PHP.urlencode(this.imgobj.src));}
var me=this;this.onreadystatechange=function()
{if(me.xml_sender.handler.readyState==4&&me.xml_sender.handler.status==200)
{if(me.xml_sender.handler.responseXML)
{me.imgobj.src=me.xml_sender.fetch_data(fetch_tags(me.xml_sender.handler.responseXML,'imagesrc')[0]);if(iobj=fetch_object("tlist_"+me.threadid))
{if(me.imgobj.src.indexOf('_lock')!=-1)
{iobj.value=iobj.value|1;}
else
{iobj.value=iobj.value&~1;}}}
if(is_ie)
{me.xml_sender.handler.abort();}}}
this.toggle();}
function vB_AJAX_TitleEdit(obj)
{this.obj=obj;this.threadid=this.obj.id.substr(this.obj.id.lastIndexOf('_')+1);this.linkobj=fetch_object('thread_title_'+this.threadid);this.container=this.linkobj.parentNode;this.editobj=null;this.xml_sender=null;this.origtitle='';this.editstate=false;this.edit=function()
{if(this.editstate==false)
{this.inputobj=document.createElement('input');this.inputobj.type='text';this.inputobj.size=50;this.inputobj.maxLength=((typeof(titlemaxchars)=="number"&&titlemaxchars>0)?titlemaxchars:85);this.inputobj.style.width=Math.max(this.linkobj.offsetWidth,250)+'px';this.inputobj.className='bginput';this.inputobj.value=PHP.unhtmlspecialchars(this.linkobj.innerHTML);this.inputobj.title=this.inputobj.value;this.inputobj.onblur=vB_AJAX_ThreadList_Events.prototype.titleinput_onblur;this.inputobj.onkeypress=vB_AJAX_ThreadList_Events.prototype.titleinput_onkeypress;this.editobj=this.container.insertBefore(this.inputobj,this.linkobj);this.editobj.select();this.origtitle=this.linkobj.innerHTML;this.linkobj.style.display='none';this.editstate=true;}}
this.restore=function()
{if(this.editstate==true)
{if(this.editobj.value!=this.origtitle)
{this.linkobj.innerHTML=PHP.htmlspecialchars(this.editobj.value);this.save(this.editobj.value);}
else
{this.linkobj.innerHTML=this.editobj.value;}
this.container.removeChild(this.editobj);this.linkobj.style.display='';this.editstate=false;this.obj=null;}}
this.save=function(titletext)
{this.xml_sender=new vB_AJAX_Handler(true);this.xml_sender.onreadystatechange(this.onreadystatechange);this.xml_sender.send('ajax.php?do=updatethreadtitle&t='+this.threadid,'do=updatethreadtitle&t='+this.threadid+'&title='+PHP.urlencode(titletext));}
var me=this;this.onreadystatechange=function()
{if(me.xml_sender.handler.readyState==4&&me.xml_sender.handler.status==200)
{if(me.xml_sender.handler.responseXML)
{me.linkobj.innerHTML=me.xml_sender.fetch_data(fetch_tags(me.xml_sender.handler.responseXML,'linkhtml')[0]);}
if(is_ie)
{me.xml_sender.handler.abort();}
vB_ThreadTitle_Editor.obj=null;}}
this.edit();}
function vB_AJAX_ThreadList_Events()
{}
vB_AJAX_ThreadList_Events.prototype.threadtitle_doubleclick=function(e)
{if(vB_ThreadTitle_Editor&&vB_ThreadTitle_Editor.obj==this)
{return false;}
else
{try
{vB_ThreadTitle_Editor.restore();}
catch(e){}
vB_ThreadTitle_Editor=new vB_AJAX_TitleEdit(this);}};vB_AJAX_ThreadList_Events.prototype.threadicon_doubleclick=function(e)
{openclose=new vB_AJAX_OpenClose(this);};vB_AJAX_ThreadList_Events.prototype.titleinput_onblur=function(e)
{vB_ThreadTitle_Editor.restore();};vB_AJAX_ThreadList_Events.prototype.titleinput_onkeypress=function(e)
{e=e?e:window.event;switch(e.keyCode)
{case 13:{vB_ThreadTitle_Editor.inputobj.blur();return false;}
case 27:{vB_ThreadTitle_Editor.inputobj.value=vB_ThreadTitle_Editor.origtitle;vB_ThreadTitle_Editor.inputobj.blur();return true;}}};
function vB_AJAX_Userlist_Init(forms)
{if(AJAX_Compatible&&(typeof vb_disable_ajax=='undefined'||vb_disable_ajax==0))
{for(var i=0;i<arguments.length;i++)
{var form=document.getElementById(arguments[i]);if(form)
{form.onsubmit=vB_AJAX_Userlist.prototype.form_click;}}}};function vB_AJAX_Userlist(formobj)
{this.xml_sender=null;this.pseudoform=new vB_Hidden_Form('');this.pseudoform.add_variable('ajax',1);this.pseudoform.add_variables_from_object(formobj);this.list=formobj.id.replace(/userlist_(\w+)form/,'$1');var me=this;this.handle_ajax_response=function()
{if(me.xml_sender.handler.readyState==4&&me.xml_sender.handler.status==200)
{if(fetch_object('userfield_'+me.list+'_progress'))
{fetch_object('userfield_'+me.list+'_progress').style.display='none';}
if(me.xml_sender.handler.responseXML)
{var error=me.xml_sender.fetch_data(fetch_tags(me.xml_sender.handler.responseXML,'error')[0]);if(error)
{fetch_object('userfield_'+me.list+'_errortext').innerHTML=error;fetch_object('userfield_'+me.list+'_error').style.display='';}
else
{fetch_object('userfield_'+me.list+'_error').style.display='none';fetch_object('userfield_'+me.list+'_txt').value='';fetch_object(me.list+'list1').innerHTML=me.xml_sender.fetch_data(fetch_tags(me.xml_sender.handler.responseXML,'listbit1')[0]);fetch_object(me.list+'list2').innerHTML=me.xml_sender.fetch_data(fetch_tags(me.xml_sender.handler.responseXML,'listbit2')[0]);}}
if(is_ie)
{me.xml_sender.handler.abort();}}}};vB_AJAX_Userlist.prototype.submit_form=function(action)
{if(fetch_object('userfield_'+this.list+'_progress'))
{fetch_object('userfield_'+this.list+'_progress').style.display='';}
this.xml_sender=new vB_AJAX_Handler(true);this.xml_sender.onreadystatechange(this.handle_ajax_response);this.xml_sender.send(action,this.pseudoform.build_query_string());};vB_AJAX_Userlist.prototype.form_click=function()
{var AJAX_Userlist=new vB_AJAX_Userlist(this);AJAX_Userlist.submit_form(this.action);return false;};
function vB_AJAX_WolResolve_Init(woltableid)
{if(AJAX_Compatible&&(typeof vb_disable_ajax=='undefined'||vb_disable_ajax<2))
{var link_list=fetch_tags(fetch_object(woltableid),'a');for(var i=0;i<link_list.length;i++)
{if(link_list[i].id&&link_list[i].id.substr(0,10)=='resolveip_'&&link_list[i].innerHTML.match(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/))
{link_list[i].onclick=resolve_ip_click;}}}}
function vB_AJAX_WolResolve(ip,objid)
{this.ip=ip;this.objid=objid;this.xml_sender=null;var me=this;this.resolve=function()
{this.xml_sender=new vB_AJAX_Handler(true);this.xml_sender.onreadystatechange(this.onreadystatechange);this.xml_sender.send('online.php?do=resolveip&ipaddress='+PHP.urlencode(this.ip),'do=resolveip&ajax=1&ipaddress='+PHP.urlencode(this.ip));}
this.onreadystatechange=function()
{if(me.xml_sender.handler.readyState==4&&me.xml_sender.handler.status==200)
{if(me.xml_sender.handler.responseXML)
{var obj=fetch_object(me.objid);obj.parentNode.insertBefore(document.createTextNode(me.xml_sender.fetch_data(fetch_tags(me.xml_sender.handler.responseXML,'ipaddress')[0])),obj);obj.parentNode.removeChild(obj);}
if(is_ie)
{me.xml_sender.handler.abort();}}}}
function resolve_ip_click(e)
{var resolver=new vB_AJAX_WolResolve(this.innerHTML,this.id);resolver.resolve();return false;}
function vB_Attachment(listobjid,editorid)
{this.attachments=new Array();this.menu_contents=new Array();this.windows=new Array();this.listobjid=listobjid;if(editorid=='')
{for(var editorid in vB_Editor)
{if(typeof vB_Editor[editorid]!='function')
{this.editorid=editorid;break;}}}
else
{this.editorid=(editorid?editorid:null);}};vB_Attachment.prototype.popup_exists=function()
{if(this.editorid&&((typeof vB_Editor[this.editorid].popups['attach']!='undefined'&&vB_Editor[this.editorid].popups['attach']!=null)||(!vB_Editor[this.editorid].popupmode&&typeof vB_Editor[this.editorid].buttons['attach']!='undefined'&&vB_Editor[this.editorid].buttons['attach']!=null)))
{return true;}
else
{return false;}};vB_Attachment.prototype.add=function(id,filename,filesize,imgpath)
{this.attachments[id]=new Array();this.attachments[id]={'filename':filename,'filesize':filesize,'imgpath':imgpath};this.update_list();};vB_Attachment.prototype.remove=function(id)
{if(typeof this.attachments[id]!='undefined')
{this.attachments[id]=null;this.update_list();}};vB_Attachment.prototype.has_attachments=function()
{for(var id in this.attachments)
{if(this.attachments[id]!=null)
{return true;}}
return false;};vB_Attachment.prototype.reset=function()
{this.attachments=new Array();this.update_list();};vB_Attachment.prototype.build_list=function(listobjid)
{var listobj=fetch_object(listobjid);if(listobjid!=null)
{while(listobj.hasChildNodes())
{listobj.removeChild(listobj.firstChild);}
for(var id in this.attachments)
{var div=document.createElement('div');if(typeof newpost_attachmentbit!='undefined')
{div.innerHTML=construct_phrase(newpost_attachmentbit,this.attachments[id]['imgpath'],SESSIONURL,id,Math.ceil((new Date().getTime())/1000),this.attachments[id]['filename'],this.attachments[id]['filesize']);}
else
{div.innerHTML='<div style="margin:2px"><img src="'+this.attachments[id]['imgpath']+'" alt="" class="inlineimg" /> '+'<a href="attachment.php?'+SESSIONURL+'attachmentid='+id+'&stc=1&d='+Math.ceil((new Date().getTime())/1000)+'" target="_blank" />'+this.attachments[id]['filename']+'</a> '+'('+this.attachments[id]['filesize']+')</div>';}
listobj.appendChild(div);}}};vB_Attachment.prototype.update_list=function()
{this.build_list(this.listobjid);if(this.popup_exists())
{vB_Editor[this.editorid].build_attachments_popup(vB_Editor[this.editorid].popupmode?vB_Editor[this.editorid].popups['attach']:vB_Editor[this.editorid].buttons['attach'],vB_Editor[this.editorid].buttons['attach']);}};vB_Attachment.prototype.open_window=function(url,width,height,hash)
{if(typeof(this.windows[hash])!='undefined'&&this.windows[hash].closed==false)
{this.windows[hash].focus();}
else
{this.windows[hash]=openWindow(url,width,height,'Attach'+hash);}
return this.windows[hash];};
var activeElementId=0;var colorPickerType=0;var pickerReady=false;var colors=new Array("00","33","66","99","CC","FF");var specialColors=new Array('#000000','#333333','#666666','#999999','#CCCCCC','#FFFFFF','#FF0000','#00FF00','#0000FF','#FFFF00','#00FFFF','#FF00FF');function init_color_preview()
{if(typeof(numColors)!="undefined")
{for(var i=0;i<numColors;i++)
{preview_color(i);}
if(colorPickerType!=0)
{init_color_picker(colorPickerType);}
pickerReady=true;}}
function preview_color(elm)
{var colorElement=fetch_object("color_"+elm);var previewElement=fetch_object("preview_"+elm);var cssRegExp=new RegExp(/url\(('|"|)((http:\/\/|\/)?)(.*)\1\)/i);if(is_transparent(colorElement.value))
{previewElement.style.background="none";previewElement.style.borderStyle="dashed";previewElement.title=window.status="";}
else
{var cssValue=colorElement.value;var matches;if(matches=colorElement.value.match(cssRegExp))
{if(typeof matches[3]=="undefined"||matches[3]=="")
{cssValue=colorElement.value.replace(matches[4],(bburl+matches[4]));}}
try
{previewElement.style.background=cssValue;previewElement.style.borderStyle="inset";previewElement.title=window.status="";}
catch(csserror)
{previewElement.style.background="url('../cpstyles/"+cpstylefolder+"/cp_help.gif') no-repeat center";previewElement.style.borderStyle="dashed";previewElement.title=window.status=construct_phrase(vbphrase["css_value_invalid"],cssValue);}}}
function set_swatch_color(x,y,color)
{fetch_object("sw"+x+"-"+y).style.backgroundColor=color;}
function init_color_picker(setPickerType)
{colorPickerType=setPickerType;fetch_object("colorPickerType").value=setPickerType;var y,x,i,j;if(setPickerType<2)
{for(y=0;y<12;y++)
{set_swatch_color(0,y,'#000000');set_swatch_color(1,y,specialColors[y]);set_swatch_color(2,y,'#000000');}}
switch(setPickerType)
{case 0:{green=new Array(5,4,3,2,1,0,0,1,2,3,4,5);blue=new Array(0,0,0,5,4,3,2,1,0,0,1,2,3,4,5,5,4,3,2,1,0);for(y=0;y<12;y++)
{for(x=3;x<21;x++)
{r=Math.floor((20-x)/6)*2+Math.floor(y/6);g=green[y];b=blue[x];set_swatch_color(x,y,"#"+colors[r]+colors[g]+colors[b]);}}}
break;case 1:{green=new Array(0,0,0,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5);blue=new Array(0,1,2,3,4,5,0,1,2,3,4,5);for(y=0;y<12;y++)
{for(x=3;x<21;x++)
{r=Math.floor((x-3)/6)+Math.floor(y/6)*3;g=green[x];b=blue[y];set_swatch_color(x,y,"#"+colors[r]+colors[g]+colors[b]);}}}
break;case 2:{i=255;j=-1;for(y=0;y<12;y++)
{for(x=0;x<21;x++)
{set_swatch_color(x,y,"rgb("+i+","+i+","+i+")");i--;if(i==4)
{i=0;}}}}
break;case 3:case 4:case 5:case 6:case 7:case 8:{i=255;j=255;for(y=0;y<12;y++)
{for(x=0;x<21;x++)
{acolor=Math.round(j);bcolor=Math.round(i);if(acolor<0)
{acolor=0;}
switch(setPickerType)
{case 3:r=acolor;g=bcolor;b=bcolor;break;case 4:r=bcolor;g=acolor;b=bcolor;break;case 5:r=bcolor;g=bcolor;b=acolor;break;case 6:r=acolor;g=acolor;b=bcolor;break;case 7:r=acolor;g=bcolor;b=acolor;break;case 8:r=bcolor;g=acolor;b=acolor;break;}
set_swatch_color(x,y,"rgb("+r+","+g+","+b+")");if(i>1)
{i-=2.03174;}
else
{i=0;if(j>1.03)
{j-=2.03174;}}}}}
break;default:return false;}
pickerReady=true;return true;}
function switch_color_picker(direction)
{if(direction>0)
{if(colorPickerType<8)
{colorPickerType++;}
else
{colorPickerType=0;}}
else
{if(colorPickerType>0)
{colorPickerType--;}
else
{colorPickerType=8;}}
init_color_picker(colorPickerType);}
function open_color_picker(clickedElementId,e)
{if(!pickerReady)
{alert(vbphrase["color_picker_not_ready"]);return;}
pickerElement=fetch_object("colorPicker");if(activeElementId==clickedElementId&&pickerElement.style.display!="none")
{pickerElement.style.display="none";}
else
{activeElementId=clickedElementId;colorElement=fetch_object("color_"+clickedElementId);previewElement=fetch_object("preview_"+clickedElementId);var thecolor=null;if(previewElement.style.background)
{thecolor=previewElement.style.backgroundColor;}
else
{thecolor=previewElement.style.backgroundColor;}
fetch_object("oldColor").style.background=thecolor;fetch_object("newColor").style.background=thecolor;fetch_object("txtColor").value=colorElement.value;if(!e)
{e=window.event;}
if(typeof(e.pageX)=="number")
{xpos=e.pageX;ypos=e.pageY;}
else if(typeof(e.clientX)=="number")
{xpos=e.clientX+document.documentElement.scrollLeft;ypos=e.clientY+document.documentElement.scrollTop;}
xpos+=10;ypos+=5;if((xpos+colorPickerWidth)>=document.body.clientWidth)
{xpos=document.body.clientWidth-colorPickerWidth-5;}
pickerElement.style.left=xpos+"px";pickerElement.style.top=ypos+"px";pickerElement.style.display="";}}
function close_color_picker()
{activeElementId=0;fetch_object("colorPicker").style.display="none";}
function swatch_over(e)
{col_over(this);}
function swatch_click(e)
{col_click(this);}
function col_over(element)
{color=fetch_hex_color(element.style.backgroundColor);fetch_object("newColor").style.background=color;fetch_object("txtColor").value=color;}
function col_click(element)
{if(element=="transparent")
{color=element;}
else
{color=fetch_hex_color(element.style.backgroundColor);}
fetch_object("color_"+activeElementId).value=color;preview_color(activeElementId);close_color_picker();}
function fetch_hex_color(color)
{if(color.substr(0,1)=="r")
{colorMatch=color.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/i);for(var i=1;i<4;i++)
{colorMatch[i]=parseInt(colorMatch[i]).toString(16);if(colorMatch[i].length<2)
{colorMatch[i]="0"+colorMatch[i];}}
color="#"+(colorMatch[1]+colorMatch[2]+colorMatch[3]).toUpperCase();}
return color.toUpperCase();}
function is_transparent(value)
{if(value==""||value=="none"||value=="transparent")
{return true;}
else
{return false;}}
if(typeof(vb_version)!="undefined"&&isNewerVersion(current_version,vb_version))
{t=fetch_object('news_table');t_head_r=t.insertRow(0);t_head_c=t_head_r.insertCell(0);t_head_c.className='thead';t_head_c.innerHTML=newer_version_string.bold();t_body_r=t.insertRow(1);t_body_c=t_body_r.insertCell(0);t_body_c.className='alt1';t_body_p1=document.createElement('p');t_body_p1.className='smallfont';t_body_a1=document.createElement('a');t_body_a1.href='http://www.vbulletin.com/forum/showthread.ph'+'p?p='+vb_announcementid;t_body_a1.target='_blank';t_body_a1.innerHTML=construct_phrase(latest_string,vb_version).bold();t_body_p1.appendChild(t_body_a1);t_body_p1.innerHTML+='. '+construct_phrase(current_string,current_version.bold())+'.';t_body_c.appendChild(t_body_p1);t_body_p2=document.createElement('p');t_body_p2.className='smallfont';t_body_a2=document.createElement('a');t_body_a2.href='http://members.vbulletin.com/';t_body_a2.target='_blank';t_body_a2.innerHTML=construct_phrase(download_string,vb_version.bold());t_body_p2.appendChild(t_body_a2);t_body_c.appendChild(t_body_p2);}
function create_cp_table(tableid)
{var t=document.createElement('table');t.cellPadding=4;t.cellSpacing=0;t.border=0;t.align='center';t.width='90%';t.className='tborder';if(tableid)
{t.id=tableid;}
return t;}
function news_loader_onreadystatechange()
{if(news.handler.readyState==4&&news.handler.status==200&&news.handler.responseXML)
{var visible_messages=done_table;var table_visible=false;var news_id='';var news_date='';var news_title='';var news_body='';var news_link='';var news_items=fetch_tags(news.handler.responseXML,'item');if(done_table)
{t=fetch_object('news_table');table_visible=true;}
else
{t=fetch_object('news_table');if(news_items.length)
{fetch_object('admin_news').style.display='';th=t.insertRow(0);cell=th.insertCell(0);cell.className='tcat';cell.align='center';cell.innerHTML=news_header_string.bold();table_visible=true;}}
for(var i=0;i<news_items.length;i++)
{news_id=news.fetch_data(fetch_tags(news_items[i],'guid')[0]);if(PHP.in_array(news_id,dismissed_news)==-1)
{visible_messages=true;news_date=news.fetch_data(fetch_tags(news_items[i],'pubdate')[0]);news_title=news.fetch_data(fetch_tags(news_items[i],'title')[0]);news_body=news.fetch_data(fetch_tags(news_items[i],'description')[0]);news_link=news.fetch_data(fetch_tags(news_items[i],'link')[0]);var local_news_matches=news_body.match(/\[local\]((?!\[\/local\]).)*\[\/local\]/g);if(local_news_matches!=null)
{sessionurl=(SESSIONHASH==''?'':'s='+SESSIONHASH+'&');for(var i=0;i<local_news_matches.length;i++)
{news_body=news_body.replace(local_news_matches[i],local_news_matches[i].replace(/^\[local\](.*)\.php(\??)(.*)\[\/local\]$/,'$1'+local_extension+'?'+sessionurl+'$3'));}}
r1=t.insertRow(t.rows.length);r1.id='r1_'+news_id;c1=r1.insertCell(0);c1.className='thead';s=document.createElement('input');s.type='submit';s.name='acpnews['+news_id+']';s.className='button';if(is_ie)
{s.style.styleFloat=stylevar_right;}
else
{s.style.cssFloat=stylevar_right;}
s.title="id="+news_id;s.value=dismiss_string;c1.appendChild(s);t1=document.createTextNode(construct_phrase(vbulletin_news_string,news_title));c1.appendChild(t1);r2=t.insertRow(t.rows.length);r2.id='r2_'+news_id;c2=r2.insertCell(0);c2.className='alt2 smallfont';c2.innerHTML=news_body+' ';if(news_link&&news_link!='http://')
{link_elem=document.createElement('a');link_elem.href=news_link;link_elem.target='_blank';link_elem.innerHTML=view_string.bold();c2.appendChild(link_elem);}}}
if(is_ie)
{news.handler.abort();}
if(table_visible)
{if(news_items.length)
{r3=t.insertRow(t.rows.length);c3=r3.insertCell(0);c3.className=(visible_messages?'tfoot':'alt1');c3.align='center';a=document.createElement('a');a.href=show_all_news_link;a.innerHTML=show_all_news_string;if(c3.currentStyle)
{a.style.color=c3.currentStyle.color;}
else if(window.getComputedStyle&&window.getComputedStyle(c3,null))
{a.style.color=window.getComputedStyle(c3,null).color;}
c3.appendChild(a);}
var rows=fetch_tags(fetch_object('news_table'),'td');var last_row='alt1';for(var i=0;i<rows.length;i++)
{if(rows[i].className=='alt1'||rows[i].className=='alt2')
{last_row=rows[i].className;}
else if(rows[i].className=='alt2 smallfont')
{if(last_row=='alt1')
{last_row='alt2';}
else
{rows[i].className='alt1 smallfont';last_row='alt1';}}}}}}
if(AJAX_Compatible)
{dismissed_news=dismissed_news.split(',');var news=new vB_AJAX_Handler(true);news.onreadystatechange(news_loader_onreadystatechange);news.send('./newsproxy.php','');}
var multi_input=new Array();function vB_Multi_Input(varname,count,cpstylefolder)
{this.varname=varname;this.count=count;this.cpstylefolder=cpstylefolder;this.add=function()
{var div=document.createElement('div');div.id='multi_input_container_'+this.varname+'_'+this.count;div.appendChild(document.createTextNode((this.count+1)+' '));div.appendChild(this.create_input(this.count+1));fetch_object('multi_input_fieldset_'+this.varname).appendChild(div);this.append_buttons(this.count++);return false;};this.create_input=function()
{var input=document.createElement('input');input.type='text';input.size=40;input.className='bginput';input.name='setting['+this.varname+']['+this.count+']';input.id='multi_input_'+this.varname+'_'+this.count;input.tabIndex=1;return input;};this.create_button=function(index,img,moveby)
{var a=document.createElement('a');a.varname=this.varname;a.index=index;a.moveby=moveby;a.href='#';a.onclick=function(){return multi_input[this.varname].move(this.index,this.moveby);};var i=document.createElement('img');i.src='../cpstyles/'+this.cpstylefolder+'/move_'+img+'.gif';i.alt='';i.border=0;a.appendChild(i);return a;};this.append_buttons=function(i)
{var div=fetch_object('multi_input_container_'+this.varname+'_'+i);div.varname=this.varname;div.index=i;div.appendChild(document.createTextNode(' '));div.appendChild(this.create_button(i,'down',1));div.appendChild(document.createTextNode(' '));div.appendChild(this.create_button(i,'up',-1));};this.fetch_input=function(i)
{return fetch_object('multi_input_'+this.varname+'_'+i);};this.move=function(index,moveby)
{var values=new Array();for(var i=0;i<this.count;i++)
{values[i]=this.fetch_input(i).value;}
if(index==0&&moveby<0)
{for(var i=0;i<this.count;i++)
{this.fetch_input(i).value=(i==(this.count-1)?values[0]:values[i+1]);}}
else if(index==(this.count-1)&&moveby>0)
{for(var i=0;i<this.count;i++)
{this.fetch_input(i).value=(i==0?values[this.count-1]:values[i-1]);}}
else
{this.fetch_input(index).value=values[index+moveby];this.fetch_input(index+moveby).value=values[index];}
values=null;return false;};for(var i=0;i<this.count;i++)
{this.append_buttons(i);}};
vBulletin.events.systemInit.subscribe(function()
{if(vBulletin.elements["vB_DatePicker"])
{for(var i=0;i<vBulletin.elements["vB_DatePicker"].length;i++)
{new vB_DatePicker(vBulletin.elements["vB_DatePicker"][i][0].id,vBulletin.elements["vB_DatePicker"][i][1]);}
vBulletin.elements["vB_DatePicker"]=null;}});function vB_DatePicker(button_sibling,argstring)
{var args=argstring.split(",");var base_id=(typeof(args[1])=="undefined"?"":args[1]);this.button_sibling=YAHOO.util.Dom.get(button_sibling);if(!this.button_sibling)
{vBulletin.console("Button sibling missing from vB_DatePicker (%s)",base_id);return false;}
this.datestring=YAHOO.util.Dom.get(base_id+"datestring");if(!this.datestring)
{this.month_element=YAHOO.util.Dom.get(base_id+"month");this.date_element=YAHOO.util.Dom.get(base_id+"date");this.year_element=YAHOO.util.Dom.get(base_id+"year");if(!this.month_element||!this.date_element||!this.year_element)
{vBulletin.console("Elements missing from vB_DatePicker (%s)",base_id);return false;}}
this.hidden_selects=new Array();this.selected_date=this.read_input();this.current_month=new Date(this.selected_date);this.current_month.setFullYear(this.selected_date.getFullYear(),this.selected_date.getMonth(),1);var tmp=new Date();this.today=new Date(0);this.today.setFullYear(tmp.getFullYear(),tmp.getMonth(),tmp.getDate());this.today.setHours(0,0,0);var week_start_day=(parseInt(args[0])-1)%7;if(week_start_day<0)
{week_start_day=0;}
this.userweek=new Array();while(this.userweek.length<7)
{this.userweek[this.userweek.length]=week_start_day++;if(week_start_day>=7)
{week_start_day=0;}}
this.daynames=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");this.monthnames=new Array("January","February","March","April","May","June","July","August","September","October","November","December");if(this.button_sibling)
{YAHOO.util.Event.on(document,"click",this.close_popup,this,true);if(!is_ie)
{YAHOO.util.Event.on(window,"resize",this.close_popup,this,true);}
this.button=this.button_sibling.parentNode.insertBefore(document.createElement("a"),this.button_sibling.nextSibling);this.button.href="#";this.buttonimg=this.button.appendChild(document.createElement("img"));this.buttonimg.src=IMGDIR_MISC+"/calendar_popup.png";if(is_ie)
{this.buttonimg.style.verticalAlign="text-bottom";}
else
{this.buttonimg.style.verticalAlign="bottom";}
this.buttonimg.border="0";YAHOO.util.Event.on(this.button,"click",this.toggle_calendar,this,true);if(is_ie)
{this.div=this.button_sibling.parentNode.insertBefore(document.createElement("div"),this.button_sibling);this.div.style.position="absolute";}
this.popup=(is_ie?this.div:document.body).appendChild(document.createElement("div"));this.popup.style.position="absolute";this.popup.style.display="none";this.popup.style.top=this.button_sibling.offsetHeight+"px";this.popup_state=false;this.build_calendar();}};vB_DatePicker.prototype.build_calendar=function()
{if(this.table&&this.table.parentNode)
{this.table.parentNode.removeChild(this.table);}
var tmp_span=document.createElement("span");tmp_span.className="page";tmp_span.innerHTML='&nbsp;';document.body.appendChild(tmp_span);var page_back=YAHOO.util.Dom.getStyle(tmp_span,"backgroundColor");var page_front=YAHOO.util.Dom.getStyle(tmp_span,"color");document.body.removeChild(tmp_span);this.table=document.createElement("table");this.table.cellSpacing=1;this.table.className="tborder vB_DatePicker page";this.table.style.background=page_back;var thead=this.table.appendChild(document.createElement("thead"));var tr=thead.appendChild(document.createElement("tr"));var prevbutton=tr.appendChild(document.createElement("th"));this.tabletitle=tr.appendChild(document.createElement("th"));var nextbutton=tr.appendChild(document.createElement("th"));tr.align="center";this.tabletitle.className="tcat smallfont";this.tabletitle.colSpan=5;this.tabletitle.innerHTML="&nbsp;";prevbutton.className="tcat smallfont";prevbutton.innerHTML="&lt;";prevbutton.style.cursor="pointer";prevbutton.increment=-1;YAHOO.util.Event.on(prevbutton,"click",this.change_month,this,true);nextbutton.className="tcat smallfont";nextbutton.innerHTML="&gt;";nextbutton.style.cursor="pointer";nextbutton.increment=1;YAHOO.util.Event.on(nextbutton,"click",this.change_month,this,true);var tr=thead.appendChild(document.createElement("tr"));tr.align="center";tr.className="page smallfont";for(var i in this.userweek)
{var td=tr.appendChild(document.createElement("td"));td.className="smallfont";td.appendChild(document.createTextNode(this.daynames[this.userweek[i]].substring(0,1)));}
var tr=thead.appendChild(document.createElement("tr"));var td=tr.appendChild(document.createElement("td"));td.colSpan=7;td.className="page"
var div=td.appendChild(document.createElement("div"));div.style.background=page_front;var img=div.appendChild(document.createElement("img"));img.src=(typeof(CLEARGIFURL)!='undefined'?CLEARGIFURL:'clear.gif');this.tbody=this.table.appendChild(document.createElement("tbody"));this.draw_date_cells(this.selected_date.getMonth()+1,this.selected_date.getFullYear());this.popup.appendChild(this.table);};vB_DatePicker.prototype.draw_date_cells=function(month,year)
{this.current_month=new Date(0);this.current_month.setFullYear(year,month-1,1);this.tabletitle.innerHTML=this.monthnames[this.current_month.getMonth()]+" "+this.current_month.getFullYear();while(this.tbody.hasChildNodes())
{this.tbody.removeChild(this.tbody.firstChild);}
var monthstartday=this.current_month.getDay();var beforedays=0;for(i in this.userweek)
{if(monthstartday==this.userweek[i])
{break;}
else
{beforedays++;}}
var curday=new Date(0);curday.setFullYear(this.current_month.getFullYear(),this.current_month.getMonth(),1-beforedays);for(var row=0;row<6;row++)
{var tr=this.tbody.appendChild(document.createElement("tr"));tr.align="center";for(i in this.userweek)
{var td=tr.appendChild(document.createElement("td"))
td.innerHTML=(curday.getDate()<10?"&nbsp;":"")+curday.getDate();td.dateobj=new Date(curday);td.title=td.dateobj.toString();td.style.cursor="pointer";YAHOO.util.Event.on(td,"click",this.date_click,this,true);YAHOO.util.Event.on(td,"mouseover",this.date_mouseover,this,true);YAHOO.util.Event.on(td,"mouseout",this.date_mouseover,this,true);curday.setDate(curday.getDate()+1);curday.setHours(0,0,0);}}
this.apply_date_classes();}
vB_DatePicker.prototype.apply_date_classes=function()
{var tds=this.tbody.getElementsByTagName("td");for(var i=0;i<tds.length;i++)
{if(tds[i].dateobj.valueOf()==this.selected_date.valueOf())
{tds[i].className="tfoot smallfont";}
else if(tds[i].dateobj.getMonth()==this.current_month.getMonth())
{tds[i].className="smallfont";}
else
{tds[i].className="time smallfont";}
if(tds[i].dateobj.valueOf()==this.today.valueOf())
{tds[i].className+=" today";}}}
vB_DatePicker.prototype.select_date=function(dateobj)
{this.selected_date=new Date(dateobj);if(dateobj.getMonth()!=this.current_month.getMonth()||dateobj.getFullYear()!=this.current_month.getFullYear())
{this.draw_date_cells(this.selected_date.getMonth()+1,this.selected_date.getFullYear());}
else
{this.apply_date_classes();}
this.set_input();}
vB_DatePicker.prototype.read_input=function()
{if(this.datestring)
{var new_date=Date.parse(this.datestring.value);}
else
{var new_date=new Date(0);new_date.setFullYear(parseInt(this.year_element.value),(parseInt(this.month_element.value)-1),parseInt(this.date_element.value)).valueOf();}
if(isNaN(new_date))
{if(this.selected_date)
{return this.selected_date;}
else
{return new Date();}}
else
{return new Date(new_date);}}
vB_DatePicker.prototype.set_input=function()
{if(this.datestring)
{this.datestring.value=this.monthnames[this.selected_date.getMonth()]+" "+this.selected_date.getDate()+" "+this.selected_date.getFullYear();}
else
{this.month_element.value=this.selected_date.getMonth()+1;this.date_element.value=this.selected_date.getDate();if(this.year_element.tagName=="SELECT")
{var new_year=this.selected_date.getFullYear();for(var i=0;i<this.year_element.options.length;i++)
{if(this.year_element.options[i].value==new_year)
{this.year_element.selectedIndex=i;return;}}
var opt=this.year_element.appendChild(document.createElement("option"));opt.value=new_year;opt.appendChild(document.createTextNode(new_year));this.year_element.selectedIndex=this.year_element.options.length-1;}
else
{this.year_element.value=this.selected_date.getFullYear();}}}
vB_DatePicker.prototype.open_popup=function()
{this.selected_date=this.read_input();this.select_date(this.selected_date);this.popup.style.display="block";if(is_ie)
{this.popup.style.top=this.button_sibling.offsetHeight+"px";}
else
{var offset=this.fetch_offset(this.button_sibling);this.popup.style.left=offset["left"]+"px";this.popup.style.top=(offset["top"]+this.button_sibling.offsetHeight)+"px";}
if(document.getElementsByTagName("html")[0].getAttribute("dir").toLowerCase()=="ltr")
{this.popup.style.left=((is_ie?0:parseInt(this.popup.style.left))+
parseInt(this.button_sibling.offsetWidth)+
parseInt(this.button.offsetWidth)-
parseInt(this.popup.offsetWidth))+"px";vBulletin.console("DatePicker LTR: %s",this.popup.style.left);}
else if(is_ie)
{this.popup.style.left=parseInt(this.button_sibling.offsetWidth)+parseInt(this.button.offsetWidth)+parseInt(this.popup.offsetWidth)*-1+"px";vBulletin.console("DatePicker RTL: %s",this.popup.style.left);}
else
{this.popup.style.left=parseInt(this.popup.style.left)-parseInt(this.button.offsetWidth)+"px";vBulletin.console("DatePicker RTL: %s",this.popup.style.left);}
this.popup_state=true;this.handle_overlaps(true);}
vB_DatePicker.prototype.close_popup=function()
{this.popup.style.display="none";this.popup_state=false;this.handle_overlaps(false);}
vB_DatePicker.prototype.toggle_calendar=function(e)
{YAHOO.util.Event.stopEvent(e);if(this.popup_state)
{this.close_popup();}
else
{this.open_popup();}}
vB_DatePicker.prototype.change_month=function(e)
{YAHOO.util.Event.stopEvent(e);this.draw_date_cells(this.current_month.getMonth()+YAHOO.util.Event.getTarget(e).increment+1,this.current_month.getFullYear());};vB_DatePicker.prototype.date_click=function(e)
{YAHOO.util.Event.stopEvent(e);this.select_date(YAHOO.util.Event.getTarget(e).dateobj);this.close_popup();this.button_sibling.focus();try{this.button_sibling.select();}catch(e){}}
vB_DatePicker.prototype.date_mouseover=function(e)
{var td=YAHOO.util.Event.getTarget(e);if(e.type=="mouseover")
{YAHOO.util.Dom.replaceClass(td,"page","alt2");}
else
{YAHOO.util.Dom.replaceClass(td,"alt2","page");}}
vB_DatePicker.prototype.set_today=function(e)
{this.select_date(this.today);}
vB_DatePicker.prototype.fetch_offset=function(obj)
{var left_offset=obj.offsetLeft;var top_offset=obj.offsetTop;var divcount=0;while((obj=obj.offsetParent)!=null)
{left_offset+=obj.offsetLeft;top_offset+=obj.offsetTop;}
return{"left":left_offset,"top":top_offset};};vB_DatePicker.prototype.overlaps=function(obj,m)
{var s=new Array();var pos=this.fetch_offset(obj);s['L']=pos['left'];s['T']=pos['top'];s['R']=s['L']+obj.offsetWidth;s['B']=s['T']+obj.offsetHeight;if(s['L']>m['R']||s['R']<m['L']||s['T']>m['B']||s['B']<m['T'])
{return false;}
return true;};vB_DatePicker.prototype.handle_overlaps=function(dohide)
{if(is_ie&&!is_ie7)
{var selects=fetch_tags(document,'select');if(dohide)
{var pos=this.fetch_offset(this.popup);var menuarea=new Array();menuarea={'L':pos['left'],'R':pos['left']+this.popup.offsetWidth,'T':pos['top'],'B':pos['top']+this.popup.offsetHeight};for(var i=0;i<selects.length;i++)
{if(this.overlaps(selects[i],menuarea)&&this.month_element&&selects[i].id!=this.month_element.id)
{selects[i].style.visibility='hidden';array_push(this.hidden_selects,i);}}}
else
{while(true)
{var i=array_pop(this.hidden_selects);if(typeof i=='undefined'||i==null)
{break;}
else
{selects[i].style.visibility='visible';}}}}};
if(typeof(SESSIONURL)=="undefined")
{var SESSIONURL="";}
if(typeof(vbphrase)=="undefined")
{var 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_ie7=((is_ie)&&(userAgent.indexOf('msie 7.')!=-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;}
if('1234'.substr(-2,2)=='12')
{String.prototype.substr_orig=String.prototype.substr;String.prototype.substr=function(start,length)
{return this.substr_orig((start<0?this.length+start:start),length);};}
function array_pop(a)
{if(typeof a!='object'||!a.length)
{return null;}
else
{var response=a[a.length-1];a.length--;return response;}}
if(typeof Array.prototype.shift==='undefined')
{Array.prototype.shift=function()
{for(var i=0,b=this[0],l=this.length-1;i<l;i++)
{this[i]=this[i+1];}
this.length--;return b;};}
function array_push(a,values)
{for(var i=1;i<arguments.length;i++)
{a[a.length]=arguments[i];}
return a.length;}
function fetch_object(idname)
{if(document.getElementById)
{return document.getElementById(idname);}
else if(document.all)
{return document.all[idname];}
else if(document.layers)
{return document.layers[idname];}
else
{return null;}}
function fetch_tags(parentobj,tag)
{if(parentobj==null)
{return new Array();}
else if(typeof parentobj.getElementsByTagName!='undefined')
{return parentobj.getElementsByTagName(tag);}
else if(parentobj.all&&parentobj.all.tags)
{return parentobj.all.tags(tag);}
else
{return new Array();}}
function fetch_tag_count(parentobj,tag)
{return fetch_tags(parentobj,tag).length;}
function do_an_e(eventobj)
{if(!eventobj||is_ie)
{window.event.returnValue=false;window.event.cancelBubble=true;return window.event;}
else
{eventobj.stopPropagation();eventobj.preventDefault();return eventobj;}}
function e_by_gum(eventobj)
{if(!eventobj||is_ie)
{window.event.cancelBubble=true;return window.event;}
else
{if(eventobj.target.type=='submit')
{eventobj.target.form.submit();}
eventobj.stopPropagation();return eventobj;}}
function validatemessage(messagetext,subjecttext,minchars)
{if(is_kon||is_saf||is_webtv)
{return true;}
else if(subjecttext.length<1)
{alert(vbphrase['must_enter_subject']);return false;}
else
{var stripped=PHP.trim(stripcode(messagetext,false,ignorequotechars));if(stripped.length<minchars)
{alert(construct_phrase(vbphrase['message_too_short'],minchars));return false;}
else if(typeof(document.forms.vbform)!='undefined'&&typeof(document.forms.vbform.imagestamp)!='undefined')
{document.forms.vbform.imagestamp.failed=false;if(document.forms.vbform.imagestamp.value.length!=6)
{alert(vbphrase['complete_image_verification']);document.forms.vbform.imagestamp.failed=true;document.forms.vbform.imagestamp.focus();return false;}
else
{return true;}}
else
{return true;}}}
function stripcode(str,ishtml,stripquotes)
{if(!is_regexp)
{return str;}
if(stripquotes)
{var start_time=new Date().getTime();while((startindex=PHP.stripos(str,'[quote'))!==false)
{if(new Date().getTime()-start_time>2000)
{break;}
if((stopindex=PHP.stripos(str,'[/quote]'))!==false)
{fragment=str.substr(startindex,stopindex-startindex+8);str=str.replace(fragment,'');}
else
{break;}
str=PHP.trim(str);}}
if(ishtml)
{str=str.replace(/<img[^>]+src="([^"]+)"[^>]*>/gi,'$1');var html1=new RegExp("<(\\w+)[^>]*>",'gi');var html2=new RegExp("<\\/\\w+>",'gi');str=str.replace(html1,'');str=str.replace(html2,'');var html3=new RegExp('(&nbsp;)','gi');str=str.replace(html3,' ');}
else
{var bbcode1=new RegExp("\\[(\\w+)[^\\]]*\\]",'gi');var bbcode2=new RegExp("\\[\\/(\\w+)\\]",'gi');str=str.replace(bbcode1,'');str=str.replace(bbcode2,'');}
return str;}
function vB_PHP_Emulator()
{}
vB_PHP_Emulator.prototype.stripos=function(haystack,needle,offset)
{if(typeof offset=='undefined')
{offset=0;}
index=haystack.toLowerCase().indexOf(needle.toLowerCase(),offset);return(index==-1?false:index);}
vB_PHP_Emulator.prototype.ltrim=function(str)
{return str.replace(/^\s+/g,'');}
vB_PHP_Emulator.prototype.rtrim=function(str)
{return str.replace(/(\s+)$/g,'');}
vB_PHP_Emulator.prototype.trim=function(str)
{return this.ltrim(this.rtrim(str));}
vB_PHP_Emulator.prototype.preg_quote=function(str)
{return str.replace(/(\+|\{|\}|\(|\)|\[|\]|\||\/|\?|\^|\$|\\|\.|\=|\!|\<|\>|\:|\*)/g,"\\$1");}
vB_PHP_Emulator.prototype.match_all=function(string,regex)
{var gmatch=string.match(RegExp(regex,"gim"));if(gmatch)
{var matches=new Array();var iregex=new RegExp(regex,"im");for(var i=0;i<gmatch.length;i++)
{matches[matches.length]=gmatch[i].match(iregex);}
return matches;}
else
{return false;}}
vB_PHP_Emulator.prototype.unhtmlspecialchars=function(str)
{f=new Array(/&lt;/g,/&gt;/g,/&quot;/g,/&amp;/g);r=new Array('<','>','"','&');for(var i in f)
{str=str.replace(f[i],r[i]);}
return str;}
vB_PHP_Emulator.prototype.unescape_cdata=function(str)
{var r1=/<\=\!\=\[\=C\=D\=A\=T\=A\=\[/g;var r2=/\]\=\]\=>/g;return str.replace(r1,'<![CDATA[').replace(r2,']]>');}
vB_PHP_Emulator.prototype.htmlspecialchars=function(str)
{var f=new Array((is_mac&&is_ie?new RegExp('&','g'):new RegExp('&(?!#[0-9]+;)','g')),new RegExp('<','g'),new RegExp('>','g'),new RegExp('"','g'));var r=new Array('&amp;','&lt;','&gt;','&quot;');for(var i=0;i<f.length;i++)
{str=str.replace(f[i],r[i]);}
return str;}
vB_PHP_Emulator.prototype.in_array=function(ineedle,haystack,caseinsensitive)
{var needle=new String(ineedle);if(caseinsensitive)
{needle=needle.toLowerCase();for(var i in haystack)
{if(haystack[i].toLowerCase()==needle)
{return i;}}}
else
{for(var i in haystack)
{if(haystack[i]==needle)
{return i;}}}
return-1;}
vB_PHP_Emulator.prototype.str_pad=function(text,length,padstring)
{text=new String(text);padstring=new String(padstring);if(text.length<length)
{padtext=new String(padstring);while(padtext.length<(length-text.length))
{padtext+=padstring;}
text=padtext.substr(0,(length-text.length))+text;}
return text;}
vB_PHP_Emulator.prototype.urlencode=function(text)
{text=escape(text.toString()).replace(/\+/g,"%2B");var matches=text.match(/(%([0-9A-F]{2}))/gi);if(matches)
{for(var matchid=0;matchid<matches.length;matchid++)
{var code=matches[matchid].substring(1,3);if(parseInt(code,16)>=128)
{text=text.replace(matches[matchid],'%u00'+code);}}}
text=text.replace('%25','%u0025');return text;}
vB_PHP_Emulator.prototype.ucfirst=function(str,cutoff)
{if(typeof cutoff!='undefined')
{var cutpos=str.indexOf(cutoff);if(cutpos>0)
{str=str.substr(0,cutpos);}}
str=str.split(' ');for(var i=0;i<str.length;i++)
{str[i]=str[i].substr(0,1).toUpperCase()+str[i].substr(1);}
return str.join(' ');}
var PHP=new vB_PHP_Emulator();function vB_AJAX_Handler(async)
{this.async=async?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 A"+"ctiv"+"eX"+"Ob"+"ject('Micr"+"osoft.XM"+"LHTTP');");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(e)
{try{var tester=new XMLHttpRequest();return tester.setRequestHeader?true:false;}
catch(e){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(event)
{if(!this.handler)
{if(!this.init())
{return false;}}
if(typeof event=='function')
{this.handler.onreadystatechange=event;}
else
{alert('XML Sender OnReadyState event is not a function');}
return false;}
vB_AJAX_Handler.prototype.send=function(desturl,datastream)
{if(!this.handler)
{if(!this.init())
{return false;}}
if(!this.not_ready())
{this.handler.open('POST',desturl,this.async);this.handler.setRequestHeader('Content-Type','application/x-www-form-urlencoded');this.handler.send(datastream+'&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(xml_node)
{if(xml_node&&xml_node.firstChild&&xml_node.firstChild.nodeValue)
{return PHP.unescape_cdata(xml_node.firstChild.nodeValue);}
else
{return'';}}
var AJAX_Compatible=vB_AJAX_Handler.prototype.is_compatible();function vB_Hidden_Form(script)
{this.action=script;this.variables=new Array();}
vB_Hidden_Form.prototype.add_variable=function(name,value)
{this.variables[this.variables.length]=new Array(name,value);};vB_Hidden_Form.prototype.add_variables_from_object=function(obj)
{var inputs=fetch_tags(obj,'input');for(var i=0;i<inputs.length;i++)
{switch(inputs[i].type)
{case'checkbox':case'radio':if(inputs[i].checked)
{this.add_variable(inputs[i].name,inputs[i].value);}
break;case'text':case'hidden':case'password':this.add_variable(inputs[i].name,inputs[i].value);break;default:continue;}}
var textareas=fetch_tags(obj,'textarea');for(var i=0;i<textareas.length;i++)
{this.add_variable(textareas[i].name,textareas[i].value);}
var selects=fetch_tags(obj,'select');for(var i=0;i<selects.length;i++)
{if(selects[i].multiple)
{for(var j=0;j<selects[i].options.length;j++)
{if(selects[i].options[j].selected)
{this.add_variable(selects[i].name,selects[i].options[j].value);}}}
else
{this.add_variable(selects[i].name,selects[i].options[selects[i].selectedIndex].value);}}};vB_Hidden_Form.prototype.fetch_variable=function(varname)
{for(var i=0;i<this.variables.length;i++)
{if(this.variables[i][0]==varname)
{return this.variables[i][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 i=0;i<this.variables.length;i++)
{var inputobj=document.createElement('input');inputobj.type='hidden';inputobj.name=this.variables[i][0];inputobj.value=this.variables[i][1];this.form.appendChild(inputobj);}
document.body.appendChild(this.form).submit();};vB_Hidden_Form.prototype.build_query_string=function()
{var query_string='';for(var i=0;i<this.variables.length;i++)
{query_string+=this.variables[i][0]+'='+PHP.urlencode(this.variables[i][1])+'&';}
return query_string;}
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(url,width,height,windowid)
{return window.open(url,(typeof windowid=='undefined'?'vBPopup':windowid),'statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes'
+(typeof width!='undefined'?(',width='+width):'')+(typeof height!='undefined'?(',height='+height):''));}
function js_open_help(scriptname,actiontype,optionval)
{return openWindow('help.php?s='+SESSIONHASH+'&do=answer&page='+scriptname+'&pageaction='+actiontype+'&option='+optionval,600,450,'helpwindow');}
function attachments(threadid)
{return openWindow('misc.php?'+SESSIONURL+'do=showattachments&t='+threadid,480,300);}
function who(threadid)
{return openWindow('misc.php?'+SESSIONURL+'do=whoposted&t='+threadid,230,300);}
function imwindow(imtype,userid,width,height)
{return openWindow('sendmessage.php?'+SESSIONURL+'do=im&type='+imtype+'&u='+userid,width,height);}
function SendMSNMessage(name)
{if(!is_ie)
{alert(vbphrase['msn_functions_only_work_in_ie']);return false;}
else
{MsgrObj.InstantMessage(name);return false;}}
function AddMSNContact(name)
{if(!is_ie)
{alert(vbphrase['msn_functions_only_work_in_ie']);return false;}
else
{MsgrObj.AddContact(0,name);return false;}}
function detect_caps_lock(e)
{e=(e?e:window.event);var keycode=(e.which?e.which:(e.keyCode?e.keyCode:(e.charCode?e.charCode:0)));var shifted=(e.shiftKey||(e.modifiers&&(e.modifiers&4)));var ctrled=(e.ctrlKey||(e.modifiers&&(e.modifiers&2)));return(keycode>=65&&keycode<=90&&!shifted&&!ctrled)||(keycode>=97&&keycode<=122&&shifted);}
function log_out(confirmation_message)
{var ht=document.getElementsByTagName("html")[0];ht.style.filter="progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)";if(confirm(confirmation_message))
{return true;}
else
{ht.style.filter="";return false;}}
function set_cookie(name,value,expires)
{document.cookie=name+'='+escape(value)+'; path=/'+(typeof expires!='undefined'?'; expires='+expires.toGMTString():'');}
function delete_cookie(name)
{document.cookie=name+'='+'; expires=Thu, 01-Jan-70 00:00:01 GMT'+'; path=/';}
function fetch_cookie(name)
{cookie_name=name+'=';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 value_end=document.cookie.indexOf(';',value_begin);if(value_end==-1)
{value_end=cookie_length;}
return unescape(document.cookie.substring(value_begin,value_end));}
cookie_begin=document.cookie.indexOf(' ',cookie_begin)+1;if(cookie_begin==0)
{break;}}
return null;}
function js_toggle_all(formobj,formtype,option,exclude,setto)
{for(var i=0;i<formobj.elements.length;i++)
{var elm=formobj.elements[i];if(elm.type==formtype&&PHP.in_array(elm.name,exclude,false)==-1)
{switch(formtype)
{case'radio':if(elm.value==option)
{elm.checked=setto;}
break;case'select-one':elm.selectedIndex=setto;break;default:elm.checked=setto;break;}}}}
function js_select_all(formobj)
{exclude=new Array();exclude[0]='selectall';js_toggle_all(formobj,'select-one','',exclude,formobj.selectall.selectedIndex);}
function js_check_all(formobj)
{exclude=new Array();exclude[0]='keepattachments';exclude[1]='allbox';exclude[2]='removeall';js_toggle_all(formobj,'checkbox','',exclude,formobj.allbox.checked);}
function js_check_all_option(formobj,option)
{exclude=new Array();exclude[0]='useusergroup';js_toggle_all(formobj,'radio',option,exclude,true);}
function checkall(formobj){js_check_all(formobj);}
function checkall_option(formobj,option){js_check_all_option(formobj,option);}
function resize_textarea(to,id)
{if(to<0)
{var rows=-5;var cols=-10;}
else
{var rows=5;var cols=10;}
var textarea=fetch_object(id);if(typeof textarea.orig_rows=='undefined')
{textarea.orig_rows=textarea.rows;textarea.orig_cols=textarea.cols;}
var newrows=textarea.rows+rows;var newcols=textarea.cols+cols;if(newrows>=textarea.orig_rows&&newcols>=textarea.orig_cols)
{textarea.rows=newrows;textarea.cols=newcols;}
return false;}
function toggle_collapse(objid)
{if(!is_regexp)
{return false;}
obj=fetch_object('collapseobj_'+objid);img=fetch_object('collapseimg_'+objid);cel=fetch_object('collapsecel_'+objid);if(!obj)
{if(img)
{img.style.display='none';}
return false;}
if(obj.style.display=='none')
{obj.style.display='';save_collapsed(objid,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(objid,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(objid,addcollapsed)
{var collapsed=fetch_cookie('vbulletin_collapse');var tmp=new Array();if(collapsed!=null)
{collapsed=collapsed.split('\n');for(var i in collapsed)
{if(collapsed[i]!=objid&&collapsed[i]!='')
{tmp[tmp.length]=collapsed[i];}}}
if(addcollapsed)
{tmp[tmp.length]=objid;}
expires=new Date();expires.setTime(expires.getTime()+(1000*86400*365));set_cookie('vbulletin_collapse',tmp.join('\n'),expires);}
function vBpagenav()
{}
vBpagenav.prototype.controlobj_onclick=function(e)
{this._onclick(e);var inputs=fetch_tags(this.menu.menuobj,'input');for(var i=0;i<inputs.length;i++)
{if(inputs[i].type=='text')
{inputs[i].focus();break;}}};vBpagenav.prototype.form_gotopage=function(e)
{if((pagenum=parseInt(fetch_object('pagenav_itxt').value,10))>0)
{window.location=this.addr+'&page='+pagenum;}
return false;};vBpagenav.prototype.ibtn_onclick=function(e)
{return this.form.gotopage();};vBpagenav.prototype.itxt_onkeypress=function(e)
{return((e?e:window.event).keyCode==13?this.form.gotopage():true);};function vbmenu_register(controlid,noimage,datefield)
{if(typeof(vBmenu)=="object")
{return vBmenu.register(controlid,noimage);}
else
{return false;}}
function set_unselectable(obj)
{if(!is_ie4&&typeof obj.tagName!='undefined')
{if(obj.hasChildNodes())
{for(var i=0;i<obj.childNodes.length;i++)
{set_unselectable(obj.childNodes[i]);}}
obj.unselectable='on';}}
function fetch_sessionhash()
{return(SESSIONURL==''?'':SESSIONURL.substr(2,32));}
function construct_phrase()
{if(!arguments||arguments.length<1||!is_regexp)
{return false;}
var args=arguments;var str=args[0];var re;for(var i=1;i<args.length;i++)
{re=new RegExp("%"+i+"\\$s",'gi');str=str.replace(re,args[i]);}
return str;}
function switch_id(selectobj,type)
{var id=selectobj.options[selectobj.selectedIndex].value;if(id=='')
{return;}
var url=new String(window.location);var fragment=new String('');url=url.split('#');if(url[1])
{fragment='#'+url[1];}
url=url[0];if(url.indexOf(type+'id=')!=-1&&is_regexp)
{re=new RegExp(type+"id=\\d+&?");url=url.replace(re,'');}
if(url.indexOf('?')==-1)
{url+='?';}
else
{lastchar=url.substr(url.length-1);if(lastchar!='&'&&lastchar!='?')
{url+='&';}}
window.location=url+type+'id='+id+fragment;}
function img_alt_2_title(img)
{if(!img.title&&img.alt!='')
{img.title=img.alt;}}
function PostBit_Init(obj,postid)
{if(typeof vBmenu!='undefined')
{var divs=fetch_tags(obj,'div');for(var i=0;i<divs.length;i++)
{if(divs[i].id&&divs[i].id.substr(0,9)=='postmenu_')
{vBmenu.register(divs[i].id,true);}}}
if(typeof vB_QuickEditor!='undefined')
{vB_AJAX_QuickEdit_Init(obj);}
if(typeof vB_QuickReply!='undefined')
{qr_init_buttons(obj);}
if(typeof mq_init!='undefined')
{mq_init(obj);}
if(typeof vBrep!='undefined')
{if(typeof postid!='undefined'&&typeof postid!='null')
{vbrep_register(postid);}}
if(typeof inlineMod!='undefined')
{im_init(obj);}}
function vBulletin_init()
{if(is_webtv)
{return false;}
var imgs=fetch_tags(document,'img');for(var i=0;i<imgs.length;i++)
{img_alt_2_title(imgs[i]);}
if(typeof vBmenu=='object')
{if(typeof(YAHOO)!="undefined")
{YAHOO.util.Event.on(document,"click",vbmenu_hide);YAHOO.util.Event.on(window,"resize",vbmenu_hide);}
else 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 pagenavs=fetch_tags(document,'td');for(var n=0;n<pagenavs.length;n++)
{if(pagenavs[n].hasChildNodes()&&pagenavs[n].firstChild.name&&pagenavs[n].firstChild.name.indexOf('PageNav')!=-1)
{var addr=pagenavs[n].title;pagenavs[n].title='';pagenavs[n].innerHTML='';pagenavs[n].id='pagenav.'+n;var pn=vBmenu.register(pagenavs[n].id);if(is_saf)
{pn.controlobj._onclick=pn.controlobj.onclick;pn.controlobj.onclick=vBpagenav.prototype.controlobj_onclick;}}}
if(typeof addr!='undefined')
{fetch_object('pagenav_form').addr=addr;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);}
vBulletin.init();return true;}
if(!console)
{var console=function(){var moo=1+1;};console.log=function(str){var moo=1+1;};}
function vBulletin_Framework()
{this.elements=new Array();this.ajaxurls=new Array();this.events=new Array();this.regexp="(^|[^a-z0-9_])([a-z0-9_]+)\\[([^\\]]*)\\]";this.add_event("systemInit");this.time=new Date();}
vBulletin_Framework.prototype.init=function()
{this.find_elements(document.getElementsByTagName("body")[0]);this.events.systemInit.fire();}
vBulletin_Framework.prototype.extend=function(subClass,baseClass)
{function inheritance(){}
inheritance.prototype=baseClass.prototype;subClass.prototype=new inheritance();subClass.prototype.constructor=subClass;subClass.baseConstructor=baseClass;subClass.superClass=baseClass.prototype;}
vBulletin_Framework.prototype.find_elements=function(parent)
{for(var i=0;i<parent.childNodes.length;i++)
{var element=parent.childNodes[i];if(element.className)
{var classmatch=PHP.match_all(element.className,this.regexp);if(classmatch)
{this.register_element(element,classmatch);}}
if(parent.childNodes[i].hasChildNodes())
{this.find_elements(parent.childNodes[i]);}}}
vBulletin_Framework.prototype.register_element=function(element,classmatch)
{for(var i=0;i<classmatch.length;i++)
{if(!this.elements[classmatch[i][2]])
{this.elements[classmatch[i][2]]=new Array();}
this.elements[classmatch[i][2]][this.elements[classmatch[i][2]].length]=new Array(element,classmatch[i][3]);}}
vBulletin_Framework.prototype.register_ajax_urls=function(fetch,save,elements)
{var fetch=fetch.split("?");fetch[1]=SESSIONURL+"ajax=1&"+fetch[1].replace(/\{(\d+)(:\w+)?\}/gi,'%$1$s');var save=save.split("?");save[1]=SESSIONURL+"ajax=1&"+save[1].replace(/\{(\d+)(:\w+)?\}/gi,'%$1$s');for(var i=0;i<elements.length;i++)
{this.ajaxurls[elements[i]]=new Array(fetch,save);}}
vBulletin_Framework.prototype.add_event=function(eventname)
{this.events[eventname]=(typeof YAHOO!='undefined'?new YAHOO.util.CustomEvent(eventname):new null_event());}
vBulletin_Framework.prototype.console=function()
{if(is_moz&&console)
{var args=new Array();for(var i=0;i<arguments.length;i++)
{args[args.length]=arguments[i];}
try
{eval("console.log('"+args.join("','")+"');");}
catch(e){}}}
if(typeof YAHOO=='undefined')
{function null_event()
{this.fire=function(){};this.subscribe=function(){};};}
vBulletin=new vBulletin_Framework();
function vB_Inline_Mod(varname,type,formobjid,go_phrase,cookieprefix)
{this.varname=varname;this.type=type.toLowerCase();this.formobj=fetch_object(formobjid);this.go_phrase=go_phrase;if(typeof cookieprefix!='undefined')
{this.cookieprefix=cookieprefix;}
else
{this.cookieprefix='vbulletin_inline';}
if(this.type=='thread')
{this.list='tlist_';}
else if(this.type=='post')
{this.list='plist_';}
else
{this.list=this.type+'list_';}
this.cookie_ids=null;this.cookie_array=new Array();this.init=function(elements)
{for(i=0;i<elements.length;i++)
{if(this.is_in_list(elements[i]))
{elements[i].inlineModID=this.varname;elements[i].onclick=inlinemod_checkbox_onclick;}}
this.cookie_array=new Array();if(this.fetch_ids())
{for(i in this.cookie_ids)
{if(this.cookie_ids[i]!='')
{if(checkbox=fetch_object(this.list+this.cookie_ids[i]))
{checkbox.checked=true;eval('this.highlight_'+this.type+'(checkbox)');}
this.cookie_array[this.cookie_array.length]=this.cookie_ids[i];}}}
this.set_output_counters();}
this.fetch_ids=function()
{this.cookie_ids=fetch_cookie(this.cookieprefix+this.type);if(this.cookie_ids!=null&&this.cookie_ids!='')
{this.cookie_ids=this.cookie_ids.split('-');if(this.cookie_ids.length>0)
{return true;}}
return false;}
this.toggle=function(checkbox)
{eval('this.highlight_'+this.type+'(checkbox)');this.save(checkbox.id.substring(this.list.length),checkbox.checked);}
this.save=function(checkboxid,checked)
{this.cookie_array=new Array();if(this.fetch_ids())
{for(i in this.cookie_ids)
{if(this.cookie_ids[i]!=checkboxid&&this.cookie_ids[i]!='')
{this.cookie_array[this.cookie_array.length]=this.cookie_ids[i];}}}
if(checked)
{this.cookie_array[this.cookie_array.length]=checkboxid;}
this.set_output_counters();this.set_cookie();return true;}
this.set_cookie=function()
{expires=new Date();expires.setTime(expires.getTime()+3600000);set_cookie(this.cookieprefix+this.type,this.cookie_array.join('-'),expires);}
this.check_all=function(checked,itemtype,caller)
{if(typeof checked=='undefined')
{checked=this.formobj.allbox.checked;}
this.cookie_array=new Array();if(this.fetch_ids())
{for(i in this.cookie_ids)
{if(!fetch_object(this.list+this.cookie_ids[i]))
{this.cookie_array[this.cookie_array.length]=this.cookie_ids[i]}}}
counter=0;for(var i=0;i<this.formobj.elements.length;i++)
{if(this.is_in_list(this.formobj.elements[i]))
{elm=this.formobj.elements[i];if(typeof itemtype!='undefined')
{if(elm.value&itemtype)
{elm.checked=checked;}
else
{elm.checked=!checked;}}
else if(checked=='invert')
{elm.checked=!elm.checked;}
else
{elm.checked=checked;}
eval('this.highlight_'+this.type+'(elm)');if(elm.checked)
{this.cookie_array[this.cookie_array.length]=elm.id.substring(this.list.length)}}}
this.set_output_counters();this.set_cookie();return true;}
this.is_in_list=function(obj)
{return(obj.type=='checkbox'&&obj.id.indexOf(this.list)==0&&(obj.disabled==false||obj.disabled=='undefined'));}
this.set_output_counters=function()
{if(this.type=='thread'||this.type=='post')
{var gobutton='inlinego';}
else
{var gobutton=this.type+'_inlinego';}
if(obj=fetch_object(gobutton))
{obj.value=construct_phrase(this.go_phrase,this.cookie_array.length);}}
this.toggle_highlight=function(cell,checkbox)
{if(cell.className=='alt1'||cell.className=='alt2'||cell.className=='inlinemod')
{if(checkbox.checked)
{if(!cell.oclassName)
{cell.oclassName=cell.className;}
cell.className='inlinemod';}
else if(cell.oclassName)
{cell.className=cell.oclassName;}}}
this.highlight_thread=function(checkbox)
{tobj=checkbox;while(tobj.tagName!='TR')
{if(tobj.parentNode.tagName=='HTML')
{break;}
else
{tobj=tobj.parentNode;}}
if(tobj.tagName=='TR')
{tds=tobj.childNodes;for(var i=0;i<tds.length;i++)
{this.toggle_highlight(tds[i],checkbox);}}}
this.highlight_post=function(checkbox)
{if(table=fetch_object('post'+checkbox.id.substr(6)))
{tds=fetch_tags(table,'td');for(var i=0;i<tds.length;i++)
{this.toggle_highlight(tds[i],checkbox);}}}
this.init(this.formobj.elements);}
function inlinemod_checkbox_onclick(e)
{var inlineModObj=eval(this.inlineModID);inlineModObj.toggle(this);};function im_init(obj,inlineobj)
{var inputs=fetch_tags(obj,'input');if(typeof inlineobj=='object'&&typeof inlineobj.init=='function')
{inlineobj.init(inputs);}
else
{inlineMod.init(inputs);}}
var hexcase=0;var b64pad="";var chrsz=8;function hex_md5(s){return binl2hex(core_md5(str2binl(s),s.length*chrsz));}
function b64_md5(s){return binl2b64(core_md5(str2binl(s),s.length*chrsz));}
function str_md5(s){return binl2str(core_md5(str2binl(s),s.length*chrsz));}
function hex_hmac_md5(key,data){return binl2hex(core_hmac_md5(key,data));}
function b64_hmac_md5(key,data){return binl2b64(core_hmac_md5(key,data));}
function str_hmac_md5(key,data){return binl2str(core_hmac_md5(key,data));}
function core_md5(x,len)
{x[len>>5]|=0x80<<((len)%32);x[(((len+64)>>>9)<<4)+14]=len;var a=1732584193;var b=-271733879;var c=-1732584194;var d=271733878;for(var i=0;i<x.length;i+=16)
{var olda=a;var oldb=b;var oldc=c;var oldd=d;a=md5_ff(a,b,c,d,x[i+0],7,-680876936);d=md5_ff(d,a,b,c,x[i+1],12,-389564586);c=md5_ff(c,d,a,b,x[i+2],17,606105819);b=md5_ff(b,c,d,a,x[i+3],22,-1044525330);a=md5_ff(a,b,c,d,x[i+4],7,-176418897);d=md5_ff(d,a,b,c,x[i+5],12,1200080426);c=md5_ff(c,d,a,b,x[i+6],17,-1473231341);b=md5_ff(b,c,d,a,x[i+7],22,-45705983);a=md5_ff(a,b,c,d,x[i+8],7,1770035416);d=md5_ff(d,a,b,c,x[i+9],12,-1958414417);c=md5_ff(c,d,a,b,x[i+10],17,-42063);b=md5_ff(b,c,d,a,x[i+11],22,-1990404162);a=md5_ff(a,b,c,d,x[i+12],7,1804603682);d=md5_ff(d,a,b,c,x[i+13],12,-40341101);c=md5_ff(c,d,a,b,x[i+14],17,-1502002290);b=md5_ff(b,c,d,a,x[i+15],22,1236535329);a=md5_gg(a,b,c,d,x[i+1],5,-165796510);d=md5_gg(d,a,b,c,x[i+6],9,-1069501632);c=md5_gg(c,d,a,b,x[i+11],14,643717713);b=md5_gg(b,c,d,a,x[i+0],20,-373897302);a=md5_gg(a,b,c,d,x[i+5],5,-701558691);d=md5_gg(d,a,b,c,x[i+10],9,38016083);c=md5_gg(c,d,a,b,x[i+15],14,-660478335);b=md5_gg(b,c,d,a,x[i+4],20,-405537848);a=md5_gg(a,b,c,d,x[i+9],5,568446438);d=md5_gg(d,a,b,c,x[i+14],9,-1019803690);c=md5_gg(c,d,a,b,x[i+3],14,-187363961);b=md5_gg(b,c,d,a,x[i+8],20,1163531501);a=md5_gg(a,b,c,d,x[i+13],5,-1444681467);d=md5_gg(d,a,b,c,x[i+2],9,-51403784);c=md5_gg(c,d,a,b,x[i+7],14,1735328473);b=md5_gg(b,c,d,a,x[i+12],20,-1926607734);a=md5_hh(a,b,c,d,x[i+5],4,-378558);d=md5_hh(d,a,b,c,x[i+8],11,-2022574463);c=md5_hh(c,d,a,b,x[i+11],16,1839030562);b=md5_hh(b,c,d,a,x[i+14],23,-35309556);a=md5_hh(a,b,c,d,x[i+1],4,-1530992060);d=md5_hh(d,a,b,c,x[i+4],11,1272893353);c=md5_hh(c,d,a,b,x[i+7],16,-155497632);b=md5_hh(b,c,d,a,x[i+10],23,-1094730640);a=md5_hh(a,b,c,d,x[i+13],4,681279174);d=md5_hh(d,a,b,c,x[i+0],11,-358537222);c=md5_hh(c,d,a,b,x[i+3],16,-722521979);b=md5_hh(b,c,d,a,x[i+6],23,76029189);a=md5_hh(a,b,c,d,x[i+9],4,-640364487);d=md5_hh(d,a,b,c,x[i+12],11,-421815835);c=md5_hh(c,d,a,b,x[i+15],16,530742520);b=md5_hh(b,c,d,a,x[i+2],23,-995338651);a=md5_ii(a,b,c,d,x[i+0],6,-198630844);d=md5_ii(d,a,b,c,x[i+7],10,1126891415);c=md5_ii(c,d,a,b,x[i+14],15,-1416354905);b=md5_ii(b,c,d,a,x[i+5],21,-57434055);a=md5_ii(a,b,c,d,x[i+12],6,1700485571);d=md5_ii(d,a,b,c,x[i+3],10,-1894986606);c=md5_ii(c,d,a,b,x[i+10],15,-1051523);b=md5_ii(b,c,d,a,x[i+1],21,-2054922799);a=md5_ii(a,b,c,d,x[i+8],6,1873313359);d=md5_ii(d,a,b,c,x[i+15],10,-30611744);c=md5_ii(c,d,a,b,x[i+6],15,-1560198380);b=md5_ii(b,c,d,a,x[i+13],21,1309151649);a=md5_ii(a,b,c,d,x[i+4],6,-145523070);d=md5_ii(d,a,b,c,x[i+11],10,-1120210379);c=md5_ii(c,d,a,b,x[i+2],15,718787259);b=md5_ii(b,c,d,a,x[i+9],21,-343485551);a=safe_add(a,olda);b=safe_add(b,oldb);c=safe_add(c,oldc);d=safe_add(d,oldd);}
return Array(a,b,c,d);}
function md5_cmn(q,a,b,x,s,t)
{return safe_add(bit_rol(safe_add(safe_add(a,q),safe_add(x,t)),s),b);}
function md5_ff(a,b,c,d,x,s,t)
{return md5_cmn((b&c)|((~b)&d),a,b,x,s,t);}
function md5_gg(a,b,c,d,x,s,t)
{return md5_cmn((b&d)|(c&(~d)),a,b,x,s,t);}
function md5_hh(a,b,c,d,x,s,t)
{return md5_cmn(b^c^d,a,b,x,s,t);}
function md5_ii(a,b,c,d,x,s,t)
{return md5_cmn(c^(b|(~d)),a,b,x,s,t);}
function core_hmac_md5(key,data)
{var bkey=str2binl(key);if(bkey.length>16)bkey=core_md5(bkey,key.length*chrsz);var ipad=Array(16),opad=Array(16);for(var i=0;i<16;i++)
{ipad[i]=bkey[i]^0x36363636;opad[i]=bkey[i]^0x5C5C5C5C;}
var hash=core_md5(ipad.concat(str2binl(data)),512+data.length*chrsz);return core_md5(opad.concat(hash),512+128);}
function safe_add(x,y)
{var lsw=(x&0xFFFF)+(y&0xFFFF);var msw=(x>>16)+(y>>16)+(lsw>>16);return(msw<<16)|(lsw&0xFFFF);}
function bit_rol(num,cnt)
{return(num<<cnt)|(num>>>(32-cnt));}
function str2binl(str)
{var bin=new Array();var mask=(1<<chrsz)-1;for(var i=0;i<str.length*chrsz;i+=chrsz)
bin[i>>5]|=(str.charCodeAt(i/chrsz)&mask)<<(i%32);return bin;}
function binl2str(bin)
{var str="";var mask=(1<<chrsz)-1;for(var i=0;i<bin.length*32;i+=chrsz)
str+=String.fromCharCode((bin[i>>5]>>>(i%32))&mask);return str;}
function binl2hex(binarray)
{var hex_tab=hexcase?"0123456789ABCDEF":"0123456789abcdef";var str="";for(var i=0;i<binarray.length*4;i++)
{str+=hex_tab.charAt((binarray[i>>2]>>((i%4)*8+4))&0xF)+
hex_tab.charAt((binarray[i>>2]>>((i%4)*8))&0xF);}
return str;}
function binl2b64(binarray)
{var tab="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var str="";for(var i=0;i<binarray.length*4;i+=3)
{var triplet=(((binarray[i>>2]>>8*(i%4))&0xFF)<<16)|(((binarray[i+1>>2]>>8*((i+1)%4))&0xFF)<<8)|((binarray[i+2>>2]>>8*((i+2)%4))&0xFF);for(var j=0;j<4;j++)
{if(i*8+j*6>binarray.length*32)str+=b64pad;else str+=tab.charAt((triplet>>6*(3-j))&0x3F);}}
return str;}
function str_to_ent(str)
{var result='';var i;for(i=0;i<str.length;i++)
{var c=str.charCodeAt(i);var tmp='';if(c>255)
{while(c>=1)
{tmp="0123456789".charAt(c%10)+tmp;c=c/10;}
if(tmp=='')
{tmp="0";}
tmp="#"+tmp;tmp="&"+tmp;tmp=tmp+";";result+=tmp;}
else
{result+=str.charAt(i);}}
return result;}
function trim(s)
{while(s.substring(0,1)==' ')
{s=s.substring(1,s.length);}
while(s.substring(s.length-1,s.length)==' ')
{s=s.substring(0,s.length-1);}
return s;}
function md5hash(input,output_html,output_utf,skip_empty)
{if(navigator.userAgent.indexOf("Mozilla/")==0&&parseInt(navigator.appVersion)>=4)
{var md5string=hex_md5(str_to_ent(trim(input.value)));output_html.value=md5string;if(output_utf)
{md5string=hex_md5(trim(input.value));output_utf.value=md5string;}
if(!skip_empty)
{input.value='';}}
return true;}
vBulletin.add_event("vBmenuShow");vBulletin.add_event("vBmenuHide");function vB_Popup_Handler()
{this.open_steps=10;this.open_fade=false;this.active=false;this.menus=new Array();this.activemenu=null;this.hidden_selects=new Array();};vB_Popup_Handler.prototype.activate=function(active)
{this.active=active;};vB_Popup_Handler.prototype.register=function(controlkey,noimage,noslide)
{this.menus[controlkey]=new vB_Popup_Menu(controlkey,noimage,noslide);return this.menus[controlkey];};vB_Popup_Handler.prototype.hide=function()
{if(this.activemenu!=null)
{this.menus[this.activemenu].hide();}};var vBmenu=new vB_Popup_Handler();function vbmenu_hide(e)
{if(e&&e.button&&e.button!=1&&e.type=='click')
{return true;}
else
{vBmenu.hide();}};function vB_Popup_Menu(controlkey,noimage,noslide)
{this.controlkey=controlkey;this.menuname=this.controlkey.split('.')[0]+'_menu';this.init_control(noimage);if(fetch_object(this.menuname))
{this.init_menu();}
this.slide_open=((is_opera||noslide)?false:true);this.open_steps=vBmenu.open_steps;vBulletin.add_event("vBmenuShow_"+this.controlkey);vBulletin.add_event("vBmenuHide_"+this.controlkey);};vB_Popup_Menu.prototype.init_control=function(noimage)
{this.controlobj=fetch_object(this.controlkey);this.controlobj.state=false;if(this.controlobj.firstChild&&(this.controlobj.firstChild.tagName=='TEXTAREA'||this.controlobj.firstChild.tagName=='INPUT'))
{}
else
{if(!noimage&&!(is_mac&&is_ie))
{var space=document.createTextNode(' ');this.controlobj.appendChild(space);var img=document.createElement('img');img.src=IMGDIR_MISC+'/menu_open.gif';img.border=0;img.title='';img.alt='';this.controlobj.appendChild(img);}
this.controlobj.unselectable=true;if(!noimage)
{this.controlobj.style.cursor=pointer_cursor;}
this.controlobj.onclick=vB_Popup_Events.prototype.controlobj_onclick;this.controlobj.onmouseover=vB_Popup_Events.prototype.controlobj_onmouseover;}};vB_Popup_Menu.prototype.init_menu=function()
{this.menuobj=fetch_object(this.menuname);if(this.menuobj&&!this.menuobj.initialized)
{this.menuobj.initialized=true;this.menuobj.onclick=e_by_gum;this.menuobj.style.position='absolute';this.menuobj.style.zIndex=50;if(is_ie&&!is_mac)
{this.menuobj.style.filter+="progid:DXImageTransform.Microsoft.alpha(enabled=1,opacity=100)";this.menuobj.style.filter+="progid:DXImageTransform.Microsoft.shadow(direction=135,color=#8E8E8E,strength=3)";}
this.init_menu_contents();}};vB_Popup_Menu.prototype.init_menu_contents=function()
{var tds=fetch_tags(this.menuobj,'td');for(var i=0;i<tds.length;i++)
{if(tds[i].className=='vbmenu_option')
{if(tds[i].title&&tds[i].title=='nohilite')
{tds[i].title='';}
else
{tds[i].controlkey=this.controlkey;tds[i].onmouseover=vB_Popup_Events.prototype.menuoption_onmouseover;tds[i].onmouseout=vB_Popup_Events.prototype.menuoption_onmouseout;var links=fetch_tags(tds[i],'a');if(links.length==1)
{tds[i].className=tds[i].className+' vbmenu_option_alink';tds[i].islink=true;var linkobj=links[0];var remove_link=false;tds[i].target=linkobj.getAttribute('target');if(typeof linkobj.onclick=='function')
{tds[i].ofunc=linkobj.onclick;tds[i].onclick=vB_Popup_Events.prototype.menuoption_onclick_function;remove_link=true;}
else if(typeof tds[i].onclick=='function')
{tds[i].ofunc=tds[i].onclick;tds[i].onclick=vB_Popup_Events.prototype.menuoption_onclick_function;remove_link=true;}
else
{tds[i].href=linkobj.href;tds[i].onclick=vB_Popup_Events.prototype.menuoption_onclick_link;}
if(remove_link)
{var newlink=document.createElement('a');newlink.innerHTML=linkobj.innerHTML;newlink.href='#';newlink.onclick=function(e){e=e?e:window.event;e.returnValue=false;return false;};tds[i].insertBefore(newlink,linkobj);tds[i].removeChild(linkobj);}}
else if(typeof tds[i].onclick=='function')
{tds[i].ofunc=tds[i].onclick;tds[i].onclick=vB_Popup_Events.prototype.menuoption_onclick_function;}}}}};vB_Popup_Menu.prototype.show=function(obj,instant)
{if(!vBmenu.active)
{return false;}
else if(!this.menuobj)
{this.init_menu();}
if(!this.menuobj)
{return false;}
if(vBmenu.activemenu!=null)
{vBmenu.menus[vBmenu.activemenu].hide();}
vBmenu.activemenu=this.controlkey;this.menuobj.style.display='';if(this.slide_open)
{this.menuobj.style.clip='rect(auto, 0px, 0px, auto)';}
this.set_menu_position(obj);if(!instant&&this.slide_open)
{this.intervalX=Math.ceil(this.menuobj.offsetWidth/this.open_steps);this.intervalY=Math.ceil(this.menuobj.offsetHeight/this.open_steps);this.slide((this.direction=='left'?0:this.menuobj.offsetWidth),0,0);}
else if(this.menuobj.style.clip&&this.slide_open)
{this.menuobj.style.clip='rect(auto, auto, auto, auto)';}
this.handle_overlaps(true);if(this.controlobj.editorid)
{this.controlobj.state=true;vB_Editor[this.controlobj.editorid].menu_context(this.controlobj,'mousedown');}
vBulletin.events["vBmenuShow_"+this.controlkey].fire(this.controlkey);vBulletin.events.vBmenuShow.fire(this.controlkey);};vB_Popup_Menu.prototype.set_menu_position=function(obj)
{this.pos=this.fetch_offset(obj);this.leftpx=this.pos['left'];this.toppx=this.pos['top']+obj.offsetHeight;if((this.leftpx+this.menuobj.offsetWidth)>=document.body.clientWidth&&(this.leftpx+obj.offsetWidth-this.menuobj.offsetWidth)>0)
{this.leftpx=this.leftpx+obj.offsetWidth-this.menuobj.offsetWidth;this.direction='right';}
else
{this.direction='left'}
this.menuobj.style.left=this.leftpx+'px';this.menuobj.style.top=this.toppx+'px';};vB_Popup_Menu.prototype.hide=function(e)
{if(e&&e.button&&e.button!=1)
{return true;}
this.stop_slide();this.menuobj.style.display='none';this.handle_overlaps(false);if(this.controlobj.editorid)
{this.controlobj.state=false;vB_Editor[this.controlobj.editorid].menu_context(this.controlobj,'mouseout');}
vBmenu.activemenu=null;vBulletin.events["vBmenuHide_"+this.controlkey].fire(this.controlkey);vBulletin.events.vBmenuHide.fire(this.controlkey);};vB_Popup_Menu.prototype.hover=function(obj)
{if(vBmenu.activemenu!=null)
{if(vBmenu.menus[vBmenu.activemenu].controlkey!=this.id)
{this.show(obj,true);}}};vB_Popup_Menu.prototype.slide=function(clipX,clipY,opacity)
{if(this.direction=='left'&&(clipX<this.menuobj.offsetWidth||clipY<this.menuobj.offsetHeight))
{if(vBmenu.open_fade&&is_ie)
{opacity+=10;this.menuobj.filters.item('DXImageTransform.Microsoft.alpha').opacity=opacity;}
clipX+=this.intervalX;clipY+=this.intervalY;this.menuobj.style.clip="rect(auto, "+clipX+"px, "+clipY+"px, auto)";this.slidetimer=setTimeout("vBmenu.menus[vBmenu.activemenu].slide("+clipX+", "+clipY+", "+opacity+");",0);}
else if(this.direction=='right'&&(clipX>0||clipY<this.menuobj.offsetHeight))
{if(vBmenu.open_fade&&is_ie)
{opacity+=10;menuobj.filters.item('DXImageTransform.Microsoft.alpha').opacity=opacity;}
clipX-=this.intervalX;clipY+=this.intervalY;this.menuobj.style.clip="rect(auto, "+this.menuobj.offsetWidth+"px, "+clipY+"px, "+clipX+"px)";this.slidetimer=setTimeout("vBmenu.menus[vBmenu.activemenu].slide("+clipX+", "+clipY+", "+opacity+");",0);}
else
{this.stop_slide();}};vB_Popup_Menu.prototype.stop_slide=function()
{clearTimeout(this.slidetimer);this.menuobj.style.clip='rect(auto, auto, auto, auto)';if(vBmenu.open_fade&&is_ie)
{this.menuobj.filters.item('DXImageTransform.Microsoft.alpha').opacity=100;}};vB_Popup_Menu.prototype.fetch_offset=function(obj)
{var left_offset=obj.offsetLeft;var top_offset=obj.offsetTop;while((obj=obj.offsetParent)!=null)
{left_offset+=obj.offsetLeft;top_offset+=obj.offsetTop;}
return{'left':left_offset,'top':top_offset};};vB_Popup_Menu.prototype.overlaps=function(obj,m)
{var s=new Array();var pos=this.fetch_offset(obj);s['L']=pos['left'];s['T']=pos['top'];s['R']=s['L']+obj.offsetWidth;s['B']=s['T']+obj.offsetHeight;if(s['L']>m['R']||s['R']<m['L']||s['T']>m['B']||s['B']<m['T'])
{return false;}
return true;};vB_Popup_Menu.prototype.handle_overlaps=function(dohide)
{if(is_ie&&!is_ie7)
{var selects=fetch_tags(document,'select');if(dohide)
{var menuarea=new Array();menuarea={'L':this.leftpx,'R':this.leftpx+this.menuobj.offsetWidth,'T':this.toppx,'B':this.toppx+this.menuobj.offsetHeight};for(var i=0;i<selects.length;i++)
{if(this.overlaps(selects[i],menuarea))
{var hide=true;var s=selects[i];while(s=s.parentNode)
{if(s.className=='vbmenu_popup')
{hide=false;break;}}
if(hide)
{selects[i].style.visibility='hidden';array_push(vBmenu.hidden_selects,i);}}}}
else
{while(true)
{var i=array_pop(vBmenu.hidden_selects);if(typeof i=='undefined'||i==null)
{break;}
else
{selects[i].style.visibility='visible';}}}}};function vB_Popup_Events()
{};vB_Popup_Events.prototype.controlobj_onclick=function(e)
{if(typeof do_an_e=='function')
{do_an_e(e);if(vBmenu.activemenu==null||vBmenu.menus[vBmenu.activemenu].controlkey!=this.id)
{vBmenu.menus[this.id].show(this);}
else
{vBmenu.menus[this.id].hide();}}};vB_Popup_Events.prototype.controlobj_onmouseover=function(e)
{if(typeof do_an_e=='function')
{do_an_e(e);vBmenu.menus[this.id].hover(this);}};vB_Popup_Events.prototype.menuoption_onclick_function=function(e)
{this.ofunc(e);vBmenu.menus[this.controlkey].hide();};vB_Popup_Events.prototype.menuoption_onclick_link=function(e)
{e=e?e:window.event;if(e.shiftKey||(this.target!=null&&this.target!=''&&this.target.toLowerCase()!='_self'))
{if(this.target!=null&&this.target.charAt(0)!='_')
{window.open(this.href,this.target);}
else
{window.open(this.href);}}
else
{window.location=this.href;}
e.cancelBubble=true;if(e.stopPropagation)e.stopPropagation();if(e.preventDefault)e.preventDefault();vBmenu.menus[this.controlkey].hide();return false;};vB_Popup_Events.prototype.menuoption_onmouseover=function(e)
{this.className='vbmenu_hilite'+(this.islink?' vbmenu_hilite_alink':'');this.style.cursor=pointer_cursor;};vB_Popup_Events.prototype.menuoption_onmouseout=function(e)
{this.className='vbmenu_option'+(this.islink?' vbmenu_option_alink':'');this.style.cursor='default';};
function mq_init(obj)
{var cookie_ids=fetch_cookie('vbulletin_multiquote');if(cookie_ids!=null&&cookie_ids!='')
{cookie_ids=cookie_ids.split(',');}
else
{cookie_ids=new Array();}
var postid;var images=fetch_tags(obj,'img');for(var i=0;i<images.length;i++)
{if(images[i].id&&images[i].id.substr(0,3)=='mq_')
{postid=images[i].id.substr(3);images[i].onclick=function(e){return mq_click(this.id.substr(3));};change_mq_image(postid,(PHP.in_array(postid,cookie_ids)>-1?true:false));}}}
function mq_click(postid)
{var cookie_ids=fetch_cookie('vbulletin_multiquote');var cookie_text=new Array();var is_selected=false;if(cookie_ids!=null&&cookie_ids!='')
{cookie_ids=cookie_ids.split(',');for(i in cookie_ids)
{if(cookie_ids[i]==postid)
{is_selected=true;}
else if(cookie_ids[i])
{cookie_text.push(cookie_ids[i]);}}}
change_mq_image(postid,(is_selected?false:true));if(!is_selected)
{cookie_text.push(postid);if(typeof mqlimit!='undefined'&&mqlimit>0)
{for(var i=0;i<(cookie_text.length-mqlimit);i++)
{var removal=cookie_text.shift();change_mq_image(removal,false);}}}
set_cookie('vbulletin_multiquote',cookie_text.join(','));return false;}
function change_mq_image(postid,to_selected)
{var mq_obj=fetch_object('mq_'+postid);if(mq_obj)
{if(to_selected==true)
{mq_obj.src=mq_obj.src.replace(/\/multiquote_off\.([a-zA-Z0-9]+)$/,'/multiquote_on.$1');}
else
{mq_obj.src=mq_obj.src.replace(/\/multiquote_on\.([a-zA-Z0-9]+)$/,'/multiquote_off.$1');}}}
mq_init(fetch_object('posts'));
function display_post(postid)
{if(AJAX_Compatible)
{vB_PostLoader[postid]=new vB_AJAX_PostLoader(postid);vB_PostLoader[postid].init();}
else
{pc_obj=fetch_object('postcount'+this.postid);openWindow('showpost.php?'+(SESSIONURL?'s='+SESSIONURL:'')+(pc_obj!=null?'&postcount='+PHP.urlencode(pc_obj.name):'')+'&p='+postid);}
return false;};var vB_PostLoader=new Array();function vB_AJAX_PostLoader(postid)
{this.postid=postid;this.container=fetch_object('edit'+this.postid);};vB_AJAX_PostLoader.prototype.init=function()
{if(this.container)
{postid=this.postid;pc_obj=fetch_object('postcount'+this.postid);this.ajax=new vB_AJAX_Handler(true);this.ajax.onreadystatechange(vB_PostLoader[postid].ajax_check);this.ajax.send('showpost.php?p='+this.postid,'ajax=1&postid='+this.postid+
(pc_obj!=null?'&postcount='+PHP.urlencode(pc_obj.name):''));}};vB_AJAX_PostLoader.prototype.ajax_check=function()
{var AJAX=vB_PostLoader[postid].ajax.handler;if(AJAX.readyState==4&&AJAX.status==200)
{vB_PostLoader[postid].display(AJAX.responseXML);if(is_ie)
{AJAX.abort();}}
return false;};vB_AJAX_PostLoader.prototype.display=function(postbit_xml)
{if(fetch_tag_count(postbit_xml,'postbit'))
{this.container.innerHTML=this.ajax.fetch_data(fetch_tags(postbit_xml,'postbit')[0]);PostBit_Init(fetch_object('post'+this.postid),this.postid);}
else
{openWindow('showpost.php?'+(SESSIONURL?'s='+SESSIONURL:'')+(pc_obj!=null?'&postcount='+PHP.urlencode(pc_obj.name):'')+'&p='+this.postid);}};
function vB_AJAX_QuickEdit_Init(postobj)
{if(AJAX_Compatible)
{if(typeof postobj=='string')
{postobj=fetch_object(postobj);}
var anchors=fetch_tags(postobj,'a');var postid=0;for(var i=0;i<anchors.length;i++)
{if(anchors[i].name&&anchors[i].name.indexOf('vB::QuickEdit::')!=-1)
{anchors[i].onclick=vB_AJAX_QuickEditor_Events.prototype.editbutton_click;}}}}
function vB_AJAX_QuickEditor()
{this.postid=null;this.messageobj=null;this.container=null;this.originalhtml=null;this.ajax=null;this.editstate=false;this.editorcounter=0;this.pending=false;}
vB_AJAX_QuickEditor.prototype.ready=function()
{if(this.editstate||this.pending)
{return false;}
else
{return true;}};vB_AJAX_QuickEditor.prototype.edit=function(anchor_name)
{var test_ajax=new vB_AJAX_Handler(true);if(!test_ajax.init()||(typeof vb_disable_ajax!='undefined'&&vb_disable_ajax>0))
{return true;}
var tmppostid=anchor_name.substr(anchor_name.lastIndexOf('::')+2);if(this.pending)
{return false;}
else if(!this.ready())
{if(this.postid==tmppostid)
{this.full_edit();return false;}
this.abort();}
this.editorcounter++;this.editorid='vB_Editor_QE_'+this.editorcounter;this.postid=tmppostid;this.messageobj=fetch_object('post_message_'+this.postid);this.originalhtml=this.messageobj.innerHTML;this.unchanged=null;this.unchanged_reason=null;this.fetch_editor();this.editstate=true;return false;};vB_AJAX_QuickEditor.prototype.fetch_editor=function()
{if(fetch_object('progress_'+this.postid))
{fetch_object('progress_'+this.postid).style.display='';}
document.body.style.cursor='wait';this.ajax=new vB_AJAX_Handler(true);this.ajax.onreadystatechange(this.display_editor);this.ajax.send('ajax.php?do=quickedit&p='+this.postid,'do=quickedit&p='+this.postid+'&editorid='+PHP.urlencode(this.editorid));this.pending=true;};vB_AJAX_QuickEditor.prototype.display_editor=function()
{var AJAX=vB_QuickEditor.ajax.handler;if(AJAX.readyState==4&&AJAX.status==200)
{if(fetch_object('progress_'+vB_QuickEditor.postid))
{fetch_object('progress_'+vB_QuickEditor.postid).style.display='none';}
document.body.style.cursor='auto';vB_QuickEditor.pending=false;if(fetch_tag_count(AJAX.responseXML,'disabled'))
{window.location='editpost.php?'+SESSIONURL+'do=editpost&postid='+vB_QuickEditor.postid;}
else if(fetch_tag_count(AJAX.responseXML,'error'))
{}
else
{var editor=fetch_tags(AJAX.responseXML,'editor')[0];var reason=editor.getAttribute('reason');vB_QuickEditor.messageobj.innerHTML=vB_QuickEditor.ajax.fetch_data(editor);if(fetch_object(vB_QuickEditor.editorid+'_edit_reason'))
{vB_QuickEditor.unchanged_reason=PHP.unhtmlspecialchars(reason);fetch_object(vB_QuickEditor.editorid+'_edit_reason').value=vB_QuickEditor.unchanged_reason;fetch_object(vB_QuickEditor.editorid+'_edit_reason').onkeypress=vB_AJAX_QuickEditor_Events.prototype.reason_key_trap;}
vB_Editor[vB_QuickEditor.editorid]=new vB_Text_Editor(vB_QuickEditor.editorid,editor.getAttribute('mode'),editor.getAttribute('parsetype'),editor.getAttribute('parsesmilies'));if(fetch_object(vB_QuickEditor.editorid+'_editor')&&fetch_object(vB_QuickEditor.editorid+'_editor').scrollIntoView)
{fetch_object(vB_QuickEditor.editorid+'_editor').scrollIntoView(true);}
vB_Editor[vB_QuickEditor.editorid].editbox.style.width='100%';vB_Editor[vB_QuickEditor.editorid].check_focus();vB_QuickEditor.unchanged=vB_Editor[vB_QuickEditor.editorid].get_editor_contents();fetch_object(vB_QuickEditor.editorid+'_save').onclick=vB_QuickEditor.save;fetch_object(vB_QuickEditor.editorid+'_abort').onclick=vB_QuickEditor.abort;fetch_object(vB_QuickEditor.editorid+'_adv').onclick=vB_QuickEditor.full_edit;var delbutton=fetch_object(vB_QuickEditor.editorid+'_delete');if(delbutton)
{delbutton.onclick=vB_QuickEditor.show_delete;}}
if(is_ie)
{AJAX.abort();}}};vB_AJAX_QuickEditor.prototype.restore=function(post_html,type)
{this.hide_errors(true);if(this.editorid&&vB_Editor[this.editorid]&&vB_Editor[this.editorid].initialized)
{vB_Editor[this.editorid].destroy();}
if(type=='tableobj')
{fetch_object('edit'+this.postid).innerHTML=post_html;}
else
{this.messageobj.innerHTML=post_html;}
this.editstate=false;};vB_AJAX_QuickEditor.prototype.abort=function(e)
{if(fetch_object('progress_'+vB_QuickEditor.postid))
{fetch_object('progress_'+vB_QuickEditor.postid).style.display='none';}
document.body.style.cursor='auto';vB_QuickEditor.restore(vB_QuickEditor.originalhtml,'messageobj');};vB_AJAX_QuickEditor.prototype.full_edit=function(e)
{var form=new vB_Hidden_Form('editpost.php?do=editpost&postid='+vB_QuickEditor.postid);form.add_variable('do','updatepost');form.add_variable('s',fetch_sessionhash());form.add_variable('advanced',1);form.add_variable('postid',vB_QuickEditor.postid);form.add_variable('wysiwyg',vB_Editor[vB_QuickEditor.editorid].wysiwyg_mode);form.add_variable('message',vB_Editor[vB_QuickEditor.editorid].get_editor_contents());form.add_variable('reason',fetch_object(vB_QuickEditor.editorid+'_edit_reason').value);form.submit_form();}
vB_AJAX_QuickEditor.prototype.save=function(e)
{var newtext=vB_Editor[vB_QuickEditor.editorid].get_editor_contents();var newreason=vB_Editor[vB_QuickEditor.editorid];if(newtext==vB_QuickEditor.unchanged&&newreason==vB_QuickEditor.unchanged_reason)
{vB_QuickEditor.abort(e);}
else
{fetch_object(vB_QuickEditor.editorid+'_posting_msg').style.display='';document.body.style.cursor='wait';pc_obj=fetch_object('postcount'+vB_QuickEditor.postid);vB_QuickEditor.ajax=new vB_AJAX_Handler(true);vB_QuickEditor.ajax.onreadystatechange(vB_QuickEditor.update);vB_QuickEditor.ajax.send('editpost.php?do=updatepost&postid='+vB_QuickEditor.postid,'do=updatepost&ajax=1&postid='
+vB_QuickEditor.postid
+'&wysiwyg='+vB_Editor[vB_QuickEditor.editorid].wysiwyg_mode
+'&message='+PHP.urlencode(newtext)
+'&reason='+PHP.urlencode(fetch_object(vB_QuickEditor.editorid+'_edit_reason').value)
+(pc_obj!=null?'&postcount='+PHP.urlencode(pc_obj.name):''));vB_QuickEditor.pending=true;}};vB_AJAX_QuickEditor.prototype.show_delete=function()
{vB_QuickEditor.deletedialog=fetch_object('quickedit_delete');if(vB_QuickEditor.deletedialog&&vB_QuickEditor.deletedialog.style.display!='')
{vB_QuickEditor.deletedialog.style.display='';vB_QuickEditor.deletebutton=fetch_object('quickedit_dodelete');vB_QuickEditor.deletebutton.onclick=vB_QuickEditor.delete_post;if(!is_opera&&!is_saf)
{vB_QuickEditor.deletebutton.disabled=true;vB_QuickEditor.deleteoptions=new Array();vB_QuickEditor.deleteoptions['leave']=fetch_object('rb_del_leave');vB_QuickEditor.deleteoptions['soft']=fetch_object('rb_del_soft');vB_QuickEditor.deleteoptions['hard']=fetch_object('rb_del_hard');for(var i in vB_QuickEditor.deleteoptions)
{if(vB_QuickEditor.deleteoptions[i])
{vB_QuickEditor.deleteoptions[i].onclick=vB_QuickEditor.deleteoptions[i].onchange=vB_AJAX_QuickEditor_Events.prototype.delete_button_handler;}}}}};vB_AJAX_QuickEditor.prototype.delete_post=function()
{var dontdelete=fetch_object('rb_del_leave');if(dontdelete&&dontdelete.checked)
{vB_QuickEditor.abort();return;}
var form=new vB_Hidden_Form('editpost.php');form.add_variable('do','deletepost');form.add_variable('s',fetch_sessionhash());form.add_variable('postid',vB_QuickEditor.postid);form.add_variables_from_object(vB_QuickEditor.deletedialog);form.submit_form();};vB_AJAX_QuickEditor.prototype.update=function()
{var AJAX=vB_QuickEditor.ajax.handler;if(AJAX.readyState==4&&AJAX.status==200)
{vB_QuickEditor.pending=false;document.body.style.cursor='auto';fetch_object(vB_QuickEditor.editorid+'_posting_msg').style.display='none';if(fetch_tag_count(AJAX.responseXML,'error'))
{var errors=fetch_tags(AJAX.responseXML,'error');var error_html='<ol>';for(var i=0;i<errors.length;i++)
{error_html+='<li>'+vB_QuickEditor.ajax.fetch_data(errors[i])+'</li>';}
error_html+='</ol>';vB_QuickEditor.show_errors('<ol>'+error_html+'</ol>');}
else
{vB_QuickEditor.restore(vB_QuickEditor.ajax.fetch_data(fetch_tags(AJAX.responseXML,'postbit')[0]),'tableobj');PostBit_Init(fetch_object('post'+vB_QuickEditor.postid),vB_QuickEditor.postid);}
if(is_ie)
{AJAX.abort();}}
return false;};vB_AJAX_QuickEditor.prototype.show_errors=function(errortext)
{fetch_object('ajax_post_errors_message').innerHTML=errortext;var errortable=fetch_object('ajax_post_errors');errortable.style.width='400px';errortable.style.zIndex=500;var measurer=(is_saf?'body':'documentElement');errortable.style.left=(is_ie?document.documentElement.clientWidth:self.innerWidth)/2-200+document[measurer].scrollLeft+'px';errortable.style.top=(is_ie?document.documentElement.clientHeight:self.innerHeight)/2-150+document[measurer].scrollTop+'px';errortable.style.display='';};vB_AJAX_QuickEditor.prototype.hide_errors=function(skip_focus_check)
{this.errors=false;fetch_object('ajax_post_errors').style.display='none';if(skip_focus_check!=true)
{vB_Editor[this.editorid].check_focus();}};function vB_AJAX_QuickEditor_Events()
{}
vB_AJAX_QuickEditor_Events.prototype.editbutton_click=function(e)
{return vB_QuickEditor.edit(this.name);};vB_AJAX_QuickEditor_Events.prototype.delete_button_handler=function(e)
{if(this.id=='rb_del_leave'&&this.checked)
{vB_QuickEditor.deletebutton.disabled=true;}
else
{vB_QuickEditor.deletebutton.disabled=false;}}
vB_AJAX_QuickEditor_Events.prototype.reason_key_trap=function(e)
{e=e?e:window.event;switch(e.keyCode)
{case 9:{fetch_object(vB_QuickEditor.editorid+'_save').focus();return false;}
break;case 13:{vB_QuickEditor.save();return false;}
break;default:{return true;}}}
var vB_QuickEditor=new vB_AJAX_QuickEditor();
var qr_repost=false;var qr_errors_shown=false;var qr_active=false;var qr_posting=0;var clickedelm=false;function qr_init()
{qr_disable_controls();qr_init_buttons(fetch_object('posts'));}
function qr_init_buttons(obj)
{var anchors=fetch_tags(obj,'a');for(var i=0;i<anchors.length;i++)
{if(anchors[i].id&&anchors[i].id.substr(0,3)=='qr_')
{anchors[i].onclick=function(e){return qr_activate(this.id.substr(3));};}}}
function qr_disable_controls()
{if(require_click)
{fetch_object('qr_postid').value=0;vB_Editor[QR_EditorID].disable_editor(vbphrase['click_quick_reply_icon']);var qr_sig=fetch_object('cb_signature');if(qr_sig!=null)
{qr_sig.disabled=true;}
active=false;}
else
{vB_Editor[QR_EditorID].write_editor_contents('');}
if(threaded_mode!=1)
{fetch_object('qr_quickreply').disabled=true;}
qr_active=false;}
function qr_activate(postid)
{var qr_collapse=fetch_object('collapseobj_quickreply');if(qr_collapse&&qr_collapse.style.display=="none")
{toggle_collapse('quickreply');}
fetch_object('qr_postid').value=postid;fetch_object('qr_preview').select();fetch_object('qr_quickreply').disabled=false;var qr_sig=fetch_object("cb_signature");if(qr_sig)
{qr_sig.disabled=false;qr_sig.checked=true;}
if(qr_active==false)
{vB_Editor[QR_EditorID].enable_editor('');}
if(!is_ie&&vB_Editor[QR_EditorID].wysiwyg_mode)
{fetch_object('qr_scroll').scrollIntoView(false);}
vB_Editor[QR_EditorID].check_focus();qr_active=true;return false;}
function qr_prepare_submit(formobj,minchars)
{if(qr_repost==true)
{return true;}
if(!allow_ajax_qr||!AJAX_Compatible)
{return qr_check_data(formobj,minchars);}
else if(qr_check_data(formobj,minchars))
{var test_ajax=new vB_AJAX_Handler(true);if(!test_ajax.init()||(typeof vb_disable_ajax!='undefined'&&vb_disable_ajax>0))
{return true;}
if(is_ie&&userAgent.indexOf('msie 5.')!=-1)
{if(PHP.urlencode(formobj.message.value).indexOf('%u')!=-1)
{return true;}}
if(qr_posting==1)
{return false;}
else
{qr_posting=1;setTimeout("qr_posting = 0",1000);}
if(clickedelm==formobj.preview.value)
{return true;}
else
{var submitstring='ajax=1';if(typeof ajax_last_post!='undefined')
{submitstring+='&ajax_lastpost='+PHP.urlencode(ajax_last_post);}
for(i=0;i<formobj.elements.length;i++)
{var obj=formobj.elements[i];if(obj.name&&!obj.disabled)
{switch(obj.type)
{case'text':case'textarea':case'hidden':submitstring+='&'+obj.name+'='+PHP.urlencode(obj.value);break;case'checkbox':case'radio':submitstring+=obj.checked?'&'+obj.name+'='+PHP.urlencode(obj.value):'';break;case'select-one':submitstring+='&'+obj.name+'='+PHP.urlencode(obj.options[obj.selectedIndex].value);break;case'select-multiple':for(var j=0;j<obj.options.length;j++)
{submitstring+=(obj.options[j].selected?'&'+obj.name+'='+PHP.urlencode(obj.options[j].value):'');}
break;}}}
fetch_object('qr_posting_msg').style.display='';document.body.style.cursor='wait';qr_ajax_post(formobj.action,submitstring);return false;}}
else
{return false;}}
function qr_check_data(formobj,minchars)
{switch(fetch_object('qr_postid').value)
{case'0':{alert(vbphrase['click_quick_reply_icon']);return false;}
case'who cares':{if(typeof formobj.quickreply!='undefined')
{formobj.quickreply.checked=false;}
break;}}
if(clickedelm==formobj.preview.value)
{minchars=0;}
return vB_Editor[QR_EditorID].prepare_submit(0,minchars);}
function qr_ajax_post(submitaction,submitstring)
{qr_repost=false;xml=new vB_AJAX_Handler(true);xml.onreadystatechange(qr_do_ajax_post);xml.send(submitaction,submitstring);}
function qr_do_ajax_post()
{if(xml.handler.readyState==4&&xml.handler.status==200)
{if(xml.handler.responseXML)
{document.body.style.cursor='auto';fetch_object('qr_posting_msg').style.display='none';qr_posting=0;if(fetch_tag_count(xml.handler.responseXML,'postbit'))
{ajax_last_post=xml.fetch_data(fetch_tags(xml.handler.responseXML,'time')[0]);qr_disable_controls();qr_hide_errors();var postbits=fetch_tags(xml.handler.responseXML,'postbit');for(var i=0;i<postbits.length;i++)
{var newdiv=document.createElement('div');newdiv.innerHTML=xml.fetch_data(postbits[i]);var lp=fetch_object('lastpost');var lpparent=lp.parentNode;var postbit=lpparent.insertBefore(newdiv,lp);PostBit_Init(postbit,postbits[i].getAttribute('postid'));}
if(fetch_object('qr_submit'))
{fetch_object('qr_submit').blur();}}
else
{if(!is_saf)
{var errors=fetch_tags(xml.handler.responseXML,'error');var error_html='<ol>';for(var i=0;i<errors.length;i++)
{error_html+='<li>'+xml.fetch_data(errors[i])+'</li>';}
error_html+='</ol>';qr_show_errors('<ol>'+error_html+'</ol>');if(is_ie)
{xml.handler.abort();}
return false;}
qr_repost=true;fetch_object('qrform').submit();}}
else
{qr_repost=true;fetch_object('qrform').submit();}
if(is_ie)
{xml.handler.abort();}}}
function qr_show_errors(errortext)
{qr_errors_shown=true;fetch_object('qr_error_td').innerHTML=errortext;fetch_object('qr_error_tbody').style.display='';vB_Editor[QR_EditorID].check_focus();return false;}
function qr_hide_errors()
{if(qr_errors_shown)
{qr_errors_shown=true;fetch_object('qr_error_tbody').style.display='none';return false;}}
var vB_QuickReply=true;
var vB_ReadMarker=new Array()
var vB_ReadMarker={'forum_statusicon_prefix':'forum_statusicon_','thread_statusicon_prefix':'thread_statusicon_','thread_gotonew_prefix':'thread_gotonew_','thread_title_prefix':'thread_title_'};function vB_AJAX_ReadMarker(forumid)
{this.forumid=forumid;};vB_AJAX_ReadMarker.prototype.mark_read=function()
{forumid=this.forumid;this.ajax=new vB_AJAX_Handler(true);this.ajax.onreadystatechange(vB_ReadMarker[forumid].ajax_check);this.ajax.send('ajax.php?do=markread&f='+this.forumid,'do=markread&forumid='+this.forumid);};vB_AJAX_ReadMarker.prototype.ajax_check=function()
{var AJAX=vB_ReadMarker[forumid].ajax.handler;if(AJAX.readyState==4&&AJAX.status==200)
{if(AJAX.responseXML)
{vB_ReadMarker[forumid].handle_forums_xml(AJAX.responseXML);}
if(is_ie)
{AJAX.abort();}}
return false;};vB_AJAX_ReadMarker.prototype.handle_forums_xml=function(forums_xml)
{var forum_nodes=fetch_tags(forums_xml,'forum');for(var i=0;i<forum_nodes.length;i++)
{var forumid=this.ajax.fetch_data(forum_nodes[i]);this.update_forum_status(forumid);var threadbits_object=fetch_object('threadbits_forum_'+forumid);if(threadbits_object)
{this.handle_threadbits(threadbits_object);}}};vB_AJAX_ReadMarker.prototype.update_forum_status=function(forumid)
{var imageobj=fetch_object(vB_ReadMarker['forum_statusicon_prefix']+forumid);if(imageobj)
{imageobj.style.cursor='default';imageobj.title=imageobj.otitle;imageobj.src=this.fetch_old_src(imageobj.src,'forum');}};vB_AJAX_ReadMarker.prototype.handle_threadbits=function(threadbits_object)
{var links=fetch_tags(threadbits_object,'a');for(var i=0;i<links.length;i++)
{if(links[i].id&&links[i].id.substr(0,vB_ReadMarker['thread_gotonew_prefix'].length)==vB_ReadMarker['thread_gotonew_prefix'])
{this.update_thread_status(links[i].id.substr(vB_ReadMarker['thread_gotonew_prefix'].length));}}};vB_AJAX_ReadMarker.prototype.update_thread_status=function(threadid)
{var statusicon=fetch_object(vB_ReadMarker['thread_statusicon_prefix']+threadid);if(statusicon)
{statusicon.src=this.fetch_old_src(statusicon.src,'thread');}
var gotonew=fetch_object(vB_ReadMarker['thread_gotonew_prefix']+threadid);if(gotonew)
{gotonew.parentNode.removeChild(gotonew);}
var threadtitle=fetch_object(vB_ReadMarker['thread_title_prefix']+threadid);if(threadtitle)
{threadtitle.style.fontWeight='normal';}};vB_AJAX_ReadMarker.prototype.fetch_old_src=function(newsrc,type)
{var foo=newsrc.replace(/_(new)([\._])(.+)$/i,(type=='thread'?'$2$3':'_old$2$3'));return foo;};function mark_forum_read(forumid)
{if(AJAX_Compatible)
{vB_ReadMarker[forumid]=new vB_AJAX_ReadMarker(forumid);vB_ReadMarker[forumid].mark_read();}
else
{window.location='forumdisplay.php?'+SESSIONURL+'do=markread&forumid='+forumid;}
return false;};function init_forum_readmarker_icon(e)
{mark_forum_read(this.id.substr(vB_ReadMarker['forum_statusicon_prefix'].length));};function init_forum_readmarker_system()
{var images=fetch_tags(document,'img');for(var i=0;i<images.length;i++)
{if(images[i].id&&images[i].id.substr(0,vB_ReadMarker['forum_statusicon_prefix'].length)==vB_ReadMarker['forum_statusicon_prefix'])
{if(images[i].src.search(/\/([^\/]+)(new)(_lock)?\.([a-z0-9]+)$/i)!=-1)
{img_alt_2_title(images[i]);images[i].otitle=images[i].title;images[i].title=vbphrase['doubleclick_forum_markread'];images[i].style.cursor=pointer_cursor;images[i].ondblclick=init_forum_readmarker_icon;}}}};
function init_validation(formid)
{var formobj=fetch_object(formid);for(var i=0;i<formobj.elements.length;i++)
{switch(formobj.elements[i].tagName)
{case'INPUT':{switch(formobj.elements[i].type)
{case'text':case'password':case'file':{formobj.elements[i].onblur=validate_setting;}
break;case'radio':case'checkbox':case'button':{if(is_opera)
{formobj.elements[i].onkeypress=validate_setting;}
formobj.elements[i].onclick=validate_setting;}
break;default:}}
break;case'SELECT':{formobj.elements[i].onchange=validate_setting;}
break;case'TEXTAREA':{formobj.elements[i].onblur=validate_setting;}
break;default:}}
if(window.attachEvent&&!is_saf)
{document.attachEvent('onmousedown',capture_results);document.attachEvent('onmouseup',display_results,false);}
else if(document.addEventListener&&!is_saf)
{document.addEventListener('mousedown',capture_results,false);document.addEventListener('mouseup',display_results,false);}
else
{window.onmousedown=capture_results;window.onmouseup=display_results;}}
var settings_validation=new Array();var settings_validation_cache=new Array();var settings_validation_cleanup=new Array();var mouse_down=false;function capture_results(e)
{e=e?e:window.event;mouse_down=(e.type=='mousedown');}
function display_results(e)
{e=e?e:window.event;mouse_down=(e.type=='mousedown');for(var setting_name in settings_validation_cleanup)
{fetch_object('tbody_error_'+setting_name).style.display='none';delete settings_validation_cleanup[setting_name];}
for(var setting_name in settings_validation_cache)
{fetch_object('tbody_error_'+setting_name).style.display='';fetch_object('span_error_'+setting_name).innerHTML=settings_validation_cache[setting_name];delete settings_validation_cache[setting_name];}}
function validate_setting(e)
{e=e?e:window.event;if(this.id)
{this.varname=this.id.replace(/^.+\[(.+)\].*$/,'$1');}
else
{this.varname=this.name.replace(/^.+\[(.+)\].*$/,'$1');}
settings_validation[this.varname]=new vB_Setting_Validator(this.varname);return true;}
function vB_Setting_Validator(varname)
{this.varname=varname;this.query_string='';this.check_setting();}
vB_Setting_Validator.prototype.check_setting=function()
{this.container=fetch_object('tbody_'+this.varname);this.form=new vB_Hidden_Form('options.php');this.form.add_variable('do','validate');try
{this.form.add_variable('adminhash',fetch_object('optionsform').adminhash.value);}
catch(e){}
this.form.add_variables_from_object(this.container);this.query_string=this.form.build_query_string()+'varname='+this.varname;this.form=null;this.ajax=new vB_AJAX_Handler(true);this.ajax.init();this.ajax.varname=this.varname;var ajax_closure=this.ajax;this.ajax.handler.onreadystatechange=function(e){handle_validation(ajax_closure);};this.ajax.send('options.php?do=validate&varname='+this.varname,this.query_string);}
function handle_validation(ajax_closure)
{if(ajax_closure.handler.readyState==4&&ajax_closure.handler.status==200&&ajax_closure.handler.responseXML)
{var setting_name=ajax_closure.fetch_data(fetch_tags(ajax_closure.handler.responseXML,'varname')[0]);var validity_return=ajax_closure.fetch_data(fetch_tags(ajax_closure.handler.responseXML,'valid')[0]);var errmsg=fetch_object('tbody_error_'+setting_name);if(errmsg)
{if(errmsg.style.display!='none')
{if(mouse_down)
{settings_validation_cleanup[setting_name]=true;}
else
{errmsg.style.display='none';}}
if(validity_return!=1)
{if(mouse_down)
{settings_validation_cache[setting_name]=validity_return;}
else
{fetch_object('tbody_error_'+setting_name).style.display='';fetch_object('span_error_'+setting_name).innerHTML=validity_return;}}}
else
{}
if(is_ie)
{ajax_closure.handler.abort();}}}
function count_errors()
{var tbodies=fetch_tags(document,'tbody');for(var i=0;i<tbodies.length;i++)
{if(tbodies[i].id&&tbodies[i].id.substr(0,12)=='tbody_error_'&&tbodies[i].style.display!='none')
{return confirm(error_confirmation_phrase);}}
return true;}
if(AJAX_Compatible)
{init_validation('optionsform');}
var win=window;var n=0;function Sdo(phpdo,styleid)
{phpdo=phpdo.split("_");if(phpdo[0]=="template")
{switch(phpdo[1])
{case"templates":{goURL="modify&expandset=";}
break;case"addtemplate":{goURL="add&dostyleid=";}
break;case"editstyle":{goURL="editstyle&dostyleid=";}
break;case"addstyle":{goURL="addstyle&parentid=";}
break;case"delete":{goURL="deletestyle&dostyleid=";}
break;case"download":{goURL="files&dostyleid=";}
break;case"revertall":{goURL="revertall&dostyleid=";}
break;}
if(goURL)
{window.location="template.php?s="+SESSIONHASH+"&group="+document.forms.tform.group.value+"&do="+goURL+styleid;}}
else if(phpdo[0]=="css")
{window.location="css.php?s="+SESSIONHASH+"&do=edit&dowhat="+phpdo[1]+"&group="+document.forms.tform.group.value+"&dostyleid="+styleid;}}
function Tjump(gourl)
{var gotourl="template.php?s="+SESSIONHASH+"&do="+gourl+"&searchstring="+SEARCHSTRING+"&expandset="+EXPANDSET;if(is_ie&&event.shiftKey)
{window.open(gotourl)}
else
{window.location=gotourl;}}
function Texpand(dogroup,doexpandset)
{window.location="template.php?s="+SESSIONHASH+"&do=modify&expandset="+doexpandset+"&group="+dogroup+"#"+dogroup;}
function Tedit(templateid)
{Tjump("edit&templateid="+templateid+"&dostyleid="+EXPANDSET+"&group="+GROUP);}
function Tcustom1(styleid,title)
{Tjump("add&dostyleid="+styleid+"&title="+title+"&group="+GROUP);}
function Tcustom2(styleid,templateid)
{Tjump("add&dostyleid="+styleid+"&templateid="+templateid+"&group="+GROUP);}
function Tdelete(styleid,templateid)
{Tjump("delete&dostyleid="+styleid+"&templateid="+templateid+"&group="+GROUP);}
function Toriginal(title)
{window.open("template.php?s="+SESSIONHASH+"&do=view&title="+title);}
function Tprep(elm,styleid,echo)
{str=elm.value;if(echo)
{button=new Array();button['edit']=eval("document.forms.tform.edit"+styleid);button['edit'].disabled="disabled";button['cust']=eval("document.forms.tform.cust"+styleid);button['cust'].disabled="disabled";button['kill']=eval("document.forms.tform.kill"+styleid);button['kill'].disabled="disabled";button['expa']=eval("document.forms.tform.expa"+styleid);button['expa'].disabled="disabled";button['orig']=eval("document.forms.tform.orig"+styleid);button['orig'].disabled="disabled";textbox=document.getElementById('helparea'+styleid);}
if(str!='')
{selitem=eval("document.forms.tform.tl"+styleid);out=new Array();out['selectedtext']=selitem.options[selitem.selectedIndex].text.replace(/^-- /,'');if(str=="~")
{str=out['selectedtext'];}
out['styleid']=styleid;out['original']=str;if(str.search(/^\[(\w*)\]$/)!=-1)
{out['value']=str.replace(/^\[(\w*)\]$/,'$1');if(isNaN(out['value'])||out['value']=="")
{out['action']="expand";out['text']=construct_phrase(vbphrase['click_the_expand_collapse_button'],out['selectedtext'].replace(/Templates/,'').bold());button['expa'].disabled="";}
else
{out['action']="editinherited";selecteditem=eval('document.forms.tform.tl'+styleid);tsid=selecteditem.options[selecteditem.selectedIndex].getAttribute('tsid');out['text']=construct_phrase(vbphrase['this_template_has_been_customized_in_a_parent_style'],STYLETITLE[tsid].bold(),STYLETITLE[styleid].bold(),out['selectedtext'].bold(),"template.php?s="+SESSIONHASH+"&amp;do=edit&amp;templateid="+out['value']+"&amp;group="+GROUP);button['orig'].disabled="";button['cust'].disabled="";}}
else
{out['value']=str;if(isNaN(out['value']))
{out['action']="customize";out['text']=vbphrase['this_template_has_not_been_customized'];button['cust'].disabled="";}
else
{out['action']="edit";out['text']=vbphrase['this_template_has_been_customized_in_this_style'];button['edit'].disabled="";button['orig'].disabled="";button['kill'].disabled="";}}
if(echo)
{textbox.innerHTML=out['selectedtext'].bold()+":<br /><br />"+out['text'];if(elm.getAttribute('i'))
{var editinfo=elm.getAttribute('i').split(";");editinfo[1]=new Date(editinfo[1]*1000);day=editinfo[1].getDate();month=editinfo[1].getMonth();year=editinfo[1].getFullYear();hours=editinfo[1].getHours();if(hours<10)
{hours='0'+hours;}
mins=editinfo[1].getMinutes();if(mins<10)
{mins='0'+mins;}
textbox.innerHTML+=construct_phrase("<br /><br />"+vbphrase['template_last_edited_js'],MONTH[month],day,year,hours,mins,editinfo[0].bold());}}
else
{return out;}}
else
{textbox.innerHTML=construct_phrase("<center>"+vbphrase['x_templates']+"</center>",STYLETITLE[styleid].bold());}}
function Tdo(arry,request)
{switch(arry['action'])
{case"expand":Tjump("modify&expandset="+EXPANDSET+"&group="+arry['value']);break;case"customize":Tjump("add&dostyleid="+arry['styleid']+"&title="+arry['value']+"&group="+GROUP);break;case"edit":switch(request)
{case"vieworiginal":window.open("template.php?s="+SESSIONHASH+"&do=view&title="+out['selectedtext']);break;case"killtemplate":Tjump("delete&templateid="+arry['value']+"&dostyleid="+arry['styleid']+"&group="+GROUP);break;default:Tjump("edit&templateid="+arry['value']+"&group="+GROUP);break;}
break;case"editinherited":if(request=="vieworiginal")
{window.open("template.php?s="+SESSIONHASH+"&do=view&title="+out['selectedtext']);}
else
{Tjump("add&dostyleid="+arry['styleid']+"&templateid="+arry['value']+"&group="+GROUP);}
break;}}
var popup='';function displayHTML()
{var inf=document.cpform.template.value;if(popup&&!popup.closed)
{popup.document.close();}
else
{popup=window.open(", ",'popup','toolbar = no, status = no, scrollbars=yes');}
popup.document.open();popup.document.write(''+inf+'');}
function HighlightAll()
{var tempval=eval('document.cpform.template')
tempval.focus();tempval.select();if(document.all)
{therange=tempval.createTextRange();therange.execCommand('Copy');setTimeout("window.status=''",1800)}}
var startpos=0;function findInPage(str)
{var txt,i,found;if(str=='')
{return false;}
if(is_moz)
{txt=fetch_object(textarea_id).value;if(!startpos||startpos+str.length>=txt.length)
{startpos=0;}
var x=0;var matchfound=false;for(i=startpos;i<txt.length;i++)
{if(txt.charAt(i).toLowerCase()==str.charAt(x).toLowerCase())
{x++;}
else
{x=0;}
if(x==str.length)
{i++;startpos=i;fetch_object(textarea_id).focus();fetch_object(textarea_id).setSelectionRange(i-str.length,i);moz_txtarea_scroll(fetch_object(textarea_id),i);matchfound=true;break;}
if(i==txt.length-1&&startpos>0)
{i=0;startpos=0;}}
if(!matchfound)
{alert(vbphrase['not_found']);}}
if(is_ie)
{txt=win.fetch_object(textarea_id).createTextRange();for(i=0;i<=n&&(found=txt.findText(str))!=false;i++)
{txt.moveStart('character',1);txt.moveEnd('textedit');}
if(found)
{txt.moveStart('character',-1);txt.findText(str);txt.select();txt.scrollIntoView(true);n++;}
else
{if(n>0)
{n=0;findInPage(str);}
else{alert(vbphrase['not_found']);}}}
return false;}
function moz_txtarea_scroll(input,txtpos)
{var newarea=input.cloneNode(true);newarea.setAttribute('id','moo');newarea.value=input.value.substr(0,txtpos);document.body.appendChild(newarea);if(newarea.scrollHeight<=input.scrollTop||newarea.scrollHeight>=input.scrollTop+input.offsetHeight)
{if(newarea.scrollHeight==newarea.clientHeight)
{input.scrollTop=0;}
else
{input.scrollTop=newarea.scrollHeight-40;}}
document.body.removeChild(document.getElementById('moo'));}
function set_wordwrap(idname,yesno)
{element=fetch_object(idname);if(yesno)
{element.wrap="soft";}
else
{element.wrap="off";}}
function check_children(styleid,value)
{fetch_object("userselect_"+styleid).checked=value;for(i in STYLEPARENTS)
{if(STYLEPARENTS[i]==styleid)
{check_children(i,value);}}
return false;}
function vB_Text_Editor(editorid,mode,parsetype,parsesmilies,initial_text,ajax_extra)
{this.editorid=editorid;this.wysiwyg_mode=parseInt(mode,10)?1:0;this.initialized=false;this.parsetype=(typeof parsetype=='undefined'?'nonforum':parsetype);this.ajax_extra=(typeof parsetype=='undefined'?'':ajax_extra);this.parsesmilies=(typeof parsesmilies=='undefined'?1:parsesmilies);this.popupmode=(typeof vBmenu=='undefined'?false:true);this.controlbar=fetch_object(this.editorid+'_controls');this.textobj=fetch_object(this.editorid+'_textarea');this.buttons=new Array();this.popups=new Array();this.prompt_popup=null;this.fontstate=null;this.sizestate=null;this.colorstate=null;this.clipboard='';this.disabled=false;this.history=new vB_History();this.influx=0;this.init=function()
{if(this.initialized)
{return;}
this.textobj.disabled=false;if(this.tempiframe)
{this.tempiframe.parentNode.removeChild(this.tempiframe);}
this.set_editor_contents(initial_text);this.set_editor_functions();this.init_controls();this.init_smilies(fetch_object(this.editorid+'_smiliebox'));if(typeof smilie_window!='undefined'&&!smilie_window.closed)
{this.init_smilies(smilie_window.document.getElementById('smilietable'));}
this.captcha=document.getElementById("imagestamp");if(this.captcha!=null)
{this.captcha.setAttribute("tabIndex",1);}
this.initialized=true;};this.check_focus=function()
{if(!this.editwin.hasfocus)
{this.editwin.focus();if(is_opera)
{this.editwin.focus();}}}
this.init_controls=function()
{var controls=new Array();if(this.controlbar==null)
{return;}
var buttons=fetch_tags(this.controlbar,'div');for(var i=0;i<buttons.length;i++)
{if(buttons[i].className=='imagebutton'&&buttons[i].id)
{controls[controls.length]=buttons[i].id;}}
for(var i=0;i<controls.length;i++)
{var control=fetch_object(controls[i]);if(control.id.indexOf(this.editorid+'_cmd_')!=-1)
{this.init_command_button(control);}
else if(control.id.indexOf(this.editorid+'_popup_')!=-1)
{this.init_popup_button(control);}}
set_unselectable(this.controlbar);};this.init_smilies=function(smilie_container)
{if(smilie_container!=null)
{var smilies=fetch_tags(smilie_container,'img');for(var i=0;i<smilies.length;i++)
{if(smilies[i].id&&smilies[i].id.indexOf('_smilie_')!=false)
{smilies[i].style.cursor=pointer_cursor;smilies[i].editorid=this.editorid;smilies[i].onclick=vB_Text_Editor_Events.prototype.smilie_onclick;smilies[i].unselectable='on';}}}}
this.init_command_button=function(obj)
{obj.cmd=obj.id.substr(obj.id.indexOf('_cmd_')+5);obj.editorid=this.editorid;this.buttons[obj.cmd]=obj;if(obj.cmd=='switchmode')
{if(AJAX_Compatible)
{obj.state=this.wysiwyg_mode?true:false;this.set_control_style(obj,'button',this.wysiwyg_mode?'selected':'normal');}
else
{obj.parentNode.removeChild(obj);}}
else
{obj.state=false;obj.mode='normal';}
obj.onclick=obj.onmousedown=obj.onmouseover=obj.onmouseout=vB_Text_Editor_Events.prototype.command_button_onmouseevent;}
this.init_popup_button=function(obj)
{obj.cmd=obj.id.substr(obj.id.indexOf('_popup_')+7);if(this.popupmode)
{vBmenu.register(obj.id,true);vBmenu.menus[obj.id].open_steps=5;obj.editorid=this.editorid;obj.state=false;this.buttons[obj.cmd]=obj;if(obj.cmd=='fontname')
{this.fontout=fetch_object(this.editorid+'_font_out');this.fontout.innerHTML=obj.title;this.fontoptions={'':this.fontout};for(var option in fontoptions)
{var div=document.createElement('div');div.id=this.editorid+'_fontoption_'+fontoptions[option];div.style.width=this.fontout.style.width;div.style.display='none';div.innerHTML=fontoptions[option];this.fontoptions[fontoptions[option]]=this.fontout.parentNode.appendChild(div);}}
else if(obj.cmd=='fontsize')
{this.sizeout=fetch_object(this.editorid+'_size_out');this.sizeout.innerHTML=obj.title;this.sizeoptions={'':this.sizeout};for(var option in sizeoptions)
{var div=document.createElement('div');div.id=this.editorid+'_sizeoption_'+sizeoptions[option];div.style.width=this.sizeout.style.width;div.style.display='none';div.innerHTML=sizeoptions[option];this.sizeoptions[sizeoptions[option]]=this.sizeout.parentNode.appendChild(div);}}
obj._onmouseover=obj.onmouseover;obj._onclick=obj.onclick;obj.onmouseover=obj.onmouseout=obj.onclick=vB_Text_Editor_Events.prototype.popup_button_onmouseevent;vBmenu.menus[obj.id]._show=vBmenu.menus[obj.id].show;vBmenu.menus[obj.id].show=vB_Text_Editor_Events.prototype.popup_button_show;}
else
{this.build_select(obj);}}
this.build_select=function(obj)
{var sel=document.createElement('select');sel.id=this.editorid+'_select_'+obj.cmd;sel.editorid=this.editorid;sel.cmd=obj.cmd;var opt=document.createElement('option');opt.value='';opt.text=obj.title;sel.add(opt,is_ie?sel.options.length:null);var opt=document.createElement('option');opt.value='';opt.text=' ';sel.add(opt,is_ie?sel.options.length:null);switch(obj.cmd)
{case'fontname':{for(var i=0;i<fontoptions.length;i++)
{var opt=document.createElement('option');opt.value=fontoptions[i];opt.text=(fontoptions[i].length>10?(fontoptions[i].substr(0,10)+'...'):fontoptions[i]);sel.add(opt,is_ie?sel.options.length:null);}
sel.onchange=vB_Text_Editor_Events.prototype.formatting_select_onchange;break;}
case'fontsize':{for(var i=0;i<sizeoptions.length;i++)
{var opt=document.createElement('option');opt.value=sizeoptions[i];opt.text=sizeoptions[i];sel.add(opt,is_ie?sel.options.length:null);}
sel.onchange=vB_Text_Editor_Events.prototype.formatting_select_onchange;break;}
case'forecolor':{for(var i in coloroptions)
{var opt=document.createElement('option');opt.value=coloroptions[i];opt.text=PHP.trim((coloroptions[i].length>5?(coloroptions[i].substr(0,5)+'...'):coloroptions[i]).replace(new RegExp('([A-Z])','g'),' $1'));opt.style.backgroundColor=i;sel.add(opt,is_ie?sel.options.length:null);}
sel.onchange=vB_Text_Editor_Events.prototype.formatting_select_onchange;break;}
case'smilie':{for(var cat in smilieoptions)
{for(var smilieid in smilieoptions[cat])
{if(smilieid!='more')
{var opt=document.createElement('option');opt.value=smilieoptions[cat][smilieid][1];opt.text=smilieoptions[cat][smilieid][1];opt.smilieid=smilieid;opt.smiliepath=smilieoptions[cat][smilieid][0];opt.smilietitle=smilieoptions[cat][smilieid][2];sel.add(opt,is_ie?sel.options.length:null);}}}
sel.onchange=vB_Text_Editor_Events.prototype.smilieselect_onchange;break;}
case'attach':{sel.onmouseover=vB_Text_Editor_Events.prototype.attachselect_onmouseover;sel.onchange=vB_Text_Editor_Events.prototype.attachselect_onchange;break;}}
while(obj.hasChildNodes())
{obj.removeChild(obj.firstChild);}
this.buttons[obj.cmd]=obj.appendChild(sel);}
this.init_popup_menu=function(obj)
{if(this.disabled)
{return;}
switch(obj.cmd)
{case'fontname':{var menu=this.init_menu_container('fontname','200px','250px','auto');this.build_fontname_popup(obj,menu);break;}
case'fontsize':{var menu=this.init_menu_container('fontsize','auto','auto','visible');this.build_fontsize_popup(obj,menu);break;}
case'forecolor':{var menu=this.init_menu_container('forecolor','auto','auto','visible');this.build_forecolor_popup(obj,menu);break;}
case'smilie':{var menu=this.init_menu_container('smilie','175px','250px','auto');this.build_smilie_popup(obj,menu);break;}
case'attach':{if(typeof vB_Attachments!='undefined'&&vB_Attachments.has_attachments())
{var menu=this.init_menu_container('attach','auto','auto','visible');this.build_attachments_popup(menu,obj);}
else
{return fetch_object('manage_attachments_button').onclick();}}}
this.popups[obj.cmd]=this.controlbar.appendChild(menu);set_unselectable(menu);};this.init_menu_container=function(cmd,width,height,overflow)
{var menu=document.createElement('div');menu.id=this.editorid+'_popup_'+cmd+'_menu';menu.className='vbmenu_popup';menu.style.display='none';menu.style.cursor='default';menu.style.padding='3px';menu.style.width=width;menu.style.height=height;menu.style.overflow=overflow;return menu;}
this.build_fontname_popup=function(obj,menu)
{for(var n in fontoptions)
{var option=document.createElement('div');option.innerHTML='<font face="'+fontoptions[n]+'">'+fontoptions[n]+'</font>';option.className='ofont';option.style.textAlign='left';option.title=fontoptions[n];option.cmd=obj.cmd;option.controlkey=obj.id;option.editorid=this.editorid;option.onmouseover=option.onmouseout=option.onmouseup=option.onmousedown=vB_Text_Editor_Events.prototype.menuoption_onmouseevent;option.onclick=vB_Text_Editor_Events.prototype.formatting_option_onclick;menu.appendChild(option);}}
this.build_fontsize_popup=function(obj,menu)
{for(var n in sizeoptions)
{var option=document.createElement('div');option.innerHTML='<font size="'+sizeoptions[n]+'">'+sizeoptions[n]+'</font>';option.className='osize';option.style.textAlign='center';option.title=sizeoptions[n];option.cmd=obj.cmd;option.controlkey=obj.id;option.editorid=this.editorid;option.onmouseover=option.onmouseout=option.onmouseup=option.onmousedown=vB_Text_Editor_Events.prototype.menuoption_onmouseevent;option.onclick=vB_Text_Editor_Events.prototype.formatting_option_onclick;menu.appendChild(option);}}
this.build_forecolor_popup=function(obj,menu)
{var colorout=fetch_object(this.editorid+'_color_out');colorout.editorid=this.editorid;colorout.onclick=vB_Text_Editor_Events.prototype.colorout_onclick;var table=document.createElement('table');table.cellPadding=0;table.cellSpacing=0;table.border=0;var i=0;for(var hex in coloroptions)
{if(i%8==0)
{var tr=table.insertRow(-1);}
i++;var div=document.createElement('div');div.style.backgroundColor=coloroptions[hex];var option=tr.insertCell(-1);option.style.textAlign='center';option.className='ocolor';option.appendChild(div);option.cmd=obj.cmd;option.editorid=this.editorid;option.controlkey=obj.id;option.colorname=coloroptions[hex];option.id=this.editorid+'_color_'+coloroptions[hex];option.onmouseover=option.onmouseout=option.onmouseup=option.onmousedown=vB_Text_Editor_Events.prototype.menuoption_onmouseevent;option.onclick=vB_Text_Editor_Events.prototype.coloroption_onclick;}
menu.appendChild(table);}
this.build_smilie_popup=function(obj,menu)
{for(var cat in smilieoptions)
{var category=document.createElement('div');category.className='thead';category.innerHTML=cat;menu.appendChild(category);for(var smilieid in smilieoptions[cat])
{if(smilieid=='more')
{var option=document.createElement('div');option.className='thead';option.innerHTML=smilieoptions[cat][smilieid];option.style.cursor=pointer_cursor;option.editorid=this.editorid;option.controlkey=obj.id;option.onclick=vB_Text_Editor_Events.prototype.smiliemore_onclick;}
else
{var option=document.createElement('div');option.editorid=this.editorid;option.controlkey=obj.id;option.smilieid=smilieid;option.smilietext=smilieoptions[cat][smilieid][1];option.smilietitle=smilieoptions[cat][smilieid][2];option.className='osmilie';option.innerHTML='<img src="'+smilieoptions[cat][smilieid][0]+'" alt="'+smilieoptions[cat][smilieid][2]+'" /> '+smilieoptions[cat][smilieid][2];option.onmouseover=option.onmouseout=option.onmousedown=option.onmouseup=vB_Text_Editor_Events.prototype.menuoption_onmouseevent;option.onclick=vB_Text_Editor_Events.prototype.smilieoption_onclick;}
menu.appendChild(option);}}}
this.build_attachments_popup=function(menu,obj)
{if(this.popupmode)
{while(menu.hasChildNodes())
{menu.removeChild(menu.firstChild);}
var div=document.createElement('div');div.editorid=this.editorid;div.controlkey=obj.id;div.className='thead';div.style.cursor=pointer_cursor;div.innerHTML=fetch_object('manage_attachments_button').value;div.title=fetch_object('manage_attachments_button').title;div.onclick=vB_Text_Editor_Events.prototype.attachmanage_onclick;menu.appendChild(div);var attach_count=0;for(var id in vB_Attachments.attachments)
{var div=document.createElement('div');div.editorid=this.editorid;div.controlkey=obj.id;div.className='osmilie';div.attachmentid=id;div.innerHTML='<img src="'+vB_Attachments.attachments[id]['imgpath']+'" alt="" /> '+vB_Attachments.attachments[id]['filename'];div.onmouseover=div.onmouseout=div.onmousedown=div.onmouseup=vB_Text_Editor_Events.prototype.menuoption_onmouseevent;div.onclick=vB_Text_Editor_Events.prototype.attachoption_onclick;menu.appendChild(div);attach_count++;}
if(attach_count>1)
{var div=document.createElement('div');div.editorid=this.editorid
div.controlkey=obj.id;div.className='osmilie';div.style.fontWeight='bold';div.style.paddingLeft='25px';div.innerHTML=vbphrase['insert_all'];div.onmouseover=div.onmouseout=div.onmousedown=div.onmouseup=vB_Text_Editor_Events.prototype.menuoption_onmouseevent;div.onclick=vB_Text_Editor_Events.prototype.attachinsertall_onclick;menu.appendChild(div);}}
else
{while(menu.options.length>2)
{menu.remove(menu.options.length-1);}
for(var id in vB_Attachments.attachments)
{var opt=document.createElement('option');opt.value=id;opt.text=vB_Attachments.attachments[id]['filename'];menu.add(opt,is_ie?menu.options.length:null);}}
set_unselectable(menu);}
this.menu_context=function(obj,state)
{if(this.disabled)
{return;}
switch(obj.state)
{case true:{this.set_control_style(obj,'button','down');break;}
default:{switch(state)
{case'mouseout':{this.set_control_style(obj,'button','normal');break;}
case'mousedown':{this.set_control_style(obj,'popup','down');break;}
case'mouseup':case'mouseover':{this.set_control_style(obj,'button','hover');break;}}}}};this.button_context=function(obj,state,controltype)
{if(this.disabled)
{return;}
if(typeof controltype=='undefined')
{controltype='button';}
switch(obj.state)
{case true:{switch(state)
{case'mouseover':case'mousedown':case'mouseup':{this.set_control_style(obj,controltype,'down');break;}
case'mouseout':{this.set_control_style(obj,'button','selected');break;}}
break;}
default:{switch(state)
{case'mouseover':case'mouseup':{this.set_control_style(obj,controltype,'hover');break;}
case'mousedown':{this.set_control_style(obj,controltype,'down');break;}
case'mouseout':{this.set_control_style(obj,controltype,'normal');break;}}
break;}}};this.set_control_style=function(obj,controltype,mode)
{if(obj.mode!=mode)
{obj.mode=mode;istyle='pi_'+controltype+'_'+obj.mode;if(typeof istyles!='undefined'&&typeof istyles[istyle]!='undefined')
{obj.style.background=istyles[istyle][0];obj.style.color=istyles[istyle][1];if(controltype!='menu')
{obj.style.padding=istyles[istyle][2];}
obj.style.border=istyles[istyle][3];var tds=fetch_tags(obj,'td');for(var i=0;i<tds.length;i++)
{switch(tds[i].className)
{case'popup_feedback':{tds[i].style.borderRight=(mode=='normal'?istyles['pi_menu_normal'][3]:istyles[istyle][3]);}
break;case'popup_pickbutton':{tds[i].style.borderColor=(mode=='normal'?istyles['pi_menu_normal'][0]:istyles[istyle][0]);}
break;case'alt_pickbutton':{if(obj.state)
{tds[i].style.paddingLeft=istyles['pi_button_normal'][2];tds[i].style.borderLeft=istyles['pi_button_normal'][3];}
else
{tds[i].style.paddingLeft=istyles[istyle][2];tds[i].style.borderLeft=istyles[istyle][3];}}}}}}};this.format=function(e,cmd,arg)
{e=do_an_e(e);if(this.disabled)
{return false;}
if(cmd!='redo')
{this.history.add_snapshot(this.get_editor_contents());}
if(cmd=='switchmode')
{switch_editor_mode(this.editorid);return;}
else if(cmd.substr(0,6)=='resize')
{this.resize_editor(parseInt(cmd.substr(9),10)*(parseInt(cmd.substr(7,1),10)=='1'?1:-1));return;}
this.check_focus();if(cmd.substr(0,4)=='wrap')
{var ret=this.wrap_tags(cmd.substr(6),(cmd.substr(4,1)=='1'?true:false));}
else if(this[cmd])
{var ret=this[cmd](e);}
else
{try
{var ret=this.apply_format(cmd,false,(typeof arg=='undefined'?true:arg));}
catch(e)
{this.handle_error(cmd,e);var ret=false;}}
if(cmd!='undo')
{this.history.add_snapshot(this.get_editor_contents());}
this.set_context(cmd);this.check_focus();return ret;};this.insertimage=function(e,img)
{if(typeof img=='undefined')
{img=this.show_prompt(vbphrase['enter_image_url'],'http://');}
if(img=this.verify_prompt(img))
{return this.apply_format('insertimage',false,img);}
else
{return false;}};this.wrap_tags=function(tagname,useoption,selection)
{tagname=tagname.toUpperCase();switch(tagname)
{case'CODE':case'HTML':case'PHP':{this.apply_format('removeformat');}
break;}
if(typeof selection=='undefined')
{selection=this.get_selection();if(selection===false)
{selection='';}
else
{selection=new String(selection);}}
if(useoption===true)
{var option=this.show_prompt(construct_phrase(vbphrase['enter_tag_option'],('['+tagname+']')),'');if(option=this.verify_prompt(option))
{var opentag='['+tagname+'="'+option+'"'+']';}
else
{return false;}}
else if(useoption!==false)
{var opentag='['+tagname+'="'+useoption+'"'+']';}
else
{var opentag='['+tagname+']';}
var closetag='[/'+tagname+']';var text=opentag+selection+closetag;this.insert_text(text,opentag.vBlength(),closetag.vBlength());return false;};this.spelling=function()
{if(is_ie)
{try
{eval("new A"+"ctiv"+"eX"+"Ob"+"ject('ieSpell."+"ieSpellExt"+"ension').CheckD"+"ocumentNode(this.spellobj);");}
catch(e)
{if(e.number==-2146827859&&confirm(vbphrase['iespell_not_installed']))
{window.open('http://www.iespell.com/download.ph'+'p');}}}
else if(is_moz)
{}};this.handle_error=function(cmd,e)
{};this.show_prompt=function(dialogtxt,defaultval)
{if(is_ie7)
{var returnvalue=window.showModalDialog("clientscript/ieprompt.html?",{value:defaultval,label:dialogtxt,dir:document.dir,title:document.title},"dialogWidth:320px; dialogHeight:150px; dialogTop:"+(parseInt(window.screenTop)+parseInt(window.event.clientY)+parseInt(document.body.scrollTop)-100)+"px; dialogLeft:"+(parseInt(window.screenLeft)+parseInt(window.event.clientX)+parseInt(document.body.scrollLeft)-160)+"px; resizable: No;");}
else
{var returnvalue=prompt(dialogtxt,defaultval);}
if(typeof(returnvalue)=="undefined")
{return false;}
else if(returnvalue==false||returnvalue==null)
{return returnvalue;}
else
{return PHP.trim(new String(returnvalue));}};this.close_prompt=function()
{if(this.prompt_popup)
{document.getElementById("vB_Editor_001").removeChild(this.prompt_popup);this.prompt_popup=null;}
this.check_focus();}
this.verify_prompt=function(str)
{switch(str)
{case'http://':case'null':case'undefined':case'false':case'':case null:case false:return false;default:return str;}};this.open_smilie_window=function(width,height)
{smilie_window=openWindow('misc.php?'+SESSIONURL+'do=getsmilies&editorid='+this.editorid,width,height,'smilie_window');window.onunload=vB_Text_Editor_Events.prototype.smiliewindow_onunload;}
this.resize_editor=function(change)
{var newheight=parseInt(this.editbox.style.height,10)+change;if(newheight>=100)
{this.editbox.style.height=newheight+'px';if(change%99!=0)
{set_cookie('editor_height',newheight);}}};this.destroy_popup=function(popupname)
{this.popups[popupname].parentNode.removeChild(this.popups[popupname]);this.popups[popupname]=null;}
this.destroy=function()
{for(var i in this.buttons)
{this.set_control_style(this.buttons[i],'button','normal');}
for(var menu in this.popups)
{this.destroy_popup(menu);}
if(this.fontoptions)
{for(var i in this.fontoptions)
{if(i!='')
{this.fontoptions[i].parentNode.removeChild(this.fontoptions[i]);}}
this.fontoptions[''].style.display='';}
if(this.sizeoptions)
{for(var i in this.sizeoptions)
{if(i!='')
{this.sizeoptions[i].parentNode.removeChild(this.sizeoptions[i]);}}
this.sizeoptions[''].style.display='';}};this.collapse_selection_end=function()
{if(this.editdoc.selection)
{var range=this.editdoc.selection.createRange();eval("range."+"move"+"('character', -1);");range.collapse(false);range.select();}
else if(document.selection&&document.selection.createRange)
{var range=document.selection.createRange();range.collapse(false);range.select();}
else if(typeof(this.editdoc.selectionStart)!='undefined')
{var opn=this.editdoc.selectionStart+0;var sel_text=this.editdoc.value.substr(this.editdoc.selectionStart,this.editdoc.selectionEnd-this.editdoc.selectionStart);this.editdoc.selectionStart=this.editdoc.selectionStart+sel_text.vBlength();}
else if(window.getSelection)
{}}
if(this.wysiwyg_mode)
{this.disable_editor=function(text)
{if(!this.disabled)
{this.disabled=true;var hider=fetch_object(this.editorid+'_hider');if(hider)
{hider.parentNode.removeChild(hider);}
var div=document.createElement('div');div.id=this.editorid+'_hider';div.className='wysiwyg';div.style.border='2px inset';div.style.width=this.editbox.style.width;div.style.height=this.editbox.style.height;var childdiv=document.createElement('div');childdiv.style.margin='8px';childdiv.innerHTML=text;div.appendChild(childdiv);this.editbox.parentNode.appendChild(div);this.editbox.style.width='0px';this.editbox.style.height='0px';this.editbox.style.border='none';}};this.enable_editor=function(text)
{if(typeof text!='undefined')
{this.set_editor_contents(text);}
var hider=fetch_object(this.editorid+'_hider');if(hider)
{hider.parentNode.removeChild(hider);}
this.disabled=false;};this.write_editor_contents=function(text,doinit)
{if(text=='')
{if(is_ie)
{text='<p></p>';}
else if(is_moz)
{text='<br />';}}
if(this.editdoc&&this.editdoc.initialized)
{this.editdoc.body.innerHTML=text;}
else
{if(doinit){this.editdoc.designMode='on';}
this.editdoc=this.editwin.document;this.editdoc.open('text/html','replace');this.editdoc.write(text);this.editdoc.close();if(doinit){this.editdoc.body.contentEditable=true;}
this.editdoc.body.spellcheck=true;this.editdoc.initialized=true;this.set_editor_style();}
this.set_direction();}
this.set_editor_contents=function(initial_text)
{if(fetch_object(this.editorid+'_iframe'))
{this.editbox=fetch_object(this.editorid+'_iframe');}
else
{var iframe=document.createElement('iframe');if(is_ie&&window.location.protocol=='https:')
{iframe.src='clientscript/index.html';}
this.editbox=this.textobj.parentNode.appendChild(iframe);this.editbox.id=this.editorid+'_iframe';this.editbox.tabIndex=1;}
if(!is_ie)
{this.editbox.style.border='2px inset';}
this.editbox.style.width=this.textobj.style.width;this.editbox.style.height=this.textobj.style.height;this.textobj.style.display='none';this.editwin=this.editbox.contentWindow;this.editdoc=this.editwin.document;this.write_editor_contents((typeof initial_text=='undefined'?this.textobj.value:initial_text),true);if(this.editdoc.dir=='rtl')
{}
this.spellobj=this.editdoc.body;this.editdoc.editorid=this.editorid;this.editwin.editorid=this.editorid;};this.set_direction=function()
{this.editdoc.dir=this.textobj.dir;};this.set_editor_style=function()
{if(document.styleSheets['vbulletin_css'])
{this.editdoc.createStyleSheet().cssText=document.styleSheets['vbulletin_css'].cssText+' p { margin: 0px; }';this.editdoc.body.className='wysiwyg';}};this.set_editor_functions=function()
{this.editdoc.onmouseup=vB_Text_Editor_Events.prototype.editdoc_onmouseup;this.editdoc.onkeyup=vB_Text_Editor_Events.prototype.editdoc_onkeyup;if(this.editdoc.attachEvent)
{this.editdoc.body.attachEvent("onresizestart",vB_Text_Editor_Events.prototype.editdoc_onresizestart);}
this.editwin.onfocus=vB_Text_Editor_Events.prototype.editwin_onfocus;this.editwin.onblur=vB_Text_Editor_Events.prototype.editwin_onblur;};this.set_context=function(cmd)
{for(var i in contextcontrols)
{var obj=fetch_object(this.editorid+'_cmd_'+contextcontrols[i]);if(obj!=null)
{state=this.editdoc.queryCommandState(contextcontrols[i]);if(obj.state!=state)
{obj.state=state;this.button_context(obj,(obj.cmd==cmd?'mouseover':'mouseout'));}}}
this.set_font_context();this.set_size_context();this.set_color_context();};this.set_font_context=function(fontstate)
{if(this.buttons['fontname'])
{if(typeof fontstate=='undefined')
{fontstate=this.editdoc.queryCommandValue('fontname');}
switch(fontstate)
{case'':{if(!is_ie&&window.getComputedStyle)
{fontstate=this.editdoc.body.style.fontFamily;}}
break;case null:{fontstate='';}
break;}
if(fontstate!=this.fontstate)
{this.fontstate=fontstate;var thingy=PHP.ucfirst(this.fontstate,',');if(this.popupmode)
{for(var i in this.fontoptions)
{this.fontoptions[i].style.display=(i==thingy?'':'none');}}
else
{for(var i=0;i<this.buttons['fontname'].options.length;i++)
{if(this.buttons['fontname'].options[i].value==thingy)
{this.buttons['fontname'].selectedIndex=i;break;}}}}}};this.set_size_context=function(sizestate)
{if(this.buttons['fontsize'])
{if(typeof sizestate=='undefined')
{sizestate=this.editdoc.queryCommandValue('fontsize');}
switch(sizestate)
{case null:case'':{if(is_moz)
{sizestate=this.translate_fontsize(this.editdoc.body.style.fontSize);}}
break;}
if(sizestate!=this.sizestate)
{this.sizestate=sizestate;if(this.popupmode)
{for(var i in this.sizeoptions)
{this.sizeoptions[i].style.display=(i==this.sizestate?'':'none');}}
else
{for(var i=0;i<this.buttons['fontsize'].options.length;i++)
{if(this.buttons['fontsize'].options[i].value==this.sizestate)
{this.buttons['fontsize'].selectedIndex=i;break;}}}}}};this.set_color_context=function(colorstate)
{if(this.buttons['forecolor'])
{if(typeof colorstate=='undefined')
{colorstate=this.editdoc.queryCommandValue('forecolor');}
if(colorstate!=this.colorstate)
{if(this.popupmode)
{var obj=fetch_object(this.editorid+'_color_'+this.translate_color_commandvalue(this.colorstate));if(obj!=null)
{obj.state=false;this.button_context(obj,'mouseout','menu');}
this.colorstate=colorstate;elmid=this.editorid+'_color_'+this.translate_color_commandvalue(colorstate);var obj=fetch_object(elmid);if(obj!=null)
{obj.state=true;this.button_context(obj,'mouseout','menu');}}
else
{this.colorstate=colorstate;colorstate=this.translate_color_commandvalue(this.colorstate);for(var i=0;i<this.buttons['forecolor'].options.length;i++)
{if(this.buttons['forecolor'].options[i].value==colorstate)
{this.buttons['forecolor'].selectedIndex=i;break;}}}}}};this.translate_color_commandvalue=function(forecolor)
{return this.translate_silly_hex((forecolor&0xFF).toString(16),((forecolor>>8)&0xFF).toString(16),((forecolor>>16)&0xFF).toString(16));};this.translate_silly_hex=function(r,g,b)
{return coloroptions['#'+(PHP.str_pad(r,2,0)+PHP.str_pad(g,2,0)+PHP.str_pad(b,2,0)).toUpperCase()];};this.apply_format=function(cmd,dialog,argument)
{this.editdoc.execCommand(cmd,(typeof dialog=='undefined'?false:dialog),(typeof argument=='undefined'?true:argument));return false;};this.createlink=function(e,url)
{return this.apply_format('createlink',is_ie,(typeof url=='undefined'?true:url));};this.email=function(e,email)
{if(typeof email=='undefined')
{email=this.show_prompt(vbphrase['enter_email_link'],'');}
email=this.verify_prompt(email);if(email===false)
{return this.apply_format('unlink');}
else
{var selection=this.get_selection();return this.insert_text('<a href="mailto:'+email+'">'+(selection?selection:email)+'</a>',(selection?true:false));}};this.insert_smilie=function(e,smilietext,smiliepath,smilieid)
{this.check_focus();return this.insert_text('<img src="'+smiliepath+'" border="0" alt="0" smilieid="'+smilieid+'" />',false);};this.get_editor_contents=function()
{return this.editdoc.body.innerHTML;};this.get_selection=function()
{var range=this.editdoc.selection.createRange();if(range.htmlText&&range.text)
{return range.htmlText;}
else
{var do_not_steal_this_code_html='';for(var i=0;i<range.length;i++)
{do_not_steal_this_code_html+=range.item(i).outerHTML;}
return do_not_steal_this_code_html;}};this.insert_text=function(text,movestart,moveend)
{this.check_focus();if(typeof(this.editdoc.selection)!='undefined'&&this.editdoc.selection.type!='Text'&&this.editdoc.selection.type!='None')
{movestart=false;this.editdoc.selection.clear();}
var sel=this.editdoc.selection.createRange();sel.pasteHTML(text);if(text.indexOf('\n')==-1)
{if(movestart===false)
{}
else if(typeof movestart!='undefined')
{sel.moveStart('character',-text.vBlength()+movestart);sel.moveEnd('character',-moveend);}
else
{sel.moveStart('character',-text.vBlength());}
sel.select();}};this.prepare_submit=function(subjecttext,minchars)
{this.textobj.value=this.get_editor_contents();var returnvalue=validatemessage(stripcode(this.textobj.value,true),subjecttext,minchars);if(returnvalue)
{return returnvalue;}
else if(this.captcha!=null&&this.captcha.failed)
{return false;}
else
{this.check_focus();return false;}}
if(is_moz)
{this._set_editor_contents=this.set_editor_contents;this.set_editor_contents=function(initial_text)
{this._set_editor_contents(initial_text);this.editdoc.addEventListener('keypress',vB_Text_Editor_Events.prototype.editdoc_onkeypress,true);};this.set_editor_style=function()
{for(var ss=0;ss<document.styleSheets.length;ss++)
{try
{if(document.styleSheets[ss].cssRules.length<=0)
{continue;}}
catch(e)
{continue;}
for(var i=0;i<document.styleSheets[ss].cssRules.length;i++)
{if(document.styleSheets[ss].cssRules[i].selectorText=='.wysiwyg')
{newss=this.editdoc.createElement('style');newss.type='text/css';newss.innerHTML=document.styleSheets[ss].cssRules[i].cssText+' p { margin: 0px; }';this.editdoc.documentElement.childNodes[0].appendChild(newss);this.editdoc.body.className='wysiwyg';this.editdoc.body.style.fontFamily=document.styleSheets[ss].cssRules[i].style.fontFamily;this.editdoc.body.style.fontSize=document.styleSheets[ss].cssRules[i].style.fontSize;return false;}}}};this.translate_color_commandvalue=function(forecolor)
{if(forecolor==''||forecolor==null)
{forecolor=window.getComputedStyle(this.editdoc.body,null).getPropertyValue('color');}
if(forecolor.toLowerCase().indexOf('rgb')==0)
{var matches=forecolor.match(/^rgb\s*\(([0-9]+),\s*([0-9]+),\s*([0-9]+)\)$/);if(matches)
{return this.translate_silly_hex((matches[1]&0xFF).toString(16),(matches[2]&0xFF).toString(16),(matches[3]&0xFF).toString(16));}
else
{return this.translate_color_commandvalue(null);}}
else
{return forecolor;}};this.translate_fontsize=function(csssize)
{switch(csssize)
{case'7.5pt':case'10px':return 1;case'10pt':return 2;case'12pt':return 3;case'14pt':return 4;case'18pt':return 5;case'24pt':return 6;case'36pt':return 7;default:return'';}}
this._apply_format=this.apply_format;this.apply_format=function(cmd,dialog,arg)
{this.editdoc.execCommand('useCSS',false,true);return this._apply_format(cmd,dialog,arg);};this._createlink=this.createlink;this.createlink=function(e,url)
{if(typeof url=='undefined')
{url=this.show_prompt(vbphrase['enter_link_url'],'http://');}
if((url=this.verify_prompt(url))!==false)
{if(this.get_selection())
{this.apply_format('unlink');this._createlink(e,url);}
else
{this.insert_text('<a href="'+url+'">'+url+'</a>');}}
return true;};this.insert_smilie=function(e,smilietext,smiliepath,smilieid)
{this.check_focus();try
{this.apply_format('InsertImage',false,smiliepath);var smilies=fetch_tags(this.editdoc.body,'img');for(var i=0;i<smilies.length;i++)
{if(smilies[i].src==smiliepath)
{if(smilies[i].getAttribute('smilieid')<1)
{smilies[i].setAttribute('smilieid',smilieid);smilies[i].setAttribute('border',"0");}}}}
catch(e)
{}};this.get_selection=function()
{selection=this.editwin.getSelection();this.check_focus();range=selection?selection.getRangeAt(0):this.editdoc.createRange();return this.read_nodes(range.cloneContents(),false);};this.insert_text=function(str)
{this.editdoc.execCommand('insertHTML',false,str);};this.set_editor_functions=function()
{this.editdoc.addEventListener('mouseup',vB_Text_Editor_Events.prototype.editdoc_onmouseup,true);this.editdoc.addEventListener('keyup',vB_Text_Editor_Events.prototype.editdoc_onkeyup,true);this.editwin.addEventListener('focus',vB_Text_Editor_Events.prototype.editwin_onfocus,true);this.editwin.addEventListener('blur',vB_Text_Editor_Events.prototype.editwin_onblur,true);};this.add_range=function(node)
{this.check_focus();var sel=this.editwin.getSelection();var range=this.editdoc.createRange();range.selectNodeContents(node);sel.removeAllRanges();sel.addRange(range);};this.read_nodes=function(root,toptag)
{var html="";var moz_check=/_moz/i;switch(root.nodeType)
{case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:{var closed;if(toptag)
{closed=!root.hasChildNodes();html='<'+root.tagName.toLowerCase();var attr=root.attributes;for(var i=0;i<attr.length;++i)
{var a=attr.item(i);if(!a.specified||a.name.match(moz_check)||a.value.match(moz_check))
{continue;}
html+=" "+a.name.toLowerCase()+'="'+a.value+'"';}
html+=closed?" />":">";}
for(var i=root.firstChild;i;i=i.nextSibling)
{html+=this.read_nodes(i,true);}
if(toptag&&!closed)
{html+="</"+root.tagName.toLowerCase()+">";}}
break;case Node.TEXT_NODE:{html=PHP.htmlspecialchars(root.data);}
break;}
return html;};this.insert_node_at_selection=function(text)
{this.check_focus();var sel=this.editwin.getSelection();var range=sel?sel.getRangeAt(0):this.editdoc.createRange();sel.removeAllRanges();range.deleteContents();var node=range.startContainer;var pos=range.startOffset;switch(node.nodeType)
{case Node.ELEMENT_NODE:{if(text.nodeType==Node.DOCUMENT_FRAGMENT_NODE)
{selNode=text.firstChild;}
else
{selNode=text;}
node.insertBefore(text,node.childNodes[pos]);this.add_range(selNode);}
break;case Node.TEXT_NODE:{if(text.nodeType==Node.TEXT_NODE)
{var text_length=pos+text.length;node.insertData(pos,text.data);range=this.editdoc.createRange();range.setEnd(node,text_length);range.setStart(node,text_length);sel.addRange(range);}
else
{node=node.splitText(pos);var selNode;if(text.nodeType==Node.DOCUMENT_FRAGMENT_NODE)
{selNode=text.firstChild;}
else
{selNode=text;}
node.parentNode.insertBefore(text,node);this.add_range(selNode);}}
break;}};}
else if(is_opera)
{this.set_editor_style=function()
{for(var ss=0;ss<document.styleSheets.length;ss++)
{try
{if(document.styleSheets[ss].cssRules.length<=0)
{continue;}}
catch(e)
{continue;}
for(var i=0;i<document.styleSheets[ss].cssRules.length;i++)
{if(document.styleSheets[ss].cssRules[i].selectorText=='.wysiwyg')
{newss=this.editdoc.createElement('style');newss.type='text/css';newss.innerHTML=document.styleSheets[ss].cssRules[i].cssText+' p { margin: 0px; }';this.editdoc.documentElement.childNodes[0].appendChild(newss);this.editdoc.body.className='wysiwyg';this.editdoc.body.style.fontFamily=document.styleSheets[ss].cssRules[i].style.fontFamily;this.editdoc.body.style.fontSize=document.styleSheets[ss].cssRules[i].style.fontSize;return false;}}}};this._createlink=this.createlink;this.createlink=function(e,url)
{if(typeof url=='undefined')
{url=this.show_prompt(vbphrase['enter_link_url'],'http://');}
if((url=this.verify_prompt(url))!==false)
{if(this.get_selection())
{this.apply_format('unlink');this._createlink(e,url);}
else
{this.insert_text('<a href="'+url+'">'+url+'</a>');}}
return true;};this.insert_smilie=function(e,smilietext,smiliepath,smilieid)
{this.check_focus();try
{this.apply_format('InsertImage',false,smiliepath);var smilies=fetch_tags(this.editdoc.body,'img');for(var i=0;i<smilies.length;i++)
{if(smilies[i].src==smiliepath)
{if(smilies[i].getAttribute('smilieid')<1)
{smilies[i].setAttribute('smilieid',smilieid);smilies[i].setAttribute('border',"0");}}}}
catch(e)
{}};this.get_selection=function()
{selection=this.editwin.getSelection();this.check_focus();range=selection?selection.getRangeAt(0):this.editdoc.createRange();var lsserializer=document.implementation.createLSSerializer();return lsserializer.writeToString(range.cloneContents());};this.insert_text=function(str)
{this.editdoc.execCommand('insertHTML',false,str);};}}
else
{this.disable_editor=function(text)
{if(!this.disabled)
{this.disabled=true;if(typeof text!='undefined')
{this.editbox.value=text;}
this.editbox.disabled=true;}};this.enable_editor=function(text)
{if(typeof text!='undefined')
{this.editbox.value=text;}
this.editbox.disabled=false;this.disabled=false;};this.write_editor_contents=function(text)
{this.textobj.value=text;}
this.set_editor_contents=function(initial_text)
{var iframe=this.textobj.parentNode.getElementsByTagName('iframe')[0];if(iframe)
{this.textobj.style.display='';this.textobj.style.width=iframe.style.width;this.textobj.style.height=iframe.style.height;iframe.style.width='0px';iframe.style.height='0px';iframe.style.border='none';}
this.editwin=this.textobj;this.editdoc=this.textobj;this.editbox=this.textobj;this.spellobj=this.textobj;if(typeof initial_text!='undefined')
{this.write_editor_contents(initial_text);}
this.editdoc.editorid=this.editorid;this.editwin.editorid=this.editorid;this.history.add_snapshot(this.get_editor_contents());};this.set_editor_style=function()
{};this.set_editor_functions=function()
{if(this.editdoc.addEventListener)
{this.editdoc.addEventListener('keypress',vB_Text_Editor_Events.prototype.editdoc_onkeypress,false);}
else if(is_ie)
{this.editdoc.onkeydown=vB_Text_Editor_Events.prototype.editdoc_onkeypress;}
this.editwin.onfocus=vB_Text_Editor_Events.prototype.editwin_onfocus;this.editwin.onblur=vB_Text_Editor_Events.prototype.editwin_onblur;};this.set_context=function()
{};this.apply_format=function(cmd,dialog,argument)
{switch(cmd)
{case'bold':case'italic':case'underline':{this.wrap_tags(cmd.substr(0,1),false);return;}
case'justifyleft':case'justifycenter':case'justifyright':{this.wrap_tags(cmd.substr(7),false);return;}
case'indent':{this.wrap_tags(cmd,false);return;}
case'fontname':{this.wrap_tags('font',argument);return;}
case'fontsize':{this.wrap_tags('size',argument);return;}
case'forecolor':{this.wrap_tags('color',argument);return;}
case'createlink':{var sel=this.get_selection();if(sel)
{this.wrap_tags('url',argument);}
else
{this.wrap_tags('url',argument,argument);}
return;}
case'insertimage':{this.wrap_tags('img',false,argument);return;}
case'removeformat':return;}};this.undo=function()
{this.history.add_snapshot(this.get_editor_contents());this.history.move_cursor(-1);if((str=this.history.get_snapshot())!==false)
{this.editdoc.value=str;}};this.redo=function()
{this.history.move_cursor(1);if((str=this.history.get_snapshot())!==false)
{this.editdoc.value=str;}};this.strip_simple=function(tag,str,iterations)
{var opentag='['+tag+']';var closetag='[/'+tag+']';if(typeof iterations=='undefined')
{iterations=-1;}
while((startindex=PHP.stripos(str,opentag))!==false&&iterations!=0)
{iterations--;if((stopindex=PHP.stripos(str,closetag))!==false)
{var text=str.substr(startindex+opentag.length,stopindex-startindex-opentag.length);str=str.substr(0,startindex)+text+str.substr(stopindex+closetag.length);}
else
{break;}}
return str;};this.strip_complex=function(tag,str,iterations)
{var opentag='['+tag+'=';var closetag='[/'+tag+']';if(typeof iterations=='undefined')
{iterations=-1;}
while((startindex=PHP.stripos(str,opentag))!==false&&iterations!=0)
{iterations--;if((stopindex=PHP.stripos(str,closetag))!==false)
{var openend=PHP.stripos(str,']',startindex);if(openend!==false&&openend>startindex&&openend<stopindex)
{var text=str.substr(openend+1,stopindex-openend-1);str=str.substr(0,startindex)+text+str.substr(stopindex+closetag.length);}
else
{break;}}
else
{break;}}
return str;};this.removeformat=function(e)
{var simplestrip=new Array('b','i','u');var complexstrip=new Array('font','color','size');var str=this.get_selection();if(str===false)
{return;}
for(var tag in simplestrip)
{str=this.strip_simple(simplestrip[tag],str);}
for(var tag in complexstrip)
{str=this.strip_complex(complexstrip[tag],str);}
this.insert_text(str);};this.createlink=function(e,url)
{this.prompt_link('url',url,vbphrase['enter_link_url'],'http://');};this.unlink=function(e)
{var sel=this.get_selection();sel=this.strip_simple('url',sel);sel=this.strip_complex('url',sel);this.insert_text(sel);};this.email=function(e,email)
{this.prompt_link('email',email,vbphrase['enter_email_link'],'');};this.insert_smilie=function(e,smilietext)
{this.check_focus();return this.insert_text(smilietext,smilietext.length,0);};this.prompt_link=function(tagname,value,phrase,iprompt)
{if(typeof value=='undefined')
{value=this.show_prompt(phrase,iprompt);}
if((value=this.verify_prompt(value))!==false)
{if(this.get_selection())
{this.apply_format('unlink');this.wrap_tags(tagname,value);}
else
{this.wrap_tags(tagname,value,value);}}
return true;};this.insertorderedlist=function(e)
{this.insertlist(vbphrase['insert_ordered_list'],'1');};this.insertunorderedlist=function(e)
{this.insertlist(vbphrase['insert_unordered_list'],'');};this.insertlist=function(phrase,listtype)
{var opentag='[LIST'+(listtype?('='+listtype):'')+']\n';var closetag='[/LIST]';if(txt=this.get_selection())
{var regex=new RegExp('([\r\n]+|^[\r\n]*)(?!\\[\\*\\]|\\[\\/?list)(?=[^\r\n])','gi');txt=opentag+PHP.trim(txt).replace(regex,'$1[*]')+'\n'+closetag;this.insert_text(txt,txt.vBlength(),0);}
else
{this.insert_text(opentag+closetag,opentag.length,closetag.length);if(is_ie7)
{var listvalue=window.showModalDialog("clientscript/ieprompt.html?",{'value':'','label':vbphrase['enter_list_item'],'dir':document.dir,'title':document.title,'listtype':listtype},"dialogWidth:320px; dialogHeight:232px; dialogTop:"+(parseInt(window.screenTop)+parseInt(window.event.clientY)+parseInt(document.body.scrollTop)-100)+"px; dialogLeft:"+(parseInt(window.screenLeft)+parseInt(window.event.clientX)+parseInt(document.body.scrollLeft)-160)+"px; resizable: No;");if(this.verify_prompt(listvalue))
{this.insert_text(listvalue,listvalue.vBlength(),0);}}
else
{while(listvalue=this.show_prompt(vbphrase['enter_list_item'],''))
{listvalue='[*]'+listvalue+'\n';this.insert_text(listvalue,listvalue.vBlength(),0);}}}};this.outdent=function(e)
{var sel=this.get_selection();sel=this.strip_simple('indent',sel,1);this.insert_text(sel);};this.get_editor_contents=function()
{return this.editdoc.value;};this.get_selection=function()
{if(typeof(this.editdoc.selectionStart)!='undefined')
{return this.editdoc.value.substr(this.editdoc.selectionStart,this.editdoc.selectionEnd-this.editdoc.selectionStart);}
else if(document.selection&&document.selection.createRange)
{return document.selection.createRange().text;}
else if(window.getSelection)
{return window.getSelection()+'';}
else
{return false;}};this.insert_text=function(text,movestart,moveend)
{this.check_focus();if(typeof(this.editdoc.selectionStart)!='undefined')
{var opn=this.editdoc.selectionStart+0;var scrollpos=this.editdoc.scrollTop;this.editdoc.value=this.editdoc.value.substr(0,this.editdoc.selectionStart)+text+this.editdoc.value.substr(this.editdoc.selectionEnd);if(movestart===false)
{}
else if(typeof movestart!='undefined')
{this.editdoc.selectionStart=opn+movestart;this.editdoc.selectionEnd=opn+text.vBlength()-moveend;}
else
{this.editdoc.selectionStart=opn;this.editdoc.selectionEnd=opn+text.vBlength();}
this.editdoc.scrollTop=scrollpos;}
else if(document.selection&&document.selection.createRange)
{var sel=document.selection.createRange();sel.text=text.replace(/\r?\n/g,'\r\n');if(movestart===false)
{}
else if(typeof movestart!='undefined')
{sel.moveStart('character',-text.vBlength()+movestart);sel.moveEnd('character',-moveend);}
else
{sel.moveStart('character',-text.vBlength());}
sel.select();}
else
{this.editdoc.value+=text;}};this.prepare_submit=function(subjecttext,minchars)
{var returnvalue=validatemessage(this.textobj.value,subjecttext,minchars);if(returnvalue)
{return returnvalue;}
else if(this.captcha!=null&&this.captcha.failed)
{return returnvalue;}
else
{this.check_focus();return false;}}
if(is_saf||(is_opera&&(!opera.version||opera.version()<8)))
{this.insertlist=function(phrase,listtype)
{var opentag='[LIST'+(listtype?('='+listtype):'')+']\n';var closetag='[/LIST]';if(txt=this.get_selection())
{var regex=new RegExp('([\r\n]+|^[\r\n]*)(?!\\[\\*\\]|\\[\\/?list)(?=[^\r\n])','gi');txt=opentag+PHP.trim(txt).replace(regex,'$1[*]')+'\n'+closetag;this.insert_text(txt,txt.vBlength(),0);}
else
{this.insert_text(opentag,opentag.length,0);while(listvalue=prompt(vbphrase['enter_list_item'],''))
{listvalue='[*]'+listvalue+'\n';this.insert_text(listvalue,listvalue.vBlength(),0);}
this.insert_text(closetag,closetag.length,0);}};}}
this.init();}
function vB_Text_Editor_Events()
{}
vB_Text_Editor_Events.prototype.smilie_onclick=function(e)
{vB_Editor[this.editorid].insert_smilie(e,this.alt,this.src,this.id.substr(this.id.lastIndexOf('_')+1));if(typeof smilie_window!='undefined'&&!smilie_window.closed)
{smilie_window.focus();}
return false;};vB_Text_Editor_Events.prototype.command_button_onmouseevent=function(e)
{e=do_an_e(e);if(e.type=='click')
{vB_Editor[this.editorid].format(e,this.cmd,false,true);}
vB_Editor[this.editorid].button_context(this,e.type);};vB_Text_Editor_Events.prototype.popup_button_onmouseevent=function(e)
{e=do_an_e(e);if(e.type=='click')
{this._onclick(e);vB_Editor[this.editorid].menu_context(this,'mouseover');}
else
{vB_Editor[this.editorid].menu_context(this,e.type);}};vB_Text_Editor_Events.prototype.popup_button_show=function(obj,instant)
{if(typeof vB_Editor[obj.editorid].popups[obj.cmd]=='undefined'||vB_Editor[obj.editorid].popups[obj.cmd]==null)
{vB_Editor[obj.editorid].init_popup_menu(obj);}
else if(obj.cmd=='attach'&&(typeof vB_Attachments=='undefined'||!vB_Attachments.has_attachments()))
{return fetch_object('manage_attachments_button').onclick();}
this._show(obj,instant);};vB_Text_Editor_Events.prototype.formatting_select_onchange=function(e)
{var arg=this.options[this.selectedIndex].value;if(arg!='')
{vB_Editor[this.editorid].format(e,this.cmd,arg);}
this.selectedIndex=0;};vB_Text_Editor_Events.prototype.smilieselect_onchange=function(e)
{if(this.options[this.selectedIndex].value!='')
{vB_Editor[this.editorid].insert_smilie(e,this.options[this.selectedIndex].value,this.options[this.selectedIndex].smiliepath,this.options[this.selectedIndex].smilieid);}
this.selectedIndex=0;};vB_Text_Editor_Events.prototype.attachselect_onchange=function(e)
{var arg=this.options[this.selectedIndex].value;if(arg!='')
{vB_Editor[this.editorid].wrap_tags('attach',false,arg);}
this.selectedIndex=0;};vB_Text_Editor_Events.prototype.attachselect_onmouseover=function(e)
{if(this.options.length<=2)
{vB_Editor[this.editorid].build_attachments_popup(this);return true;}};vB_Text_Editor_Events.prototype.menuoption_onmouseevent=function(e)
{e=do_an_e(e);vB_Editor[this.editorid].button_context(this,e.type,'menu');};vB_Text_Editor_Events.prototype.formatting_option_onclick=function(e)
{vB_Editor[this.editorid].format(e,this.cmd,this.firstChild.innerHTML);vBmenu.hide();};vB_Text_Editor_Events.prototype.coloroption_onclick=function(e)
{fetch_object(this.editorid+'_color_bar').style.backgroundColor=this.colorname;vB_Editor[this.editorid].format(e,this.cmd,this.colorname);vBmenu.hide();};vB_Text_Editor_Events.prototype.colorout_onclick=function(e)
{e=do_an_e(e);vB_Editor[this.editorid].format(e,'forecolor',fetch_object(this.editorid+'_color_bar').style.backgroundColor);return false;};vB_Text_Editor_Events.prototype.smilieoption_onclick=function(e)
{vB_Editor[this.editorid].button_context(this,'mouseout','menu');vB_Editor[this.editorid].insert_smilie(e,this.smilietext,fetch_tags(this,'img')[0].src,this.smilieid);vBmenu.hide();};vB_Text_Editor_Events.prototype.smiliemore_onclick=function(e)
{vB_Editor[this.editorid].open_smilie_window(smiliewindow_x,smiliewindow_y);vBmenu.hide();};vB_Text_Editor_Events.prototype.attachmanage_onclick=function(e)
{vBmenu.hide();fetch_object('manage_attachments_button').onclick();};vB_Text_Editor_Events.prototype.attachoption_onclick=function(e)
{vB_Editor[this.editorid].button_context(this,'mouseout','menu');vB_Editor[this.editorid].wrap_tags('attach',false,this.attachmentid);vBmenu.hide();};vB_Text_Editor_Events.prototype.attachinsertall_onclick=function(e)
{var insert='';var breakchar=(vB_Editor[this.editorid].wysiwyg_mode?'<br /><br />':'\r\n\r\n');for(var id in vB_Attachments.attachments)
{insert+=insert!=''?breakchar:'';insert+='[ATTACH]'+id+'[/ATTACH]';}
vB_Editor[this.editorid].insert_text(insert);vBmenu.hide();}
vB_Text_Editor_Events.prototype.smiliewindow_onunload=function(e)
{if(typeof smilie_window!='undefined'&&!smilie_window.closed)
{smilie_window.close();}};vB_Text_Editor_Events.prototype.editwin_onfocus=function(e)
{this.hasfocus=true;};vB_Text_Editor_Events.prototype.editwin_onblur=function(e)
{this.hasfocus=false;};vB_Text_Editor_Events.prototype.editdoc_onmouseup=function(e)
{vB_Editor[this.editorid].set_context();if(vB_Editor[this.editorid].popupmode)
{vBmenu.hide();}};vB_Text_Editor_Events.prototype.editdoc_onkeyup=function(e)
{vB_Editor[this.editorid].set_context();};vB_Text_Editor_Events.prototype.editdoc_onkeypress=function(e)
{if(!e)
{e=window.event;}
if(e.ctrlKey)
{var code=e.charCode?e.charCode:e.keyCode;switch(String.fromCharCode(code).toLowerCase())
{case'b':cmd='bold';break;case'i':cmd='italic';break;case'u':cmd='underline';break;default:return;}
e=do_an_e(e);vB_Editor[this.editorid].apply_format(cmd,false,null);return false;}
else if(e.keyCode==9)
{var firsticon=fetch_object('rb_iconid_0');if(firsticon!=null)
{firsticon.focus();}
else if(fetch_object(this.editorid+'_save')!=null&&!is_opera)
{fetch_object(this.editorid+'_save').focus();}
else if(fetch_object('qr_submit')!=null&&!is_opera)
{fetch_object('qr_submit').focus();}
else
{return;}
e=do_an_e(e);}};vB_Text_Editor_Events.prototype.editdoc_onresizestart=function(e)
{if(e.srcElement.tagName=='IMG')
{return false;}};function save_iframe_to_textarea()
{for(var editorid in vB_Editor)
{if(vB_Editor[editorid].wysiwyg_mode&&vB_Editor[editorid].initialized)
{vB_Editor[editorid].textobj.value=vB_Editor[editorid].get_editor_contents();}}}
if(window.attachEvent)
{window.attachEvent('onbeforeunload',save_iframe_to_textarea);}
else if(window.addEventListener)
{window.addEventListener('unload',save_iframe_to_textarea,true);}
function switch_editor_mode(editorid)
{if(AJAX_Compatible)
{var mode=(vB_Editor[editorid].wysiwyg_mode?0:1);if(vB_Editor[editorid].influx==1)
{return;}
else
{vB_Editor[editorid].influx=1;}
if(typeof vBmenu!='undefined')
{vBmenu.hide();}
var ajax=new vB_AJAX_Handler(true);ajax.onreadystatechange(function()
{if(ajax.handler.readyState==4&&ajax.handler.status==200)
{if(ajax.handler.responseXML)
{var parsetype=vB_Editor[editorid].parsetype;var parsesmilies=vB_Editor[editorid].parsesmilies;var ajax_extra=vB_Editor[editorid].ajax_extra;vB_Editor[editorid].destroy();var parsed_text=ajax.fetch_data(fetch_tags(ajax.handler.responseXML,'message')[0]);var matches=parsed_text.match(/&#([0-9]+);/g);if(matches)
{for(var i=0;typeof matches[i]!='undefined';i++)
{if(submatch=matches[i].match(/^&#([0-9]+);$/))
{parsed_text=parsed_text.replace(submatch[0],String.fromCharCode(submatch[1]));}}}
vB_Editor[editorid]=null;vB_Editor[editorid]=new vB_Text_Editor(editorid,mode,parsetype,parsesmilies,parsed_text,ajax_extra);vB_Editor[editorid].check_focus();fetch_object(editorid+'_mode').value=mode;}
if(is_ie)
{ajax.handler.abort();}}});ajax.send('ajax.php?do=editorswitch','do=editorswitch'
+'&towysiwyg='+mode
+'&parsetype='+vB_Editor[editorid].parsetype
+'&allowsmilie='+vB_Editor[editorid].parsesmilies
+'&message='+PHP.urlencode(vB_Editor[editorid].get_editor_contents())
+(vB_Editor[editorid].ajax_extra?('&'+vB_Editor[editorid].ajax_extra):''));}}
var contextcontrols=new Array('bold','italic','underline','justifyleft','justifycenter','justifyright','insertorderedlist','insertunorderedlist');var coloroptions=new Array();coloroptions={'#000000':'Black','#A0522D':'Sienna','#556B2F':'DarkOliveGreen','#006400':'DarkGreen','#483D8B':'DarkSlateBlue','#000080':'Navy','#4B0082':'Indigo','#2F4F4F':'DarkSlateGray','#8B0000':'DarkRed','#FF8C00':'DarkOrange','#808000':'Olive','#008000':'Green','#008080':'Teal','#0000FF':'Blue','#708090':'SlateGray','#696969':'DimGray','#FF0000':'Red','#F4A460':'SandyBrown','#9ACD32':'YellowGreen','#2E8B57':'SeaGreen','#48D1CC':'MediumTurquoise','#4169E1':'RoyalBlue','#800080':'Purple','#808080':'Gray','#FF00FF':'Magenta','#FFA500':'Orange','#FFFF00':'Yellow','#00FF00':'Lime','#00FFFF':'Cyan','#00BFFF':'DeepSkyBlue','#9932CC':'DarkOrchid','#C0C0C0':'Silver','#FFC0CB':'Pink','#F5DEB3':'Wheat','#FFFACD':'LemonChiffon','#98FB98':'PaleGreen','#AFEEEE':'PaleTurquoise','#ADD8E6':'LightBlue','#DDA0DD':'Plum','#FFFFFF':'White'};function vB_History()
{this.cursor=-1;this.stack=new Array();}
vB_History.prototype.move_cursor=function(increment)
{var test=this.cursor+increment;if(test>=0&&this.stack[test]!=null&&typeof this.stack[test]!='undefined')
{this.cursor+=increment;}};vB_History.prototype.add_snapshot=function(str)
{if(this.stack[this.cursor]==str)
{return;}
else
{this.cursor++;this.stack[this.cursor]=str;if(typeof this.stack[this.cursor+1]!='undefined')
{this.stack[this.cursor+1]=null;}}};vB_History.prototype.get_snapshot=function()
{if(typeof this.stack[this.cursor]!='undefined'&&this.stack[this.cursor]!=null)
{return this.stack[this.cursor];}
else
{return false;}};
if(document.all&&navigator.appVersion.charAt(navigator.appVersion.indexOf("MSIE")+5)>=5&&navigator.userAgent.toLowerCase().indexOf('opera')==-1)
{ie5=true;}
else
{ie5=false;}
var pd=new Array();var pn=new Array();var pu=new Array();var imgStringCache=new Array();var imgCache=new Array();if(document.dir=='rtl')
{imgCache={"I":'<img src="'+imgdir_misc+'/tree_ir.gif" alt="" />',"L":'<img src="'+imgdir_misc+'/tree_rtl.gif" alt="" />',"T":'<img src="'+imgdir_misc+'/tree_tr.gif" alt="" />'};}
else
{imgCache={"I":'<img src="'+imgdir_misc+'/tree_i.gif" alt="" />',"L":'<img src="'+imgdir_misc+'/tree_ltr.gif" alt="" />',"T":'<img src="'+imgdir_misc+'/tree_t.gif" alt="" />'};}
function showPrevNextPost(nextOrPrev)
{info=pn[curpostid].split(',');showPost(info[nextOrPrev]);}
function setQRpostid(postid)
{if(quickreply)
{fetch_object("qr_postid").value=postid;}}
function navToPost(postid,noreload)
{if(postid!=0&&!noreload)
{window.location="showthread.php?"+SESSIONURL+"p="+postid+"#poststop";}}
function showPost(postid,noreload)
{if(typeof pd[postid]!='undefined')
{try
{if(quickreply)
{fetch_object("qr_postid").value=postid;}
fetch_object("link"+curpostid).style.fontWeight="normal";fetch_object("div"+curpostid).className='alt1';fetch_object("link"+postid).style.fontWeight="bold";fetch_object("div"+postid).className='alt2';try
{fetch_object("links").scrollIntoView(true);}
catch(e)
{}
fetch_object("posts").innerHTML=pd[postid];FIRSTPOSTID=postid;LASTPOSTID=postid;}
catch(e)
{navToPost(postid,noreload);}}
else
{navToPost(postid,noreload);}
curpostid=postid;return false;}
function writeLink(postid,isnew,attachment,userid,imgString,title,datestring,timestring,doshowpost)
{if(postid==curpostid||doshowpost)
{bgclass='alt2';}
else
{bgclass='alt1';}
document.write('<div class="'+bgclass+'" id="div'+postid+'">');if(!imgStringCache[imgString])
{imgStringCache[imgString]="";imgArray=imgString.split(',');for(i in imgArray)
{curType=imgArray[i];if(isNaN(curType))
{imgStringCache[imgString]+=imgCache[curType];}
else
{imgStringCache[imgString]+='<img src="'+cleargifurl+'" width="'+(curType*20)+'" height="20" alt="" />';}}}
document.write(imgStringCache[imgString]);if(isnew==1)
{statusicon='new';}
else
{statusicon='old';}
document.write('<img src="'+imgdir_statusicon+'/post_'+statusicon+'.gif" alt="" /> ');if(datestring=='more')
{document.write('<a href="showthread.php?p='+postid+highlightwords+'#post'+postid+'" id="link'+postid+'"><i>'+morephrase+'</i></a></div>\n');}
else
{if(attachment==1)
{document.write('<img src="'+imgdir_misc+'/paperclip.gif" alt="PaperClip" title="Attachment" /> ');}
if(typeof pu[userid]!="undefined")
{document.write(pu[userid].bold()+' ');}
else
{document.write(guestphrase+" ");}
if(postid==curpostid)
{titlestyle=' style="font-weight:bold;"';}
else
{titlestyle='';}
document.write('<a href="showthread.php?p='+postid+highlightwords+'#post'+postid+'" onclick="return showPost('+postid+')" id="link'+postid+'"'+titlestyle+'>'+title+'</a> ');if(ie5&&typeof pd[postid]!="undefined")
{iscached='.';}
else
{iscached='';}
document.write(datestring+', <span class="time">'+timestring+iscached+'</span>');document.write('</div>\n');}}                                                                                                                                                                                                                                                                                                                                                                                                                         post_groan.js                                                                                       0000644 0000000 0000000 00000003577 11041160205 012267  0                                                                                                    ustar   root                            root                                                                                                                                                                                                                   function post_groan_give(postid,integrate)
{fetch_object('post_groan_button_'+postid).style.display='none';if(integrate==true)
{fetch_object('post_thanks_button_'+postid).style.display='none';}
do_groan_add=new vB_AJAX_Handler(true);do_groan_add.postid=postid;do_groan_add.onreadystatechange(groan_add_Done);do_groan_add.send('post_groan.php?do=post_groan_add&using_ajax=1&p='+postid);}
function groan_add_Done()
{if(do_groan_add.handler.readyState==4&&do_groan_add.handler.status==200)
{fetch_object('post_groan_box_'+do_groan_add.postid).innerHTML=do_groan_add.handler.responseText;}}
function post_groan_remove_all(postid,integrate)
{do_groan_remove_all=new vB_AJAX_Handler(true)
do_groan_remove_all.postid=postid
do_groan_remove_all.onreadystatechange(groan_remove_all_Done)
do_groan_remove_all.send('post_groan.php?do=post_groan_remove_all&using_ajax=1&p='+postid)
fetch_object('post_groan_button_'+postid).style.display=''
if(integrate==true)
{fetch_object('post_thanks_button_'+postid).style.display='';}}
function groan_remove_all_Done()
{if(do_groan_remove_all.handler.readyState==4&&do_groan_remove_all.handler.status==200)
{fetch_object('post_groan_box_'+do_groan_remove_all.postid).innerHTML=do_groan_remove_all.handler.responseText}}
function post_groan_remove_user(postid,integrate)
{do_groan_remove_user=new vB_AJAX_Handler(true)
do_groan_remove_user.postid=postid
do_groan_remove_user.onreadystatechange(groan_remove_user_Done)
do_groan_remove_user.send('post_groan.php?do=post_groan_remove_user&using_ajax=1&p='+postid)
fetch_object('post_groan_button_'+postid).style.display=''
if(integrate==true)
{fetch_object('post_thanks_button_'+postid).style.display='';}}
function groan_remove_user_Done()
{if(do_groan_remove_user.handler.readyState==4&&do_groan_remove_user.handler.status==200)
{fetch_object('post_groan_box_'+do_groan_remove_user.postid).innerHTML=do_groan_remove_user.handler.responseText}}
                                                                                                                                 post_thanks.js                                                                                      0000644 0000000 0000000 00000003651 11040720225 012445  0                                                                                                    ustar   root                            root                                                                                                                                                                                                                   
function post_thanks_give(postid,integrate)
{fetch_object('post_thanks_button_'+postid).style.display='none';if(integrate==true)
{fetch_object('post_groan_button_'+postid).style.display='none';}
do_thanks_add=new vB_AJAX_Handler(true);do_thanks_add.postid=postid;do_thanks_add.onreadystatechange(thanks_add_Done);do_thanks_add.send('post_thanks.php?do=post_thanks_add&using_ajax=1&p='+postid);}
function thanks_add_Done()
{if(do_thanks_add.handler.readyState==4&&do_thanks_add.handler.status==200)
{fetch_object('post_thanks_box_'+do_thanks_add.postid).innerHTML=do_thanks_add.handler.responseText;}}
function post_thanks_remove_all(postid,integrate)
{do_thanks_remove_all=new vB_AJAX_Handler(true)
do_thanks_remove_all.postid=postid
do_thanks_remove_all.onreadystatechange(thanks_remove_all_Done)
do_thanks_remove_all.send('post_thanks.php?do=post_thanks_remove_all&using_ajax=1&p='+postid)
fetch_object('post_thanks_button_'+postid).style.display=''
if(integrate==true)
{fetch_object('post_groan_button_'+postid).style.display='';}}
function thanks_remove_all_Done()
{if(do_thanks_remove_all.handler.readyState==4&&do_thanks_remove_all.handler.status==200)
{fetch_object('post_thanks_box_'+do_thanks_remove_all.postid).innerHTML=do_thanks_remove_all.handler.responseText}}
function post_thanks_remove_user(postid,integrate)
{do_thanks_remove_user=new vB_AJAX_Handler(true)
do_thanks_remove_user.postid=postid
do_thanks_remove_user.onreadystatechange(thanks_remove_user_Done)
do_thanks_remove_user.send('post_thanks.php?do=post_thanks_remove_user&using_ajax=1&p='+postid)
fetch_object('post_thanks_button_'+postid).style.display=''
if(integrate==true)
{fetch_object('post_groan_button_'+postid).style.display='';}}
function thanks_remove_user_Done()
{if(do_thanks_remove_user.handler.readyState==4&&do_thanks_remove_user.handler.status==200)
{fetch_object('post_thanks_box_'+do_thanks_remove_user.postid).innerHTML=do_thanks_remove_user.handler.responseText}}                                                                                       vba_cmps_admin.js                                                                                   0000644 0000000 0000000 00000003715 10624065566 013074  0                                                                                                    ustar   root                            root                                                                                                                                                                                                                   var is_ie7 = false;

function check_all_array(allbox, inputname, secondary)
{
	if (secondary)
	{
		var matchname = inputname + "\\[" + secondary + "\\]";
	}
	else
	{
		var matchname = inputname;
	}

	var	checkitarray = new Array()
	var	allInputs	=	allbox.form.getElementsByTagName('input')

	for	(var i = 0;	i	<	allInputs.length;	i++)
	{
		if (allInputs[i].type	!= 'checkbox')
		{
			continue;
		}

		if (allInputs[i].name.match(matchname))
		{
			allInputs[i].checked = allbox.checked;
		}
	}
}

function preview_bbcode(previewtype)
{
	xml_sender = new vB_AJAX_Handler(true);
	xml_sender.init();

	if(!xml_sender.is_compatible() )
	{
		return true;
	}

	if (previewtype == 'module')
	{
		var inputname = 'module[options]';
	}
	else
	{
		var inputname = 'setting[custompage]';
	}

	var allow_html = 0;
	var allow_smilies = 0;
	var allow_imgcode = 0;

	if (vbform.elements[inputname + "[allow_html]"][0].checked)
	{
		var allow_html = 1;
	}

	if (vbform.elements[inputname + "[allow_smilies]"][0].checked)
	{
		var allow_smilies = 1;
	}

	if (vbform.elements[inputname + "[allow_image_code]"][0].checked)
	{
		var allow_imgcode = 1;
	}

	var message_code = vB_Editor['vB_Editor_001'].get_editor_contents();

	xml_sender.onreadystatechange(fetch_preview_output);
	xml_sender.send("vba_cmps_admin.php?do=preview", "message=" + PHP.urlencode(message_code) + "&html=" + allow_html + "&smilies=" + allow_smilies + "&imgcode=" + allow_imgcode);
	return false;
}

function fetch_preview_output()
{
	if( xml_sender.handler.readyState == 4 && xml_sender.handler.status == 200 )
	{
		if( xml_sender.handler.responseXML && fetch_tags(xml_sender.handler.responseXML, 'bbcode_text')[0] )
		{
			newwin = window.open ('vba_cmps_admin.php?do=previewcode&type=module', 'mywindow');
			newwin.document.open();
			newwin.document.write(xml_sender.fetch_data(fetch_tags(xml_sender.handler.responseXML, 'bbcode_text')[0]));
		}
	}
}                                                   vbulletin_ajax_imagereg.js                                                                          0000755 0000000 0000000 00000003267 11040715777 015005  0                                                                                                    ustar   root                            root                                                                                                                                                                                                                   
function vB_AJAX_ImageReg_Init()
{if(AJAX_Compatible&&(typeof vb_disable_ajax=='undefined'||vb_disable_ajax<2)&&fetch_object('refresh_imagereg'))
{fetch_object('refresh_imagereg').onclick=vB_AJAX_ImageReg.prototype.image_click;fetch_object('refresh_imagereg').style.cursor=pointer_cursor;fetch_object('refresh_imagereg').style.display='';if(fetch_object('imagereg'))
{fetch_object('imagereg').style.cursor=pointer_cursor;fetch_object('imagereg').onclick=vB_AJAX_ImageReg.prototype.image_click;}}};function vB_AJAX_ImageReg()
{this.xml_sender=null;this.imagehash='';var me=this;this.handle_ajax_response=function()
{if(me.xml_sender.handler.readyState==4&&me.xml_sender.handler.status==200)
{fetch_object('progress_imagereg').style.display='none';if(me.xml_sender.handler.responseXML)
{var error=me.xml_sender.fetch_data(fetch_tags(me.xml_sender.handler.responseXML,'error')[0]);if(error)
{alert(error);}
else
{var imagehash=me.xml_sender.fetch_data(fetch_tags(me.xml_sender.handler.responseXML,'imagehash')[0]);if(imagehash)
{fetch_object('imagehash').value=imagehash;fetch_object('imagereg').src='image.php?'+SESSIONURL+'type=regcheck&imagehash='+imagehash;}}}
if(is_ie)
{me.xml_sender.handler.abort();}}}};vB_AJAX_ImageReg.prototype.fetch_image=function()
{fetch_object('progress_imagereg').style.display='';this.xml_sender=new vB_AJAX_Handler(true);this.xml_sender.onreadystatechange(this.handle_ajax_response);this.xml_sender.send('ajax.php?do=imagereg&imagehash='+this.imagehash,'do=imagereg&imagehash='+this.imagehash);};vB_AJAX_ImageReg.prototype.image_click=function()
{var AJAX_ImageReg=new vB_AJAX_ImageReg();AJAX_ImageReg.imagehash=fetch_object('imagehash').value;AJAX_ImageReg.fetch_image();return false;};                                                                                                                                                                                                                                                                                                                                         vbulletin_ajax_namesugg.js                                                                          0000755 0000000 0000000 00000010144 11040715777 015023  0                                                                                                    ustar   root                            root                                                                                                                                                                                                                   
function vB_AJAX_NameSuggest(varname,textobjid,menukey)
{var webkit_version=userAgent.match(/applewebkit\/([0-9]+)/);if(AJAX_Compatible&&!(is_saf&&!(webkit_version[1]>=412)))
{this.menuobj=fetch_object(menukey+'_menu');this.textobj=fetch_object(textobjid);this.textobj.onfocus=function(e){this.obj.active=true;};this.textobj.onblur=function(e){this.obj.active=false;};this.textobj.obj=this;this.varname=varname;this.menukey=menukey;this.fragment='';this.donenames='';this.selected=0;this.menuopen=false;this.timeout=null;this.names=new Array();this.xml_sender=null;this.active=false;this.allow_multiple=false;this.min_chars=3;this.get_text=function()
{if(this.allow_multiple)
{var semicolon=this.textobj.value.lastIndexOf(';');if(semicolon==-1)
{this.donenames=new String('');this.fragment=new String(this.textobj.value);}
else
{this.donenames=new String(this.textobj.value.substring(0,semicolon+1));this.fragment=new String(this.textobj.value.substring(semicolon+1));}}
else
{this.fragment=new String(this.textobj.value);}
this.fragment=PHP.trim(this.fragment);}
this.set_text=function(i)
{if(this.allow_multiple)
{this.textobj.value=PHP.ltrim(this.donenames+" "+PHP.unhtmlspecialchars(this.names[i])+" ; ");}
else
{this.textobj.value=PHP.unhtmlspecialchars(this.names[i]);}
this.textobj.focus();this.menu_hide();return false;}
this.move_row_selection=function(increment)
{var newval=parseInt(this.selected,10)+parseInt(increment,10);if(newval<0)
{newval=this.names.length-1;}
else if(newval>=this.names.length)
{newval=0;}
this.set_row_selection(newval);return false;}
this.set_row_selection=function(i)
{var tds=fetch_tags(this.menuobj,'td');tds[this.selected].className='vbmenu_option';this.selected=i;tds[this.selected].className='vbmenu_hilite';}
this.key_event_handler=function(evt)
{evt=evt?evt:window.event;if(this.menuopen)
{switch(evt.keyCode)
{case 38:{this.move_row_selection(-1);return false;}
case 40:{this.move_row_selection(1);return false;}
case 27:{this.menu_hide();return false;}
case 13:{this.set_text(this.selected);return false;}}}
this.get_text();if(this.fragment.length>=this.min_chars)
{clearTimeout(this.timeout);this.timeout=setTimeout(this.varname+'.name_search();',500);}
else
{this.menu_hide();}}
this.name_search=function()
{if(this.active)
{this.names=new Array();if(!this.xml_sender)
{this.xml_sender=new vB_AJAX_Handler(true);}
this.xml_sender.onreadystatechange(this.onreadystatechange);this.xml_sender.send('ajax.php?do=usersearch','do=usersearch&fragment='+PHP.urlencode(this.fragment));}}
var me=this;this.onreadystatechange=function()
{if(me.xml_sender.handler.readyState==4&&me.xml_sender.handler.status==200&&me.xml_sender.handler.responseXML)
{var users=fetch_tags(me.xml_sender.handler.responseXML,'user');for(i=0;i<users.length;i++)
{me.names[i]=me.xml_sender.fetch_data(users[i]);}
if(me.names.length>0)
{me.menu_build();me.menu_show();}
else
{me.menu_hide();}
me.xml_sender.handler.abort();}}
this.menu_build=function()
{this.menu_empty();var re=new RegExp('^('+PHP.preg_quote(this.fragment)+')',"i");var table=document.createElement('table');table.cellPadding=4;table.cellSpacing=1;table.border=0;for(i in this.names)
{var td=table.insertRow(-1).insertCell(-1);td.className=(i==this.selected?'vbmenu_hilite':'vbmenu_option');td.title='nohilite';td.innerHTML='<a onclick="return '+this.varname+'.set_text('+i+')">'+this.names[i].replace(re,'<strong>$1</strong>')+'</a>';}
this.menuobj.appendChild(table);if(this.vbmenu==null)
{if(typeof(vBmenu.menus[this.menukey])!='undefined')
{this.vbmenu=vBmenu.menus[this.menukey];}
else
{this.vbmenu=vBmenu.register(this.menukey,true);}}
else
{this.vbmenu.init_menu_contents();}}
this.menu_empty=function()
{this.selected=0;while(this.menuobj.firstChild)
{this.menuobj.removeChild(this.menuobj.firstChild);}}
this.menu_show=function()
{if(this.active)
{this.vbmenu.show(fetch_object(this.menukey),this.menuopen);this.menuopen=true;}}
this.menu_hide=function()
{try
{this.vbmenu.hide();}
catch(e){}
this.menuopen=false;}
this.textobj.onkeyup=function(e){return this.obj.key_event_handler(e);};this.textobj.onkeypress=function(e)
{e=e?e:window.event;if(e.keyCode==13)
{return(this.obj.menuopen?false:true);}};}}                                                                                                                                                                                                                                                                                                                                                                                                                            vbulletin_ajax_quote.js                                                                             0000755 0000000 0000000 00000003430 11040715777 014352  0                                                                                                    ustar   root                            root                                                                                                                                                                                                                   
var quote_editorid;var quote_xml;function init_unquoted_posts(editorid,threadid)
{var fetch_link=fetch_object('multiquote_more');if(fetch_link)
{fetch_link.onclick=function(){return handle_unquoted_posts(editorid,threadid,'fetch');};}
var deselect_link=fetch_object('multiquote_deselect');if(deselect_link)
{deselect_link.onclick=function(){return handle_unquoted_posts(editorid,threadid,'deselect');};}}
function handle_unquoted_posts(editorid,threadid,type)
{quote_editorid=editorid;quote_xml=new vB_AJAX_Handler(true);quote_xml.onreadystatechange(handle_ajax_unquoted_response);quote_xml.send('newreply.php?do=unquotedposts&threadid='+threadid,'do=unquotedposts&threadid='+threadid
+'&wysiwyg='+(vB_Editor[quote_editorid].wysiwyg_mode?1:0)
+'&type='+PHP.urlencode(type));return false;}
function handle_ajax_unquoted_response()
{if(quote_xml.handler.readyState==4&&quote_xml.handler.status==200)
{if(quote_xml.handler.responseXML)
{if(fetch_tags(quote_xml.handler.responseXML,'quotes')[0])
{vB_Editor[quote_editorid].history.add_snapshot(vB_Editor[quote_editorid].get_editor_contents());vB_Editor[quote_editorid].insert_text(quote_xml.fetch_data(fetch_tags(quote_xml.handler.responseXML,'quotes')[0]));vB_Editor[quote_editorid].collapse_selection_end();vB_Editor[quote_editorid].history.add_snapshot(vB_Editor[quote_editorid].get_editor_contents());var multiquote_empty_input=fetch_object('multiquote_empty_input');if(multiquote_empty_input)
{multiquote_empty_input.value='all';}}
else if(fetch_tags(quote_xml.handler.responseXML,'mqpostids')[0])
{set_cookie('vbulletin_multiquote',quote_xml.fetch_data(fetch_tags(quote_xml.handler.responseXML,'mqpostids')[0]));}
var unquoted_posts=fetch_object('unquoted_posts');if(unquoted_posts)
{unquoted_posts.style.display='none';}}
if(is_ie)
{quote_xml.handler.abort();}}}                                                                                                                                                                                                                                        vbulletin_ajax_reputation.js                                                                        0000755 0000000 0000000 00000011736 11041160131 015372  0                                                                                                    ustar   root                            root                                                                                                                                                                                                                   function vbrep_register(postid)
{if(typeof vBrep=='object'&&typeof postid!='undefined')
{return vBrep.register(postid);}}
function vB_Reputation_Handler()
{this.reps=new Array();this.ajax=new Array();};vB_Reputation_Handler.prototype.register=function(postid)
{if(AJAX_Compatible&&(typeof vb_disable_ajax=='undefined'||vb_disable_ajax<2))
{this.reps[postid]=new vB_Reputation_Object(postid);if(obj=fetch_object('reputation_'+postid))
{obj.onclick=vB_Reputation_Object.prototype.reputation_click;return this.reps[postid];}}};vBrep=new vB_Reputation_Handler();function vB_Reputation_Object(postid)
{this.postid=postid;this.divname='reputationmenu_'+postid+'_menu';this.divobj=null;this.postobj=fetch_object('post'+postid);this.vbmenuname='reputationmenu_'+postid;this.vbmenu=null;this.xml_sender_populate=null;this.xml_sender_submit=null;var me=this;this.onreadystatechange_populate=function()
{if(me.xml_sender_populate.handler.readyState==4&&me.xml_sender_populate.handler.status==200)
{if(me.xml_sender_populate.handler.responseXML)
{var error=me.xml_sender_populate.fetch_data(fetch_tags(me.xml_sender_populate.handler.responseXML,'error')[0]);if(error)
{alert(error);}
else
{if(!me.divobj)
{me.divobj=document.createElement('div');me.divobj.id=me.divname;me.divobj.style.display='none';me.divobj.onkeypress=vB_Reputation_Object.prototype.repinput_onkeypress;me.postobj.parentNode.appendChild(me.divobj);me.vbmenu=vbmenu_register(me.vbmenuname,true);fetch_object(me.vbmenu.controlkey).onmouseover='';fetch_object(me.vbmenu.controlkey).onclick='';}
me.divobj.innerHTML=me.xml_sender_populate.fetch_data(fetch_tags(me.xml_sender_populate.handler.responseXML,'reputationbit')[0]);var inputs=fetch_tags(me.divobj,'input');for(var i=0;i<inputs.length;i++)
{if(inputs[i].type=='submit')
{var sbutton=inputs[i];var button=document.createElement('input');button.type='button';button.className=sbutton.className;button.value=sbutton.value;button.onclick=vB_Reputation_Object.prototype.submit_onclick;sbutton.parentNode.insertBefore(button,sbutton);sbutton.parentNode.removeChild(sbutton);button.name=sbutton.name;button.id=sbutton.name+'_'+me.postid}}
me.vbmenu.show(fetch_object(me.vbmenuname));}}
if(is_ie)
{me.xml_sender_populate.handler.abort();}}}
this.onreadystatechange_submit=function()
{if(me.xml_sender_submit.handler.readyState==4&&me.xml_sender_submit.handler.status==200)
{if(me.xml_sender_submit.handler.responseXML)
{if(!me.vbmenu)
{me.vbmenu=vbmenu_register(me.vbmenuname,true);fetch_object(me.vbmenu.controlkey).onmouseover='';fetch_object(me.vbmenu.controlkey).onclick='';}
var error=me.xml_sender_submit.fetch_data(fetch_tags(me.xml_sender_submit.handler.responseXML,'error')[0]);if(error)
{me.vbmenu.hide(fetch_object(me.vbmenuname));alert(error);}
else
{me.vbmenu.hide(fetch_object(me.vbmenuname));var repinfo=fetch_tags(me.xml_sender_submit.handler.responseXML,'reputation')[0];var repdisplay=repinfo.getAttribute('repdisplay');var reppower=repinfo.getAttribute('reppower');var userid=repinfo.getAttribute('userid');var spans=fetch_tags(document,'span');var postid=null;var match=null;for(var i=0;i<spans.length;i++)
{if(match=spans[i].id.match(/^reppower_(\d+)_(\d+)$/))
{if(match[2]==userid)
{spans[i].innerHTML=reppower;}}
else if(match=spans[i].id.match(/^repdisplay_(\d+)_(\d+)$/))
{if(match[2]==userid)
{spans[i].innerHTML=repdisplay;}}}
alert(me.xml_sender_submit.fetch_data(repinfo));}}
if(is_ie)
{me.xml_sender_submit.handler.abort();}}}}
vB_Reputation_Object.prototype.reputation_click=function(e)
{e=e?e:window.event;do_an_e(e);var postid=this.id.substr(this.id.lastIndexOf('_')+1);var repobj=vBrep.reps[postid];if(repobj.vbmenu==null)
{repobj.populate();}
else if(vBmenu.activemenu!=repobj.vbmenuname)
{repobj.vbmenu.show(fetch_object(repobj.vbmenuname));}
else
{repobj.vbmenu.hide();}
return true;}
vB_Reputation_Object.prototype.submit_onclick=function(e)
{e=e?e:window.event;do_an_e(e);var postid=this.id.substr(this.id.lastIndexOf('_')+1);var repobj=vBrep.reps[postid];repobj.submit();return false;}
vB_Reputation_Object.prototype.repinput_onkeypress=function(e)
{e=e?e:window.event;switch(e.keyCode)
{case 13:{vBrep.reps[this.id.split(/_/)[1]].submit();return false;}
default:{return true;}}}
vB_Reputation_Object.prototype.populate=function()
{this.xml_sender_populate=new vB_AJAX_Handler(true);this.xml_sender_populate.onreadystatechange(this.onreadystatechange_populate);this.xml_sender_populate.send('reputation.php?p='+this.postid,'p='+this.postid+'&ajax=1');}
vB_Reputation_Object.prototype.submit=function()
{this.psuedoform=new vB_Hidden_Form('reputation.php');this.psuedoform.add_variable('ajax',1);this.psuedoform.add_variables_from_object(this.divobj);this.xml_sender_submit=new vB_AJAX_Handler(true);this.xml_sender_submit.onreadystatechange(this.onreadystatechange_submit)
this.xml_sender_submit.send('reputation.php?do=addreputation&p='+this.psuedoform.fetch_variable('p')+'&reputation='+this.psuedoform.fetch_variable('reputation')+'&reason='+PHP.urlencode(this.psuedoform.fetch_variable('reason')),this.psuedoform.build_query_string());}
                                  vbulletin_ajax_search.js                                                                            0000755 0000000 0000000 00000002517 11040715777 014467  0                                                                                                    ustar   root                            root                                                                                                                                                                                                                   
function vB_AJAX_SearchPrefs_Init(buttonid)
{if(AJAX_Compatible&&(typeof vb_disable_ajax=='undefined'||vb_disable_ajax<2)&&fetch_object(buttonid))
{var sbutton=fetch_object(buttonid);sbutton.onclick=vB_AJAX_SearchPrefs.prototype.form_click;}};function vB_AJAX_SearchPrefs(formobj)
{this.xml_sender=null;this.pseudoform=new vB_Hidden_Form('search.php');this.pseudoform.add_variable('ajax',1);this.pseudoform.add_variable('doprefs',1);this.pseudoform.add_variables_from_object(formobj);var me=this;this.handle_ajax_response=function()
{if(me.xml_sender.handler.readyState==4&&me.xml_sender.handler.status==200)
{if(me.xml_sender.handler.responseXML)
{var obj=fetch_object(me.objid);var error=me.xml_sender.fetch_data(fetch_tags(me.xml_sender.handler.responseXML,'error')[0]);if(error)
{alert(error);}
else
{var message=me.xml_sender.fetch_data(fetch_tags(me.xml_sender.handler.responseXML,'message')[0]);if(message)
{alert(message);}}}
if(is_ie)
{me.xml_sender.handler.abort();}}}};vB_AJAX_SearchPrefs.prototype.submit=function()
{this.xml_sender=new vB_AJAX_Handler(true);this.xml_sender.onreadystatechange(this.handle_ajax_response);this.xml_sender.send('search.php?',this.pseudoform.build_query_string());};vB_AJAX_SearchPrefs.prototype.form_click=function()
{var AJAX_SearchPrefs=new vB_AJAX_SearchPrefs(this.form);AJAX_SearchPrefs.submit();return false;};                                                                                                                                                                                 vbulletin_ajax_threadrate.js                                                                        0000755 0000000 0000000 00000003756 11040715777 015353  0                                                                                                    ustar   root                            root                                                                                                                                                                                                                   
function vB_AJAX_ThreadRate_Init(formid)
{var formobj=fetch_object(formid);if(AJAX_Compatible&&(typeof vb_disable_ajax=='undefined'||vb_disable_ajax<2)&&formobj)
{for(var i=0;i<formobj.elements.length;i++)
{if(formobj.elements[i].type=='submit')
{var sbutton=formobj.elements[i];var button=document.createElement('input');button.type='button';button.className=sbutton.className;button.value=sbutton.value;button.onclick=vB_AJAX_ThreadRate.prototype.form_click;sbutton.parentNode.insertBefore(button,sbutton);sbutton.parentNode.removeChild(sbutton);}}}};function vB_AJAX_ThreadRate(formobj)
{this.xml_sender=null;this.pseudoform=new vB_Hidden_Form('threadrate.php');this.pseudoform.add_variable('ajax',1);this.pseudoform.add_variables_from_object(formobj);this.output_element_id='threadrating_current';var me=this;this.handle_ajax_response=function()
{if(me.xml_sender.handler.readyState==4&&me.xml_sender.handler.status==200)
{if(me.xml_sender.handler.responseXML)
{var obj=fetch_object(me.objid);var error=me.xml_sender.fetch_data(fetch_tags(me.xml_sender.handler.responseXML,'error')[0]);if(error)
{if(vBmenu.activemenu=='threadrating')
{vBmenu.hide();}
alert(error);}
else
{var newrating=me.xml_sender.fetch_data(fetch_tags(me.xml_sender.handler.responseXML,'voteavg')[0]);if(newrating!='')
{fetch_object(me.output_element_id).innerHTML=newrating;}
if(vBmenu.activemenu=='threadrating')
{vBmenu.hide();}
var message=me.xml_sender.fetch_data(fetch_tags(me.xml_sender.handler.responseXML,'message')[0]);if(message)
{alert(message);}}}
if(is_ie)
{me.xml_sender.handler.abort();}}}};vB_AJAX_ThreadRate.prototype.rate=function()
{this.xml_sender=new vB_AJAX_Handler(true);this.xml_sender.onreadystatechange(this.handle_ajax_response);this.xml_sender.send('threadrate.php?t='+threadid+'&vote='+PHP.urlencode(this.pseudoform.fetch_variable('vote')),this.pseudoform.build_query_string());};vB_AJAX_ThreadRate.prototype.form_click=function()
{var AJAX_ThreadRate=new vB_AJAX_ThreadRate(this.form);AJAX_ThreadRate.rate();return false;};                  vbulletin_ajax_threadslist.js                                                                       0000755 0000000 0000000 00000011077 11040715777 015551  0                                                                                                    ustar   root                            root                                                                                                                                                                                                                   
var vB_ThreadTitle_Editor=null;function vB_AJAX_Threadlist_Init(threadlistid)
{if(AJAX_Compatible&&(typeof vb_disable_ajax=='undefined'||vb_disable_ajax<2))
{var tds=fetch_tags(fetch_object(threadlistid),'td');for(var i=0;i<tds.length;i++)
{if(tds[i].hasChildNodes()&&tds[i].id&&tds[i].id.substr(0,3)=='td_')
{var anchors=fetch_tags(tds[i],'a');for(var j=0;j<anchors.length;j++)
{if(anchors[j].name&&anchors[j].name.indexOf('vB::AJAX')!=-1)
{var details=tds[i].id.split('_');switch(details[1])
{case'threadtitle':{if(typeof vb_disable_ajax=='undefined'||vb_disable_ajax==0)
{tds[i].style.cursor='default';tds[i].ondblclick=vB_AJAX_ThreadList_Events.prototype.threadtitle_doubleclick;}}
break;case'threadstatusicon':{tds[i].style.cursor=pointer_cursor;tds[i].ondblclick=vB_AJAX_ThreadList_Events.prototype.threadicon_doubleclick;}
break;}
break;}}}}}}
function vB_AJAX_OpenClose(obj)
{this.obj=obj;this.threadid=this.obj.id.substr(this.obj.id.lastIndexOf('_')+1);this.imgobj=fetch_object('thread_statusicon_'+this.threadid);this.xml_sender=null;this.toggle=function()
{this.xml_sender=new vB_AJAX_Handler(true);this.xml_sender.onreadystatechange(this.onreadystatechange);this.xml_sender.send('ajax.php?do=updatethreadopen&t='+this.threadid,'do=updatethreadopen&t='+this.threadid+'&src='+PHP.urlencode(this.imgobj.src));}
var me=this;this.onreadystatechange=function()
{if(me.xml_sender.handler.readyState==4&&me.xml_sender.handler.status==200)
{if(me.xml_sender.handler.responseXML)
{me.imgobj.src=me.xml_sender.fetch_data(fetch_tags(me.xml_sender.handler.responseXML,'imagesrc')[0]);if(iobj=fetch_object("tlist_"+me.threadid))
{if(me.imgobj.src.indexOf('_lock')!=-1)
{iobj.value=iobj.value|1;}
else
{iobj.value=iobj.value&~1;}}}
if(is_ie)
{me.xml_sender.handler.abort();}}}
this.toggle();}
function vB_AJAX_TitleEdit(obj)
{this.obj=obj;this.threadid=this.obj.id.substr(this.obj.id.lastIndexOf('_')+1);this.linkobj=fetch_object('thread_title_'+this.threadid);this.container=this.linkobj.parentNode;this.editobj=null;this.xml_sender=null;this.origtitle='';this.editstate=false;this.edit=function()
{if(this.editstate==false)
{this.inputobj=document.createElement('input');this.inputobj.type='text';this.inputobj.size=50;this.inputobj.maxLength=((typeof(titlemaxchars)=="number"&&titlemaxchars>0)?titlemaxchars:85);this.inputobj.style.width=Math.max(this.linkobj.offsetWidth,250)+'px';this.inputobj.className='bginput';this.inputobj.value=PHP.unhtmlspecialchars(this.linkobj.innerHTML);this.inputobj.title=this.inputobj.value;this.inputobj.onblur=vB_AJAX_ThreadList_Events.prototype.titleinput_onblur;this.inputobj.onkeypress=vB_AJAX_ThreadList_Events.prototype.titleinput_onkeypress;this.editobj=this.container.insertBefore(this.inputobj,this.linkobj);this.editobj.select();this.origtitle=this.linkobj.innerHTML;this.linkobj.style.display='none';this.editstate=true;}}
this.restore=function()
{if(this.editstate==true)
{if(this.editobj.value!=this.origtitle)
{this.linkobj.innerHTML=PHP.htmlspecialchars(this.editobj.value);this.save(this.editobj.value);}
else
{this.linkobj.innerHTML=this.editobj.value;}
this.container.removeChild(this.editobj);this.linkobj.style.display='';this.editstate=false;this.obj=null;}}
this.save=function(titletext)
{this.xml_sender=new vB_AJAX_Handler(true);this.xml_sender.onreadystatechange(this.onreadystatechange);this.xml_sender.send('ajax.php?do=updatethreadtitle&t='+this.threadid,'do=updatethreadtitle&t='+this.threadid+'&title='+PHP.urlencode(titletext));}
var me=this;this.onreadystatechange=function()
{if(me.xml_sender.handler.readyState==4&&me.xml_sender.handler.status==200)
{if(me.xml_sender.handler.responseXML)
{me.linkobj.innerHTML=me.xml_sender.fetch_data(fetch_tags(me.xml_sender.handler.responseXML,'linkhtml')[0]);}
if(is_ie)
{me.xml_sender.handler.abort();}
vB_ThreadTitle_Editor.obj=null;}}
this.edit();}
function vB_AJAX_ThreadList_Events()
{}
vB_AJAX_ThreadList_Events.prototype.threadtitle_doubleclick=function(e)
{if(vB_ThreadTitle_Editor&&vB_ThreadTitle_Editor.obj==this)
{return false;}
else
{try
{vB_ThreadTitle_Editor.restore();}
catch(e){}
vB_ThreadTitle_Editor=new vB_AJAX_TitleEdit(this);}};vB_AJAX_ThreadList_Events.prototype.threadicon_doubleclick=function(e)
{openclose=new vB_AJAX_OpenClose(this);};vB_AJAX_ThreadList_Events.prototype.titleinput_onblur=function(e)
{vB_ThreadTitle_Editor.restore();};vB_AJAX_ThreadList_Events.prototype.titleinput_onkeypress=function(e)
{e=e?e:window.event;switch(e.keyCode)
{case 13:{vB_ThreadTitle_Editor.inputobj.blur();return false;}
case 27:{vB_ThreadTitle_Editor.inputobj.value=vB_ThreadTitle_Editor.origtitle;vB_ThreadTitle_Editor.inputobj.blur();return true;}}};                                                                                                                                                                                                                                                                                                                                                                                                                                                                 vbulletin_ajax_userlist.js                                                                          0000755 0000000 0000000 00000003642 11040715777 015074  0                                                                                                    ustar   root                            root                                                                                                                                                                                                                   
function vB_AJAX_Userlist_Init(forms)
{if(AJAX_Compatible&&(typeof vb_disable_ajax=='undefined'||vb_disable_ajax==0))
{for(var i=0;i<arguments.length;i++)
{var form=document.getElementById(arguments[i]);if(form)
{form.onsubmit=vB_AJAX_Userlist.prototype.form_click;}}}};function vB_AJAX_Userlist(formobj)
{this.xml_sender=null;this.pseudoform=new vB_Hidden_Form('');this.pseudoform.add_variable('ajax',1);this.pseudoform.add_variables_from_object(formobj);this.list=formobj.id.replace(/userlist_(\w+)form/,'$1');var me=this;this.handle_ajax_response=function()
{if(me.xml_sender.handler.readyState==4&&me.xml_sender.handler.status==200)
{if(fetch_object('userfield_'+me.list+'_progress'))
{fetch_object('userfield_'+me.list+'_progress').style.display='none';}
if(me.xml_sender.handler.responseXML)
{var error=me.xml_sender.fetch_data(fetch_tags(me.xml_sender.handler.responseXML,'error')[0]);if(error)
{fetch_object('userfield_'+me.list+'_errortext').innerHTML=error;fetch_object('userfield_'+me.list+'_error').style.display='';}
else
{fetch_object('userfield_'+me.list+'_error').style.display='none';fetch_object('userfield_'+me.list+'_txt').value='';fetch_object(me.list+'list1').innerHTML=me.xml_sender.fetch_data(fetch_tags(me.xml_sender.handler.responseXML,'listbit1')[0]);fetch_object(me.list+'list2').innerHTML=me.xml_sender.fetch_data(fetch_tags(me.xml_sender.handler.responseXML,'listbit2')[0]);}}
if(is_ie)
{me.xml_sender.handler.abort();}}}};vB_AJAX_Userlist.prototype.submit_form=function(action)
{if(fetch_object('userfield_'+this.list+'_progress'))
{fetch_object('userfield_'+this.list+'_progress').style.display='';}
this.xml_sender=new vB_AJAX_Handler(true);this.xml_sender.onreadystatechange(this.handle_ajax_response);this.xml_sender.send(action,this.pseudoform.build_query_string());};vB_AJAX_Userlist.prototype.form_click=function()
{var AJAX_Userlist=new vB_AJAX_Userlist(this);AJAX_Userlist.submit_form(this.action);return false;};                                                                                              vbulletin_ajax_wolresolve.js                                                                        0000755 0000000 0000000 00000002415 11040715777 015420  0                                                                                                    ustar   root                            root                                                                                                                                                                                                                   
function vB_AJAX_WolResolve_Init(woltableid)
{if(AJAX_Compatible&&(typeof vb_disable_ajax=='undefined'||vb_disable_ajax<2))
{var link_list=fetch_tags(fetch_object(woltableid),'a');for(var i=0;i<link_list.length;i++)
{if(link_list[i].id&&link_list[i].id.substr(0,10)=='resolveip_'&&link_list[i].innerHTML.match(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/))
{link_list[i].onclick=resolve_ip_click;}}}}
function vB_AJAX_WolResolve(ip,objid)
{this.ip=ip;this.objid=objid;this.xml_sender=null;var me=this;this.resolve=function()
{this.xml_sender=new vB_AJAX_Handler(true);this.xml_sender.onreadystatechange(this.onreadystatechange);this.xml_sender.send('online.php?do=resolveip&ipaddress='+PHP.urlencode(this.ip),'do=resolveip&ajax=1&ipaddress='+PHP.urlencode(this.ip));}
this.onreadystatechange=function()
{if(me.xml_sender.handler.readyState==4&&me.xml_sender.handler.status==200)
{if(me.xml_sender.handler.responseXML)
{var obj=fetch_object(me.objid);obj.parentNode.insertBefore(document.createTextNode(me.xml_sender.fetch_data(fetch_tags(me.xml_sender.handler.responseXML,'ipaddress')[0])),obj);obj.parentNode.removeChild(obj);}
if(is_ie)
{me.xml_sender.handler.abort();}}}}
function resolve_ip_click(e)
{var resolver=new vB_AJAX_WolResolve(this.innerHTML,this.id);resolver.resolve();return false;}                                                                                                                                                                                                                                                   vbulletin_attachment.js                                                                             0000755 0000000 0000000 00000005314 11040715777 014345  0                                                                                                    ustar   root                            root                                                                                                                                                                                                                   
function vB_Attachment(listobjid,editorid)
{this.attachments=new Array();this.menu_contents=new Array();this.windows=new Array();this.listobjid=listobjid;if(editorid=='')
{for(var editorid in vB_Editor)
{if(typeof vB_Editor[editorid]!='function')
{this.editorid=editorid;break;}}}
else
{this.editorid=(editorid?editorid:null);}};vB_Attachment.prototype.popup_exists=function()
{if(this.editorid&&((typeof vB_Editor[this.editorid].popups['attach']!='undefined'&&vB_Editor[this.editorid].popups['attach']!=null)||(!vB_Editor[this.editorid].popupmode&&typeof vB_Editor[this.editorid].buttons['attach']!='undefined'&&vB_Editor[this.editorid].buttons['attach']!=null)))
{return true;}
else
{return false;}};vB_Attachment.prototype.add=function(id,filename,filesize,imgpath)
{this.attachments[id]=new Array();this.attachments[id]={'filename':filename,'filesize':filesize,'imgpath':imgpath};this.update_list();};vB_Attachment.prototype.remove=function(id)
{if(typeof this.attachments[id]!='undefined')
{this.attachments[id]=null;this.update_list();}};vB_Attachment.prototype.has_attachments=function()
{for(var id in this.attachments)
{if(this.attachments[id]!=null)
{return true;}}
return false;};vB_Attachment.prototype.reset=function()
{this.attachments=new Array();this.update_list();};vB_Attachment.prototype.build_list=function(listobjid)
{var listobj=fetch_object(listobjid);if(listobjid!=null)
{while(listobj.hasChildNodes())
{listobj.removeChild(listobj.firstChild);}
for(var id in this.attachments)
{var div=document.createElement('div');if(typeof newpost_attachmentbit!='undefined')
{div.innerHTML=construct_phrase(newpost_attachmentbit,this.attachments[id]['imgpath'],SESSIONURL,id,Math.ceil((new Date().getTime())/1000),this.attachments[id]['filename'],this.attachments[id]['filesize']);}
else
{div.innerHTML='<div style="margin:2px"><img src="'+this.attachments[id]['imgpath']+'" alt="" class="inlineimg" /> '+'<a href="attachment.php?'+SESSIONURL+'attachmentid='+id+'&stc=1&d='+Math.ceil((new Date().getTime())/1000)+'" target="_blank" />'+this.attachments[id]['filename']+'</a> '+'('+this.attachments[id]['filesize']+')</div>';}
listobj.appendChild(div);}}};vB_Attachment.prototype.update_list=function()
{this.build_list(this.listobjid);if(this.popup_exists())
{vB_Editor[this.editorid].build_attachments_popup(vB_Editor[this.editorid].popupmode?vB_Editor[this.editorid].popups['attach']:vB_Editor[this.editorid].buttons['attach'],vB_Editor[this.editorid].buttons['attach']);}};vB_Attachment.prototype.open_window=function(url,width,height,hash)
{if(typeof(this.windows[hash])!='undefined'&&this.windows[hash].closed==false)
{this.windows[hash].focus();}
else
{this.windows[hash]=openWindow(url,width,height,'Attach'+hash);}
return this.windows[hash];};                                                                                                                                                                                                                                                                                                                    vbulletin_cpcolorpicker.js                                                                          0000755 0000000 0000000 00000012712 11040715777 015054  0                                                                                                    ustar   root                            root                                                                                                                                                                                                                   
var activeElementId=0;var colorPickerType=0;var pickerReady=false;var colors=new Array("00","33","66","99","CC","FF");var specialColors=new Array('#000000','#333333','#666666','#999999','#CCCCCC','#FFFFFF','#FF0000','#00FF00','#0000FF','#FFFF00','#00FFFF','#FF00FF');function init_color_preview()
{if(typeof(numColors)!="undefined")
{for(var i=0;i<numColors;i++)
{preview_color(i);}
if(colorPickerType!=0)
{init_color_picker(colorPickerType);}
pickerReady=true;}}
function preview_color(elm)
{var colorElement=fetch_object("color_"+elm);var previewElement=fetch_object("preview_"+elm);var cssRegExp=new RegExp(/url\(('|"|)((http:\/\/|\/)?)(.*)\1\)/i);if(is_transparent(colorElement.value))
{previewElement.style.background="none";previewElement.style.borderStyle="dashed";previewElement.title=window.status="";}
else
{var cssValue=colorElement.value;var matches;if(matches=colorElement.value.match(cssRegExp))
{if(typeof matches[3]=="undefined"||matches[3]=="")
{cssValue=colorElement.value.replace(matches[4],(bburl+matches[4]));}}
try
{previewElement.style.background=cssValue;previewElement.style.borderStyle="inset";previewElement.title=window.status="";}
catch(csserror)
{previewElement.style.background="url('../cpstyles/"+cpstylefolder+"/cp_help.gif') no-repeat center";previewElement.style.borderStyle="dashed";previewElement.title=window.status=construct_phrase(vbphrase["css_value_invalid"],cssValue);}}}
function set_swatch_color(x,y,color)
{fetch_object("sw"+x+"-"+y).style.backgroundColor=color;}
function init_color_picker(setPickerType)
{colorPickerType=setPickerType;fetch_object("colorPickerType").value=setPickerType;var y,x,i,j;if(setPickerType<2)
{for(y=0;y<12;y++)
{set_swatch_color(0,y,'#000000');set_swatch_color(1,y,specialColors[y]);set_swatch_color(2,y,'#000000');}}
switch(setPickerType)
{case 0:{green=new Array(5,4,3,2,1,0,0,1,2,3,4,5);blue=new Array(0,0,0,5,4,3,2,1,0,0,1,2,3,4,5,5,4,3,2,1,0);for(y=0;y<12;y++)
{for(x=3;x<21;x++)
{r=Math.floor((20-x)/6)*2+Math.floor(y/6);g=green[y];b=blue[x];set_swatch_color(x,y,"#"+colors[r]+colors[g]+colors[b]);}}}
break;case 1:{green=new Array(0,0,0,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5);blue=new Array(0,1,2,3,4,5,0,1,2,3,4,5);for(y=0;y<12;y++)
{for(x=3;x<21;x++)
{r=Math.floor((x-3)/6)+Math.floor(y/6)*3;g=green[x];b=blue[y];set_swatch_color(x,y,"#"+colors[r]+colors[g]+colors[b]);}}}
break;case 2:{i=255;j=-1;for(y=0;y<12;y++)
{for(x=0;x<21;x++)
{set_swatch_color(x,y,"rgb("+i+","+i+","+i+")");i--;if(i==4)
{i=0;}}}}
break;case 3:case 4:case 5:case 6:case 7:case 8:{i=255;j=255;for(y=0;y<12;y++)
{for(x=0;x<21;x++)
{acolor=Math.round(j);bcolor=Math.round(i);if(acolor<0)
{acolor=0;}
switch(setPickerType)
{case 3:r=acolor;g=bcolor;b=bcolor;break;case 4:r=bcolor;g=acolor;b=bcolor;break;case 5:r=bcolor;g=bcolor;b=acolor;break;case 6:r=acolor;g=acolor;b=bcolor;break;case 7:r=acolor;g=bcolor;b=acolor;break;case 8:r=bcolor;g=acolor;b=acolor;break;}
set_swatch_color(x,y,"rgb("+r+","+g+","+b+")");if(i>1)
{i-=2.03174;}
else
{i=0;if(j>1.03)
{j-=2.03174;}}}}}
break;default:return false;}
pickerReady=true;return true;}
function switch_color_picker(direction)
{if(direction>0)
{if(colorPickerType<8)
{colorPickerType++;}
else
{colorPickerType=0;}}
else
{if(colorPickerType>0)
{colorPickerType--;}
else
{colorPickerType=8;}}
init_color_picker(colorPickerType);}
function open_color_picker(clickedElementId,e)
{if(!pickerReady)
{alert(vbphrase["color_picker_not_ready"]);return;}
pickerElement=fetch_object("colorPicker");if(activeElementId==clickedElementId&&pickerElement.style.display!="none")
{pickerElement.style.display="none";}
else
{activeElementId=clickedElementId;colorElement=fetch_object("color_"+clickedElementId);previewElement=fetch_object("preview_"+clickedElementId);var thecolor=null;if(previewElement.style.background)
{thecolor=previewElement.style.backgroundColor;}
else
{thecolor=previewElement.style.backgroundColor;}
fetch_object("oldColor").style.background=thecolor;fetch_object("newColor").style.background=thecolor;fetch_object("txtColor").value=colorElement.value;if(!e)
{e=window.event;}
if(typeof(e.pageX)=="number")
{xpos=e.pageX;ypos=e.pageY;}
else if(typeof(e.clientX)=="number")
{xpos=e.clientX+document.documentElement.scrollLeft;ypos=e.clientY+document.documentElement.scrollTop;}
xpos+=10;ypos+=5;if((xpos+colorPickerWidth)>=document.body.clientWidth)
{xpos=document.body.clientWidth-colorPickerWidth-5;}
pickerElement.style.left=xpos+"px";pickerElement.style.top=ypos+"px";pickerElement.style.display="";}}
function close_color_picker()
{activeElementId=0;fetch_object("colorPicker").style.display="none";}
function swatch_over(e)
{col_over(this);}
function swatch_click(e)
{col_click(this);}
function col_over(element)
{color=fetch_hex_color(element.style.backgroundColor);fetch_object("newColor").style.background=color;fetch_object("txtColor").value=color;}
function col_click(element)
{if(element=="transparent")
{color=element;}
else
{color=fetch_hex_color(element.style.backgroundColor);}
fetch_object("color_"+activeElementId).value=color;preview_color(activeElementId);close_color_picker();}
function fetch_hex_color(color)
{if(color.substr(0,1)=="r")
{colorMatch=color.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/i);for(var i=1;i<4;i++)
{colorMatch[i]=parseInt(colorMatch[i]).toString(16);if(colorMatch[i].length<2)
{colorMatch[i]="0"+colorMatch[i];}}
color="#"+(colorMatch[1]+colorMatch[2]+colorMatch[3]).toUpperCase();}
return color.toUpperCase();}
function is_transparent(value)
{if(value==""||value=="none"||value=="transparent")
{return true;}
else
{return false;}}                                                      vbulletin_cphome_scripts.js                                                                         0000755 0000000 0000000 00000010644 11040715777 015241  0                                                                                                    ustar   root                            root                                                                                                                                                                                                                   
if(typeof(vb_version)!="undefined"&&isNewerVersion(current_version,vb_version))
{t=fetch_object('news_table');t_head_r=t.insertRow(0);t_head_c=t_head_r.insertCell(0);t_head_c.className='thead';t_head_c.innerHTML=newer_version_string.bold();t_body_r=t.insertRow(1);t_body_c=t_body_r.insertCell(0);t_body_c.className='alt1';t_body_p1=document.createElement('p');t_body_p1.className='smallfont';t_body_a1=document.createElement('a');t_body_a1.href='http://www.vbulletin.com/forum/showthread.ph'+'p?p='+vb_announcementid;t_body_a1.target='_blank';t_body_a1.innerHTML=construct_phrase(latest_string,vb_version).bold();t_body_p1.appendChild(t_body_a1);t_body_p1.innerHTML+='. '+construct_phrase(current_string,current_version.bold())+'.';t_body_c.appendChild(t_body_p1);t_body_p2=document.createElement('p');t_body_p2.className='smallfont';t_body_a2=document.createElement('a');t_body_a2.href='http://members.vbulletin.com/';t_body_a2.target='_blank';t_body_a2.innerHTML=construct_phrase(download_string,vb_version.bold());t_body_p2.appendChild(t_body_a2);t_body_c.appendChild(t_body_p2);}
function create_cp_table(tableid)
{var t=document.createElement('table');t.cellPadding=4;t.cellSpacing=0;t.border=0;t.align='center';t.width='90%';t.className='tborder';if(tableid)
{t.id=tableid;}
return t;}
function news_loader_onreadystatechange()
{if(news.handler.readyState==4&&news.handler.status==200&&news.handler.responseXML)
{var visible_messages=done_table;var table_visible=false;var news_id='';var news_date='';var news_title='';var news_body='';var news_link='';var news_items=fetch_tags(news.handler.responseXML,'item');if(done_table)
{t=fetch_object('news_table');table_visible=true;}
else
{t=fetch_object('news_table');if(news_items.length)
{fetch_object('admin_news').style.display='';th=t.insertRow(0);cell=th.insertCell(0);cell.className='tcat';cell.align='center';cell.innerHTML=news_header_string.bold();table_visible=true;}}
for(var i=0;i<news_items.length;i++)
{news_id=news.fetch_data(fetch_tags(news_items[i],'guid')[0]);if(PHP.in_array(news_id,dismissed_news)==-1)
{visible_messages=true;news_date=news.fetch_data(fetch_tags(news_items[i],'pubdate')[0]);news_title=news.fetch_data(fetch_tags(news_items[i],'title')[0]);news_body=news.fetch_data(fetch_tags(news_items[i],'description')[0]);news_link=news.fetch_data(fetch_tags(news_items[i],'link')[0]);var local_news_matches=news_body.match(/\[local\]((?!\[\/local\]).)*\[\/local\]/g);if(local_news_matches!=null)
{sessionurl=(SESSIONHASH==''?'':'s='+SESSIONHASH+'&');for(var i=0;i<local_news_matches.length;i++)
{news_body=news_body.replace(local_news_matches[i],local_news_matches[i].replace(/^\[local\](.*)\.php(\??)(.*)\[\/local\]$/,'$1'+local_extension+'?'+sessionurl+'$3'));}}
r1=t.insertRow(t.rows.length);r1.id='r1_'+news_id;c1=r1.insertCell(0);c1.className='thead';s=document.createElement('input');s.type='submit';s.name='acpnews['+news_id+']';s.className='button';if(is_ie)
{s.style.styleFloat=stylevar_right;}
else
{s.style.cssFloat=stylevar_right;}
s.title="id="+news_id;s.value=dismiss_string;c1.appendChild(s);t1=document.createTextNode(construct_phrase(vbulletin_news_string,news_title));c1.appendChild(t1);r2=t.insertRow(t.rows.length);r2.id='r2_'+news_id;c2=r2.insertCell(0);c2.className='alt2 smallfont';c2.innerHTML=news_body+' ';if(news_link&&news_link!='http://')
{link_elem=document.createElement('a');link_elem.href=news_link;link_elem.target='_blank';link_elem.innerHTML=view_string.bold();c2.appendChild(link_elem);}}}
if(is_ie)
{news.handler.abort();}
if(table_visible)
{if(news_items.length)
{r3=t.insertRow(t.rows.length);c3=r3.insertCell(0);c3.className=(visible_messages?'tfoot':'alt1');c3.align='center';a=document.createElement('a');a.href=show_all_news_link;a.innerHTML=show_all_news_string;if(c3.currentStyle)
{a.style.color=c3.currentStyle.color;}
else if(window.getComputedStyle&&window.getComputedStyle(c3,null))
{a.style.color=window.getComputedStyle(c3,null).color;}
c3.appendChild(a);}
var rows=fetch_tags(fetch_object('news_table'),'td');var last_row='alt1';for(var i=0;i<rows.length;i++)
{if(rows[i].className=='alt1'||rows[i].className=='alt2')
{last_row=rows[i].className;}
else if(rows[i].className=='alt2 smallfont')
{if(last_row=='alt1')
{last_row='alt2';}
else
{rows[i].className='alt1 smallfont';last_row='alt1';}}}}}}
if(AJAX_Compatible)
{dismissed_news=dismissed_news.split(',');var news=new vB_AJAX_Handler(true);news.onreadystatechange(news_loader_onreadystatechange);news.send('./newsproxy.php','');}                                                                                            vbulletin_cpoptions_scripts.js                                                                      0000755 0000000 0000000 00000004137 11040715777 016004  0                                                                                                    ustar   root                            root                                                                                                                                                                                                                   
var multi_input=new Array();function vB_Multi_Input(varname,count,cpstylefolder)
{this.varname=varname;this.count=count;this.cpstylefolder=cpstylefolder;this.add=function()
{var div=document.createElement('div');div.id='multi_input_container_'+this.varname+'_'+this.count;div.appendChild(document.createTextNode((this.count+1)+' '));div.appendChild(this.create_input(this.count+1));fetch_object('multi_input_fieldset_'+this.varname).appendChild(div);this.append_buttons(this.count++);return false;};this.create_input=function()
{var input=document.createElement('input');input.type='text';input.size=40;input.className='bginput';input.name='setting['+this.varname+']['+this.count+']';input.id='multi_input_'+this.varname+'_'+this.count;input.tabIndex=1;return input;};this.create_button=function(index,img,moveby)
{var a=document.createElement('a');a.varname=this.varname;a.index=index;a.moveby=moveby;a.href='#';a.onclick=function(){return multi_input[this.varname].move(this.index,this.moveby);};var i=document.createElement('img');i.src='../cpstyles/'+this.cpstylefolder+'/move_'+img+'.gif';i.alt='';i.border=0;a.appendChild(i);return a;};this.append_buttons=function(i)
{var div=fetch_object('multi_input_container_'+this.varname+'_'+i);div.varname=this.varname;div.index=i;div.appendChild(document.createTextNode(' '));div.appendChild(this.create_button(i,'down',1));div.appendChild(document.createTextNode(' '));div.appendChild(this.create_button(i,'up',-1));};this.fetch_input=function(i)
{return fetch_object('multi_input_'+this.varname+'_'+i);};this.move=function(index,moveby)
{var values=new Array();for(var i=0;i<this.count;i++)
{values[i]=this.fetch_input(i).value;}
if(index==0&&moveby<0)
{for(var i=0;i<this.count;i++)
{this.fetch_input(i).value=(i==(this.count-1)?values[0]:values[i+1]);}}
else if(index==(this.count-1)&&moveby>0)
{for(var i=0;i<this.count;i++)
{this.fetch_input(i).value=(i==0?values[this.count-1]:values[i-1]);}}
else
{this.fetch_input(index).value=values[index+moveby];this.fetch_input(index+moveby).value=values[index];}
values=null;return false;};for(var i=0;i<this.count;i++)
{this.append_buttons(i);}};                                                                                                                                                                                                                                                                                                                                                                                                                                 vbulletin_date_picker.js                                                                            0000755 0000000 0000000 00000027034 11040715777 014472  0                                                                                                    ustar   root                            root                                                                                                                                                                                                                   
vBulletin.events.systemInit.subscribe(function()
{if(vBulletin.elements["vB_DatePicker"])
{for(var i=0;i<vBulletin.elements["vB_DatePicker"].length;i++)
{new vB_DatePicker(vBulletin.elements["vB_DatePicker"][i][0].id,vBulletin.elements["vB_DatePicker"][i][1]);}
vBulletin.elements["vB_DatePicker"]=null;}});function vB_DatePicker(button_sibling,argstring)
{var args=argstring.split(",");var base_id=(typeof(args[1])=="undefined"?"":args[1]);this.button_sibling=YAHOO.util.Dom.get(button_sibling);if(!this.button_sibling)
{vBulletin.console("Button sibling missing from vB_DatePicker (%s)",base_id);return false;}
this.datestring=YAHOO.util.Dom.get(base_id+"datestring");if(!this.datestring)
{this.month_element=YAHOO.util.Dom.get(base_id+"month");this.date_element=YAHOO.util.Dom.get(base_id+"date");this.year_element=YAHOO.util.Dom.get(base_id+"year");if(!this.month_element||!this.date_element||!this.year_element)
{vBulletin.console("Elements missing from vB_DatePicker (%s)",base_id);return false;}}
this.hidden_selects=new Array();this.selected_date=this.read_input();this.current_month=new Date(this.selected_date);this.current_month.setFullYear(this.selected_date.getFullYear(),this.selected_date.getMonth(),1);var tmp=new Date();this.today=new Date(0);this.today.setFullYear(tmp.getFullYear(),tmp.getMonth(),tmp.getDate());this.today.setHours(0,0,0);var week_start_day=(parseInt(args[0])-1)%7;if(week_start_day<0)
{week_start_day=0;}
this.userweek=new Array();while(this.userweek.length<7)
{this.userweek[this.userweek.length]=week_start_day++;if(week_start_day>=7)
{week_start_day=0;}}
this.daynames=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");this.monthnames=new Array("January","February","March","April","May","June","July","August","September","October","November","December");if(this.button_sibling)
{YAHOO.util.Event.on(document,"click",this.close_popup,this,true);if(!is_ie)
{YAHOO.util.Event.on(window,"resize",this.close_popup,this,true);}
this.button=this.button_sibling.parentNode.insertBefore(document.createElement("a"),this.button_sibling.nextSibling);this.button.href="#";this.buttonimg=this.button.appendChild(document.createElement("img"));this.buttonimg.src=IMGDIR_MISC+"/calendar_popup.png";if(is_ie)
{this.buttonimg.style.verticalAlign="text-bottom";}
else
{this.buttonimg.style.verticalAlign="bottom";}
this.buttonimg.border="0";YAHOO.util.Event.on(this.button,"click",this.toggle_calendar,this,true);if(is_ie)
{this.div=this.button_sibling.parentNode.insertBefore(document.createElement("div"),this.button_sibling);this.div.style.position="absolute";}
this.popup=(is_ie?this.div:document.body).appendChild(document.createElement("div"));this.popup.style.position="absolute";this.popup.style.display="none";this.popup.style.top=this.button_sibling.offsetHeight+"px";this.popup_state=false;this.build_calendar();}};vB_DatePicker.prototype.build_calendar=function()
{if(this.table&&this.table.parentNode)
{this.table.parentNode.removeChild(this.table);}
var tmp_span=document.createElement("span");tmp_span.className="page";tmp_span.innerHTML='&nbsp;';document.body.appendChild(tmp_span);var page_back=YAHOO.util.Dom.getStyle(tmp_span,"backgroundColor");var page_front=YAHOO.util.Dom.getStyle(tmp_span,"color");document.body.removeChild(tmp_span);this.table=document.createElement("table");this.table.cellSpacing=1;this.table.className="tborder vB_DatePicker page";this.table.style.background=page_back;var thead=this.table.appendChild(document.createElement("thead"));var tr=thead.appendChild(document.createElement("tr"));var prevbutton=tr.appendChild(document.createElement("th"));this.tabletitle=tr.appendChild(document.createElement("th"));var nextbutton=tr.appendChild(document.createElement("th"));tr.align="center";this.tabletitle.className="tcat smallfont";this.tabletitle.colSpan=5;this.tabletitle.innerHTML="&nbsp;";prevbutton.className="tcat smallfont";prevbutton.innerHTML="&lt;";prevbutton.style.cursor="pointer";prevbutton.increment=-1;YAHOO.util.Event.on(prevbutton,"click",this.change_month,this,true);nextbutton.className="tcat smallfont";nextbutton.innerHTML="&gt;";nextbutton.style.cursor="pointer";nextbutton.increment=1;YAHOO.util.Event.on(nextbutton,"click",this.change_month,this,true);var tr=thead.appendChild(document.createElement("tr"));tr.align="center";tr.className="page smallfont";for(var i in this.userweek)
{var td=tr.appendChild(document.createElement("td"));td.className="smallfont";td.appendChild(document.createTextNode(this.daynames[this.userweek[i]].substring(0,1)));}
var tr=thead.appendChild(document.createElement("tr"));var td=tr.appendChild(document.createElement("td"));td.colSpan=7;td.className="page"
var div=td.appendChild(document.createElement("div"));div.style.background=page_front;var img=div.appendChild(document.createElement("img"));img.src=(typeof(CLEARGIFURL)!='undefined'?CLEARGIFURL:'clear.gif');this.tbody=this.table.appendChild(document.createElement("tbody"));this.draw_date_cells(this.selected_date.getMonth()+1,this.selected_date.getFullYear());this.popup.appendChild(this.table);};vB_DatePicker.prototype.draw_date_cells=function(month,year)
{this.current_month=new Date(0);this.current_month.setFullYear(year,month-1,1);this.tabletitle.innerHTML=this.monthnames[this.current_month.getMonth()]+" "+this.current_month.getFullYear();while(this.tbody.hasChildNodes())
{this.tbody.removeChild(this.tbody.firstChild);}
var monthstartday=this.current_month.getDay();var beforedays=0;for(i in this.userweek)
{if(monthstartday==this.userweek[i])
{break;}
else
{beforedays++;}}
var curday=new Date(0);curday.setFullYear(this.current_month.getFullYear(),this.current_month.getMonth(),1-beforedays);for(var row=0;row<6;row++)
{var tr=this.tbody.appendChild(document.createElement("tr"));tr.align="center";for(i in this.userweek)
{var td=tr.appendChild(document.createElement("td"))
td.innerHTML=(curday.getDate()<10?"&nbsp;":"")+curday.getDate();td.dateobj=new Date(curday);td.title=td.dateobj.toString();td.style.cursor="pointer";YAHOO.util.Event.on(td,"click",this.date_click,this,true);YAHOO.util.Event.on(td,"mouseover",this.date_mouseover,this,true);YAHOO.util.Event.on(td,"mouseout",this.date_mouseover,this,true);curday.setDate(curday.getDate()+1);curday.setHours(0,0,0);}}
this.apply_date_classes();}
vB_DatePicker.prototype.apply_date_classes=function()
{var tds=this.tbody.getElementsByTagName("td");for(var i=0;i<tds.length;i++)
{if(tds[i].dateobj.valueOf()==this.selected_date.valueOf())
{tds[i].className="tfoot smallfont";}
else if(tds[i].dateobj.getMonth()==this.current_month.getMonth())
{tds[i].className="smallfont";}
else
{tds[i].className="time smallfont";}
if(tds[i].dateobj.valueOf()==this.today.valueOf())
{tds[i].className+=" today";}}}
vB_DatePicker.prototype.select_date=function(dateobj)
{this.selected_date=new Date(dateobj);if(dateobj.getMonth()!=this.current_month.getMonth()||dateobj.getFullYear()!=this.current_month.getFullYear())
{this.draw_date_cells(this.selected_date.getMonth()+1,this.selected_date.getFullYear());}
else
{this.apply_date_classes();}
this.set_input();}
vB_DatePicker.prototype.read_input=function()
{if(this.datestring)
{var new_date=Date.parse(this.datestring.value);}
else
{var new_date=new Date(0);new_date.setFullYear(parseInt(this.year_element.value),(parseInt(this.month_element.value)-1),parseInt(this.date_element.value)).valueOf();}
if(isNaN(new_date))
{if(this.selected_date)
{return this.selected_date;}
else
{return new Date();}}
else
{return new Date(new_date);}}
vB_DatePicker.prototype.set_input=function()
{if(this.datestring)
{this.datestring.value=this.monthnames[this.selected_date.getMonth()]+" "+this.selected_date.getDate()+" "+this.selected_date.getFullYear();}
else
{this.month_element.value=this.selected_date.getMonth()+1;this.date_element.value=this.selected_date.getDate();if(this.year_element.tagName=="SELECT")
{var new_year=this.selected_date.getFullYear();for(var i=0;i<this.year_element.options.length;i++)
{if(this.year_element.options[i].value==new_year)
{this.year_element.selectedIndex=i;return;}}
var opt=this.year_element.appendChild(document.createElement("option"));opt.value=new_year;opt.appendChild(document.createTextNode(new_year));this.year_element.selectedIndex=this.year_element.options.length-1;}
else
{this.year_element.value=this.selected_date.getFullYear();}}}
vB_DatePicker.prototype.open_popup=function()
{this.selected_date=this.read_input();this.select_date(this.selected_date);this.popup.style.display="block";if(is_ie)
{this.popup.style.top=this.button_sibling.offsetHeight+"px";}
else
{var offset=this.fetch_offset(this.button_sibling);this.popup.style.left=offset["left"]+"px";this.popup.style.top=(offset["top"]+this.button_sibling.offsetHeight)+"px";}
if(document.getElementsByTagName("html")[0].getAttribute("dir").toLowerCase()=="ltr")
{this.popup.style.left=((is_ie?0:parseInt(this.popup.style.left))+
parseInt(this.button_sibling.offsetWidth)+
parseInt(this.button.offsetWidth)-
parseInt(this.popup.offsetWidth))+"px";vBulletin.console("DatePicker LTR: %s",this.popup.style.left);}
else if(is_ie)
{this.popup.style.left=parseInt(this.button_sibling.offsetWidth)+parseInt(this.button.offsetWidth)+parseInt(this.popup.offsetWidth)*-1+"px";vBulletin.console("DatePicker RTL: %s",this.popup.style.left);}
else
{this.popup.style.left=parseInt(this.popup.style.left)-parseInt(this.button.offsetWidth)+"px";vBulletin.console("DatePicker RTL: %s",this.popup.style.left);}
this.popup_state=true;this.handle_overlaps(true);}
vB_DatePicker.prototype.close_popup=function()
{this.popup.style.display="none";this.popup_state=false;this.handle_overlaps(false);}
vB_DatePicker.prototype.toggle_calendar=function(e)
{YAHOO.util.Event.stopEvent(e);if(this.popup_state)
{this.close_popup();}
else
{this.open_popup();}}
vB_DatePicker.prototype.change_month=function(e)
{YAHOO.util.Event.stopEvent(e);this.draw_date_cells(this.current_month.getMonth()+YAHOO.util.Event.getTarget(e).increment+1,this.current_month.getFullYear());};vB_DatePicker.prototype.date_click=function(e)
{YAHOO.util.Event.stopEvent(e);this.select_date(YAHOO.util.Event.getTarget(e).dateobj);this.close_popup();this.button_sibling.focus();try{this.button_sibling.select();}catch(e){}}
vB_DatePicker.prototype.date_mouseover=function(e)
{var td=YAHOO.util.Event.getTarget(e);if(e.type=="mouseover")
{YAHOO.util.Dom.replaceClass(td,"page","alt2");}
else
{YAHOO.util.Dom.replaceClass(td,"alt2","page");}}
vB_DatePicker.prototype.set_today=function(e)
{this.select_date(this.today);}
vB_DatePicker.prototype.fetch_offset=function(obj)
{var left_offset=obj.offsetLeft;var top_offset=obj.offsetTop;var divcount=0;while((obj=obj.offsetParent)!=null)
{left_offset+=obj.offsetLeft;top_offset+=obj.offsetTop;}
return{"left":left_offset,"top":top_offset};};vB_DatePicker.prototype.overlaps=function(obj,m)
{var s=new Array();var pos=this.fetch_offset(obj);s['L']=pos['left'];s['T']=pos['top'];s['R']=s['L']+obj.offsetWidth;s['B']=s['T']+obj.offsetHeight;if(s['L']>m['R']||s['R']<m['L']||s['T']>m['B']||s['B']<m['T'])
{return false;}
return true;};vB_DatePicker.prototype.handle_overlaps=function(dohide)
{if(is_ie&&!is_ie7)
{var selects=fetch_tags(document,'select');if(dohide)
{var pos=this.fetch_offset(this.popup);var menuarea=new Array();menuarea={'L':pos['left'],'R':pos['left']+this.popup.offsetWidth,'T':pos['top'],'B':pos['top']+this.popup.offsetHeight};for(var i=0;i<selects.length;i++)
{if(this.overlaps(selects[i],menuarea)&&this.month_element&&selects[i].id!=this.month_element.id)
{selects[i].style.visibility='hidden';array_push(this.hidden_selects,i);}}}
else
{while(true)
{var i=array_pop(this.hidden_selects);if(typeof i=='undefined'||i==null)
{break;}
else
{selects[i].style.visibility='visible';}}}}};                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    vbulletin_global.js                                                                                 0000755 0000000 0000000 00000054371 11041160147 013446  0                                                                                                    ustar   root                            root                                                                                                                                                                                                                   if(typeof(SESSIONURL)=="undefined")
{var SESSIONURL="";}
if(typeof(vbphrase)=="undefined")
{var 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_ie7=((is_ie)&&(userAgent.indexOf('msie 7.')!=-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;}
if('1234'.substr(-2,2)=='12')
{String.prototype.substr_orig=String.prototype.substr;String.prototype.substr=function(start,length)
{return this.substr_orig((start<0?this.length+start:start),length);};}
function array_pop(a)
{if(typeof a!='object'||!a.length)
{return null;}
else
{var response=a[a.length-1];a.length--;return response;}}
if(typeof Array.prototype.shift==='undefined')
{Array.prototype.shift=function()
{for(var i=0,b=this[0],l=this.length-1;i<l;i++)
{this[i]=this[i+1];}
this.length--;return b;};}
function array_push(a,values)
{for(var i=1;i<arguments.length;i++)
{a[a.length]=arguments[i];}
return a.length;}
function fetch_object(idname)
{if(document.getElementById)
{return document.getElementById(idname);}
else if(document.all)
{return document.all[idname];}
else if(document.layers)
{return document.layers[idname];}
else
{return null;}}
function fetch_tags(parentobj,tag)
{if(parentobj==null)
{return new Array();}
else if(typeof parentobj.getElementsByTagName!='undefined')
{return parentobj.getElementsByTagName(tag);}
else if(parentobj.all&&parentobj.all.tags)
{return parentobj.all.tags(tag);}
else
{return new Array();}}
function fetch_tag_count(parentobj,tag)
{return fetch_tags(parentobj,tag).length;}
function do_an_e(eventobj)
{if(!eventobj||is_ie)
{window.event.returnValue=false;window.event.cancelBubble=true;return window.event;}
else
{eventobj.stopPropagation();eventobj.preventDefault();return eventobj;}}
function e_by_gum(eventobj)
{if(!eventobj||is_ie)
{window.event.cancelBubble=true;return window.event;}
else
{if(eventobj.target.type=='submit')
{eventobj.target.form.submit();}
eventobj.stopPropagation();return eventobj;}}
function validatemessage(messagetext,subjecttext,minchars)
{if(is_kon||is_saf||is_webtv)
{return true;}
else if(subjecttext.length<1)
{alert(vbphrase['must_enter_subject']);return false;}
else
{var stripped=PHP.trim(stripcode(messagetext,false,ignorequotechars));if(stripped.length<minchars)
{alert(construct_phrase(vbphrase['message_too_short'],minchars));return false;}
else if(typeof(document.forms.vbform)!='undefined'&&typeof(document.forms.vbform.imagestamp)!='undefined')
{document.forms.vbform.imagestamp.failed=false;if(document.forms.vbform.imagestamp.value.length!=6)
{alert(vbphrase['complete_image_verification']);document.forms.vbform.imagestamp.failed=true;document.forms.vbform.imagestamp.focus();return false;}
else
{return true;}}
else
{return true;}}}
function stripcode(str,ishtml,stripquotes)
{if(!is_regexp)
{return str;}
if(stripquotes)
{var start_time=new Date().getTime();while((startindex=PHP.stripos(str,'[quote'))!==false)
{if(new Date().getTime()-start_time>2000)
{break;}
if((stopindex=PHP.stripos(str,'[/quote]'))!==false)
{fragment=str.substr(startindex,stopindex-startindex+8);str=str.replace(fragment,'');}
else
{break;}
str=PHP.trim(str);}}
if(ishtml)
{str=str.replace(/<img[^>]+src="([^"]+)"[^>]*>/gi,'$1');var html1=new RegExp("<(\\w+)[^>]*>",'gi');var html2=new RegExp("<\\/\\w+>",'gi');str=str.replace(html1,'');str=str.replace(html2,'');var html3=new RegExp('(&nbsp;)','gi');str=str.replace(html3,' ');}
else
{var bbcode1=new RegExp("\\[(\\w+)[^\\]]*\\]",'gi');var bbcode2=new RegExp("\\[\\/(\\w+)\\]",'gi');str=str.replace(bbcode1,'');str=str.replace(bbcode2,'');}
return str;}
function vB_PHP_Emulator()
{}
vB_PHP_Emulator.prototype.stripos=function(haystack,needle,offset)
{if(typeof offset=='undefined')
{offset=0;}
index=haystack.toLowerCase().indexOf(needle.toLowerCase(),offset);return(index==-1?false:index);}
vB_PHP_Emulator.prototype.ltrim=function(str)
{return str.replace(/^\s+/g,'');}
vB_PHP_Emulator.prototype.rtrim=function(str)
{return str.replace(/(\s+)$/g,'');}
vB_PHP_Emulator.prototype.trim=function(str)
{return this.ltrim(this.rtrim(str));}
vB_PHP_Emulator.prototype.preg_quote=function(str)
{return str.replace(/(\+|\{|\}|\(|\)|\[|\]|\||\/|\?|\^|\$|\\|\.|\=|\!|\<|\>|\:|\*)/g,"\\$1");}
vB_PHP_Emulator.prototype.match_all=function(string,regex)
{var gmatch=string.match(RegExp(regex,"gim"));if(gmatch)
{var matches=new Array();var iregex=new RegExp(regex,"im");for(var i=0;i<gmatch.length;i++)
{matches[matches.length]=gmatch[i].match(iregex);}
return matches;}
else
{return false;}}
vB_PHP_Emulator.prototype.unhtmlspecialchars=function(str)
{f=new Array(/&lt;/g,/&gt;/g,/&quot;/g,/&amp;/g);r=new Array('<','>','"','&');for(var i in f)
{str=str.replace(f[i],r[i]);}
return str;}
vB_PHP_Emulator.prototype.unescape_cdata=function(str)
{var r1=/<\=\!\=\[\=C\=D\=A\=T\=A\=\[/g;var r2=/\]\=\]\=>/g;return str.replace(r1,'<![CDATA[').replace(r2,']]>');}
vB_PHP_Emulator.prototype.htmlspecialchars=function(str)
{var f=new Array((is_mac&&is_ie?new RegExp('&','g'):new RegExp('&(?!#[0-9]+;)','g')),new RegExp('<','g'),new RegExp('>','g'),new RegExp('"','g'));var r=new Array('&amp;','&lt;','&gt;','&quot;');for(var i=0;i<f.length;i++)
{str=str.replace(f[i],r[i]);}
return str;}
vB_PHP_Emulator.prototype.in_array=function(ineedle,haystack,caseinsensitive)
{var needle=new String(ineedle);if(caseinsensitive)
{needle=needle.toLowerCase();for(var i in haystack)
{if(haystack[i].toLowerCase()==needle)
{return i;}}}
else
{for(var i in haystack)
{if(haystack[i]==needle)
{return i;}}}
return-1;}
vB_PHP_Emulator.prototype.str_pad=function(text,length,padstring)
{text=new String(text);padstring=new String(padstring);if(text.length<length)
{padtext=new String(padstring);while(padtext.length<(length-text.length))
{padtext+=padstring;}
text=padtext.substr(0,(length-text.length))+text;}
return text;}
vB_PHP_Emulator.prototype.urlencode=function(text)
{text=escape(text.toString()).replace(/\+/g,"%2B");var matches=text.match(/(%([0-9A-F]{2}))/gi);if(matches)
{for(var matchid=0;matchid<matches.length;matchid++)
{var code=matches[matchid].substring(1,3);if(parseInt(code,16)>=128)
{text=text.replace(matches[matchid],'%u00'+code);}}}
text=text.replace('%25','%u0025');return text;}
vB_PHP_Emulator.prototype.ucfirst=function(str,cutoff)
{if(typeof cutoff!='undefined')
{var cutpos=str.indexOf(cutoff);if(cutpos>0)
{str=str.substr(0,cutpos);}}
str=str.split(' ');for(var i=0;i<str.length;i++)
{str[i]=str[i].substr(0,1).toUpperCase()+str[i].substr(1);}
return str.join(' ');}
var PHP=new vB_PHP_Emulator();function vB_AJAX_Handler(async)
{this.async=async?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 A"+"ctiv"+"eX"+"Ob"+"ject('Micr"+"osoft.XM"+"LHTTP');");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(e)
{try{var tester=new XMLHttpRequest();return tester.setRequestHeader?true:false;}
catch(e){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(event)
{if(!this.handler)
{if(!this.init())
{return false;}}
if(typeof event=='function')
{this.handler.onreadystatechange=event;}
else
{alert('XML Sender OnReadyState event is not a function');}
return false;}
vB_AJAX_Handler.prototype.send=function(desturl,datastream)
{if(!this.handler)
{if(!this.init())
{return false;}}
if(!this.not_ready())
{this.handler.open('POST',desturl,this.async);this.handler.setRequestHeader('Content-Type','application/x-www-form-urlencoded');this.handler.send(datastream+'&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(xml_node)
{if(xml_node&&xml_node.firstChild&&xml_node.firstChild.nodeValue)
{return PHP.unescape_cdata(xml_node.firstChild.nodeValue);}
else
{return'';}}
var AJAX_Compatible=vB_AJAX_Handler.prototype.is_compatible();function vB_Hidden_Form(script)
{this.action=script;this.variables=new Array();}
vB_Hidden_Form.prototype.add_variable=function(name,value)
{this.variables[this.variables.length]=new Array(name,value);};vB_Hidden_Form.prototype.add_variables_from_object=function(obj)
{var inputs=fetch_tags(obj,'input');for(var i=0;i<inputs.length;i++)
{switch(inputs[i].type)
{case'checkbox':case'radio':if(inputs[i].checked)
{this.add_variable(inputs[i].name,inputs[i].value);}
break;case'text':case'hidden':case'password':this.add_variable(inputs[i].name,inputs[i].value);break;default:continue;}}
var textareas=fetch_tags(obj,'textarea');for(var i=0;i<textareas.length;i++)
{this.add_variable(textareas[i].name,textareas[i].value);}
var selects=fetch_tags(obj,'select');for(var i=0;i<selects.length;i++)
{if(selects[i].multiple)
{for(var j=0;j<selects[i].options.length;j++)
{if(selects[i].options[j].selected)
{this.add_variable(selects[i].name,selects[i].options[j].value);}}}
else
{this.add_variable(selects[i].name,selects[i].options[selects[i].selectedIndex].value);}}};vB_Hidden_Form.prototype.fetch_variable=function(varname)
{for(var i=0;i<this.variables.length;i++)
{if(this.variables[i][0]==varname)
{return this.variables[i][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 i=0;i<this.variables.length;i++)
{var inputobj=document.createElement('input');inputobj.type='hidden';inputobj.name=this.variables[i][0];inputobj.value=this.variables[i][1];this.form.appendChild(inputobj);}
document.body.appendChild(this.form).submit();};vB_Hidden_Form.prototype.build_query_string=function()
{var query_string='';for(var i=0;i<this.variables.length;i++)
{query_string+=this.variables[i][0]+'='+PHP.urlencode(this.variables[i][1])+'&';}
return query_string;}
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(url,width,height,windowid)
{return window.open(url,(typeof windowid=='undefined'?'vBPopup':windowid),'statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes'
+(typeof width!='undefined'?(',width='+width):'')+(typeof height!='undefined'?(',height='+height):''));}
function js_open_help(scriptname,actiontype,optionval)
{return openWindow('help.php?s='+SESSIONHASH+'&do=answer&page='+scriptname+'&pageaction='+actiontype+'&option='+optionval,600,450,'helpwindow');}
function attachments(threadid)
{return openWindow('misc.php?'+SESSIONURL+'do=showattachments&t='+threadid,480,300);}
function who(threadid)
{return openWindow('misc.php?'+SESSIONURL+'do=whoposted&t='+threadid,230,300);}
function imwindow(imtype,userid,width,height)
{return openWindow('sendmessage.php?'+SESSIONURL+'do=im&type='+imtype+'&u='+userid,width,height);}
function SendMSNMessage(name)
{if(!is_ie)
{alert(vbphrase['msn_functions_only_work_in_ie']);return false;}
else
{MsgrObj.InstantMessage(name);return false;}}
function AddMSNContact(name)
{if(!is_ie)
{alert(vbphrase['msn_functions_only_work_in_ie']);return false;}
else
{MsgrObj.AddContact(0,name);return false;}}
function detect_caps_lock(e)
{e=(e?e:window.event);var keycode=(e.which?e.which:(e.keyCode?e.keyCode:(e.charCode?e.charCode:0)));var shifted=(e.shiftKey||(e.modifiers&&(e.modifiers&4)));var ctrled=(e.ctrlKey||(e.modifiers&&(e.modifiers&2)));return(keycode>=65&&keycode<=90&&!shifted&&!ctrled)||(keycode>=97&&keycode<=122&&shifted);}
function log_out(confirmation_message)
{var ht=document.getElementsByTagName("html")[0];ht.style.filter="progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)";if(confirm(confirmation_message))
{return true;}
else
{ht.style.filter="";return false;}}
function set_cookie(name,value,expires)
{document.cookie=name+'='+escape(value)+'; path=/'+(typeof expires!='undefined'?'; expires='+expires.toGMTString():'');}
function delete_cookie(name)
{document.cookie=name+'='+'; expires=Thu, 01-Jan-70 00:00:01 GMT'+'; path=/';}
function fetch_cookie(name)
{cookie_name=name+'=';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 value_end=document.cookie.indexOf(';',value_begin);if(value_end==-1)
{value_end=cookie_length;}
return unescape(document.cookie.substring(value_begin,value_end));}
cookie_begin=document.cookie.indexOf(' ',cookie_begin)+1;if(cookie_begin==0)
{break;}}
return null;}
function js_toggle_all(formobj,formtype,option,exclude,setto)
{for(var i=0;i<formobj.elements.length;i++)
{var elm=formobj.elements[i];if(elm.type==formtype&&PHP.in_array(elm.name,exclude,false)==-1)
{switch(formtype)
{case'radio':if(elm.value==option)
{elm.checked=setto;}
break;case'select-one':elm.selectedIndex=setto;break;default:elm.checked=setto;break;}}}}
function js_select_all(formobj)
{exclude=new Array();exclude[0]='selectall';js_toggle_all(formobj,'select-one','',exclude,formobj.selectall.selectedIndex);}
function js_check_all(formobj)
{exclude=new Array();exclude[0]='keepattachments';exclude[1]='allbox';exclude[2]='removeall';js_toggle_all(formobj,'checkbox','',exclude,formobj.allbox.checked);}
function js_check_all_option(formobj,option)
{exclude=new Array();exclude[0]='useusergroup';js_toggle_all(formobj,'radio',option,exclude,true);}
function checkall(formobj){js_check_all(formobj);}
function checkall_option(formobj,option){js_check_all_option(formobj,option);}
function resize_textarea(to,id)
{if(to<0)
{var rows=-5;var cols=-10;}
else
{var rows=5;var cols=10;}
var textarea=fetch_object(id);if(typeof textarea.orig_rows=='undefined')
{textarea.orig_rows=textarea.rows;textarea.orig_cols=textarea.cols;}
var newrows=textarea.rows+rows;var newcols=textarea.cols+cols;if(newrows>=textarea.orig_rows&&newcols>=textarea.orig_cols)
{textarea.rows=newrows;textarea.cols=newcols;}
return false;}
function toggle_collapse(objid)
{if(!is_regexp)
{return false;}
obj=fetch_object('collapseobj_'+objid);img=fetch_object('collapseimg_'+objid);cel=fetch_object('collapsecel_'+objid);if(!obj)
{if(img)
{img.style.display='none';}
return false;}
if(obj.style.display=='none')
{obj.style.display='';save_collapsed(objid,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(objid,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(objid,addcollapsed)
{var collapsed=fetch_cookie('vbulletin_collapse');var tmp=new Array();if(collapsed!=null)
{collapsed=collapsed.split('\n');for(var i in collapsed)
{if(collapsed[i]!=objid&&collapsed[i]!='')
{tmp[tmp.length]=collapsed[i];}}}
if(addcollapsed)
{tmp[tmp.length]=objid;}
expires=new Date();expires.setTime(expires.getTime()+(1000*86400*365));set_cookie('vbulletin_collapse',tmp.join('\n'),expires);}
function vBpagenav()
{}
vBpagenav.prototype.controlobj_onclick=function(e)
{this._onclick(e);var inputs=fetch_tags(this.menu.menuobj,'input');for(var i=0;i<inputs.length;i++)
{if(inputs[i].type=='text')
{inputs[i].focus();break;}}};vBpagenav.prototype.form_gotopage=function(e)
{if((pagenum=parseInt(fetch_object('pagenav_itxt').value,10))>0)
{window.location=this.addr+'&page='+pagenum;}
return false;};vBpagenav.prototype.ibtn_onclick=function(e)
{return this.form.gotopage();};vBpagenav.prototype.itxt_onkeypress=function(e)
{return((e?e:window.event).keyCode==13?this.form.gotopage():true);};function vbmenu_register(controlid,noimage,datefield)
{if(typeof(vBmenu)=="object")
{return vBmenu.register(controlid,noimage);}
else
{return false;}}
function set_unselectable(obj)
{if(!is_ie4&&typeof obj.tagName!='undefined')
{if(obj.hasChildNodes())
{for(var i=0;i<obj.childNodes.length;i++)
{set_unselectable(obj.childNodes[i]);}}
obj.unselectable='on';}}
function fetch_sessionhash()
{return(SESSIONURL==''?'':SESSIONURL.substr(2,32));}
function construct_phrase()
{if(!arguments||arguments.length<1||!is_regexp)
{return false;}
var args=arguments;var str=args[0];var re;for(var i=1;i<args.length;i++)
{re=new RegExp("%"+i+"\\$s",'gi');str=str.replace(re,args[i]);}
return str;}
function switch_id(selectobj,type)
{var id=selectobj.options[selectobj.selectedIndex].value;if(id=='')
{return;}
var url=new String(window.location);var fragment=new String('');url=url.split('#');if(url[1])
{fragment='#'+url[1];}
url=url[0];if(url.indexOf(type+'id=')!=-1&&is_regexp)
{re=new RegExp(type+"id=\\d+&?");url=url.replace(re,'');}
if(url.indexOf('?')==-1)
{url+='?';}
else
{lastchar=url.substr(url.length-1);if(lastchar!='&'&&lastchar!='?')
{url+='&';}}
window.location=url+type+'id='+id+fragment;}
function img_alt_2_title(img)
{if(!img.title&&img.alt!='')
{img.title=img.alt;}}
function PostBit_Init(obj,postid)
{if(typeof vBmenu!='undefined')
{var divs=fetch_tags(obj,'div');for(var i=0;i<divs.length;i++)
{if(divs[i].id&&divs[i].id.substr(0,9)=='postmenu_')
{vBmenu.register(divs[i].id,true);}}}
if(typeof vB_QuickEditor!='undefined')
{vB_AJAX_QuickEdit_Init(obj);}
if(typeof vB_QuickReply!='undefined')
{qr_init_buttons(obj);}
if(typeof mq_init!='undefined')
{mq_init(obj);}
if(typeof vBrep!='undefined')
{if(typeof postid!='undefined'&&typeof postid!='null')
{vbrep_register(postid);}}
if(typeof inlineMod!='undefined')
{im_init(obj);}}
function vBulletin_init()
{if(is_webtv)
{return false;}
var imgs=fetch_tags(document,'img');for(var i=0;i<imgs.length;i++)
{img_alt_2_title(imgs[i]);}
if(typeof vBmenu=='object')
{if(typeof(YAHOO)!="undefined")
{YAHOO.util.Event.on(document,"click",vbmenu_hide);YAHOO.util.Event.on(window,"resize",vbmenu_hide);}
else 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 pagenavs=fetch_tags(document,'td');for(var n=0;n<pagenavs.length;n++)
{if(pagenavs[n].hasChildNodes()&&pagenavs[n].firstChild.name&&pagenavs[n].firstChild.name.indexOf('PageNav')!=-1)
{var addr=pagenavs[n].title;pagenavs[n].title='';pagenavs[n].innerHTML='';pagenavs[n].id='pagenav.'+n;var pn=vBmenu.register(pagenavs[n].id);if(is_saf)
{pn.controlobj._onclick=pn.controlobj.onclick;pn.controlobj.onclick=vBpagenav.prototype.controlobj_onclick;}}}
if(typeof addr!='undefined')
{fetch_object('pagenav_form').addr=addr;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);}
vBulletin.init();return true;}
if(!console)
{var console=function(){var moo=1+1;};console.log=function(str){var moo=1+1;};}
function vBulletin_Framework()
{this.elements=new Array();this.ajaxurls=new Array();this.events=new Array();this.regexp="(^|[^a-z0-9_])([a-z0-9_]+)\\[([^\\]]*)\\]";this.add_event("systemInit");this.time=new Date();}
vBulletin_Framework.prototype.init=function()
{this.find_elements(document.getElementsByTagName("body")[0]);this.events.systemInit.fire();}
vBulletin_Framework.prototype.extend=function(subClass,baseClass)
{function inheritance(){}
inheritance.prototype=baseClass.prototype;subClass.prototype=new inheritance();subClass.prototype.constructor=subClass;subClass.baseConstructor=baseClass;subClass.superClass=baseClass.prototype;}
vBulletin_Framework.prototype.find_elements=function(parent)
{for(var i=0;i<parent.childNodes.length;i++)
{var element=parent.childNodes[i];if(element.className)
{var classmatch=PHP.match_all(element.className,this.regexp);if(classmatch)
{this.register_element(element,classmatch);}}
if(parent.childNodes[i].hasChildNodes())
{this.find_elements(parent.childNodes[i]);}}}
vBulletin_Framework.prototype.register_element=function(element,classmatch)
{for(var i=0;i<classmatch.length;i++)
{if(!this.elements[classmatch[i][2]])
{this.elements[classmatch[i][2]]=new Array();}
this.elements[classmatch[i][2]][this.elements[classmatch[i][2]].length]=new Array(element,classmatch[i][3]);}}
vBulletin_Framework.prototype.register_ajax_urls=function(fetch,save,elements)
{var fetch=fetch.split("?");fetch[1]=SESSIONURL+"ajax=1&"+fetch[1].replace(/\{(\d+)(:\w+)?\}/gi,'%$1$s');var save=save.split("?");save[1]=SESSIONURL+"ajax=1&"+save[1].replace(/\{(\d+)(:\w+)?\}/gi,'%$1$s');for(var i=0;i<elements.length;i++)
{this.ajaxurls[elements[i]]=new Array(fetch,save);}}
vBulletin_Framework.prototype.add_event=function(eventname)
{this.events[eventname]=(typeof YAHOO!='undefined'?new YAHOO.util.CustomEvent(eventname):new null_event());}
vBulletin_Framework.prototype.console=function()
{if(is_moz&&console)
{var args=new Array();for(var i=0;i<arguments.length;i++)
{args[args.length]=arguments[i];}
try
{eval("console.log('"+args.join("','")+"');");}
catch(e){}}}
if(typeof YAHOO=='undefined')
{function null_event()
{this.fire=function(){};this.subscribe=function(){};};}
vBulletin=new vBulletin_Framework();
                                                                                                                                                                                                                                                                       vbulletin_inlinemod.js                                                                              0000755 0000000 0000000 00000010246 11040715777 014173  0                                                                                                    ustar   root                            root                                                                                                                                                                                                                   
function vB_Inline_Mod(varname,type,formobjid,go_phrase,cookieprefix)
{this.varname=varname;this.type=type.toLowerCase();this.formobj=fetch_object(formobjid);this.go_phrase=go_phrase;if(typeof cookieprefix!='undefined')
{this.cookieprefix=cookieprefix;}
else
{this.cookieprefix='vbulletin_inline';}
if(this.type=='thread')
{this.list='tlist_';}
else if(this.type=='post')
{this.list='plist_';}
else
{this.list=this.type+'list_';}
this.cookie_ids=null;this.cookie_array=new Array();this.init=function(elements)
{for(i=0;i<elements.length;i++)
{if(this.is_in_list(elements[i]))
{elements[i].inlineModID=this.varname;elements[i].onclick=inlinemod_checkbox_onclick;}}
this.cookie_array=new Array();if(this.fetch_ids())
{for(i in this.cookie_ids)
{if(this.cookie_ids[i]!='')
{if(checkbox=fetch_object(this.list+this.cookie_ids[i]))
{checkbox.checked=true;eval('this.highlight_'+this.type+'(checkbox)');}
this.cookie_array[this.cookie_array.length]=this.cookie_ids[i];}}}
this.set_output_counters();}
this.fetch_ids=function()
{this.cookie_ids=fetch_cookie(this.cookieprefix+this.type);if(this.cookie_ids!=null&&this.cookie_ids!='')
{this.cookie_ids=this.cookie_ids.split('-');if(this.cookie_ids.length>0)
{return true;}}
return false;}
this.toggle=function(checkbox)
{eval('this.highlight_'+this.type+'(checkbox)');this.save(checkbox.id.substring(this.list.length),checkbox.checked);}
this.save=function(checkboxid,checked)
{this.cookie_array=new Array();if(this.fetch_ids())
{for(i in this.cookie_ids)
{if(this.cookie_ids[i]!=checkboxid&&this.cookie_ids[i]!='')
{this.cookie_array[this.cookie_array.length]=this.cookie_ids[i];}}}
if(checked)
{this.cookie_array[this.cookie_array.length]=checkboxid;}
this.set_output_counters();this.set_cookie();return true;}
this.set_cookie=function()
{expires=new Date();expires.setTime(expires.getTime()+3600000);set_cookie(this.cookieprefix+this.type,this.cookie_array.join('-'),expires);}
this.check_all=function(checked,itemtype,caller)
{if(typeof checked=='undefined')
{checked=this.formobj.allbox.checked;}
this.cookie_array=new Array();if(this.fetch_ids())
{for(i in this.cookie_ids)
{if(!fetch_object(this.list+this.cookie_ids[i]))
{this.cookie_array[this.cookie_array.length]=this.cookie_ids[i]}}}
counter=0;for(var i=0;i<this.formobj.elements.length;i++)
{if(this.is_in_list(this.formobj.elements[i]))
{elm=this.formobj.elements[i];if(typeof itemtype!='undefined')
{if(elm.value&itemtype)
{elm.checked=checked;}
else
{elm.checked=!checked;}}
else if(checked=='invert')
{elm.checked=!elm.checked;}
else
{elm.checked=checked;}
eval('this.highlight_'+this.type+'(elm)');if(elm.checked)
{this.cookie_array[this.cookie_array.length]=elm.id.substring(this.list.length)}}}
this.set_output_counters();this.set_cookie();return true;}
this.is_in_list=function(obj)
{return(obj.type=='checkbox'&&obj.id.indexOf(this.list)==0&&(obj.disabled==false||obj.disabled=='undefined'));}
this.set_output_counters=function()
{if(this.type=='thread'||this.type=='post')
{var gobutton='inlinego';}
else
{var gobutton=this.type+'_inlinego';}
if(obj=fetch_object(gobutton))
{obj.value=construct_phrase(this.go_phrase,this.cookie_array.length);}}
this.toggle_highlight=function(cell,checkbox)
{if(cell.className=='alt1'||cell.className=='alt2'||cell.className=='inlinemod')
{if(checkbox.checked)
{if(!cell.oclassName)
{cell.oclassName=cell.className;}
cell.className='inlinemod';}
else if(cell.oclassName)
{cell.className=cell.oclassName;}}}
this.highlight_thread=function(checkbox)
{tobj=checkbox;while(tobj.tagName!='TR')
{if(tobj.parentNode.tagName=='HTML')
{break;}
else
{tobj=tobj.parentNode;}}
if(tobj.tagName=='TR')
{tds=tobj.childNodes;for(var i=0;i<tds.length;i++)
{this.toggle_highlight(tds[i],checkbox);}}}
this.highlight_post=function(checkbox)
{if(table=fetch_object('post'+checkbox.id.substr(6)))
{tds=fetch_tags(table,'td');for(var i=0;i<tds.length;i++)
{this.toggle_highlight(tds[i],checkbox);}}}
this.init(this.formobj.elements);}
function inlinemod_checkbox_onclick(e)
{var inlineModObj=eval(this.inlineModID);inlineModObj.toggle(this);};function im_init(obj,inlineobj)
{var inputs=fetch_tags(obj,'input');if(typeof inlineobj=='object'&&typeof inlineobj.init=='function')
{inlineobj.init(inputs);}
else
{inlineMod.init(inputs);}}                                                                                                                                                                                                                                                                                                                                                          vbulletin_md5.js                                                                                    0000755 0000000 0000000 00000013622 11040715777 012703  0                                                                                                    ustar   root                            root                                                                                                                                                                                                                   
var hexcase=0;var b64pad="";var chrsz=8;function hex_md5(s){return binl2hex(core_md5(str2binl(s),s.length*chrsz));}
function b64_md5(s){return binl2b64(core_md5(str2binl(s),s.length*chrsz));}
function str_md5(s){return binl2str(core_md5(str2binl(s),s.length*chrsz));}
function hex_hmac_md5(key,data){return binl2hex(core_hmac_md5(key,data));}
function b64_hmac_md5(key,data){return binl2b64(core_hmac_md5(key,data));}
function str_hmac_md5(key,data){return binl2str(core_hmac_md5(key,data));}
function core_md5(x,len)
{x[len>>5]|=0x80<<((len)%32);x[(((len+64)>>>9)<<4)+14]=len;var a=1732584193;var b=-271733879;var c=-1732584194;var d=271733878;for(var i=0;i<x.length;i+=16)
{var olda=a;var oldb=b;var oldc=c;var oldd=d;a=md5_ff(a,b,c,d,x[i+0],7,-680876936);d=md5_ff(d,a,b,c,x[i+1],12,-389564586);c=md5_ff(c,d,a,b,x[i+2],17,606105819);b=md5_ff(b,c,d,a,x[i+3],22,-1044525330);a=md5_ff(a,b,c,d,x[i+4],7,-176418897);d=md5_ff(d,a,b,c,x[i+5],12,1200080426);c=md5_ff(c,d,a,b,x[i+6],17,-1473231341);b=md5_ff(b,c,d,a,x[i+7],22,-45705983);a=md5_ff(a,b,c,d,x[i+8],7,1770035416);d=md5_ff(d,a,b,c,x[i+9],12,-1958414417);c=md5_ff(c,d,a,b,x[i+10],17,-42063);b=md5_ff(b,c,d,a,x[i+11],22,-1990404162);a=md5_ff(a,b,c,d,x[i+12],7,1804603682);d=md5_ff(d,a,b,c,x[i+13],12,-40341101);c=md5_ff(c,d,a,b,x[i+14],17,-1502002290);b=md5_ff(b,c,d,a,x[i+15],22,1236535329);a=md5_gg(a,b,c,d,x[i+1],5,-165796510);d=md5_gg(d,a,b,c,x[i+6],9,-1069501632);c=md5_gg(c,d,a,b,x[i+11],14,643717713);b=md5_gg(b,c,d,a,x[i+0],20,-373897302);a=md5_gg(a,b,c,d,x[i+5],5,-701558691);d=md5_gg(d,a,b,c,x[i+10],9,38016083);c=md5_gg(c,d,a,b,x[i+15],14,-660478335);b=md5_gg(b,c,d,a,x[i+4],20,-405537848);a=md5_gg(a,b,c,d,x[i+9],5,568446438);d=md5_gg(d,a,b,c,x[i+14],9,-1019803690);c=md5_gg(c,d,a,b,x[i+3],14,-187363961);b=md5_gg(b,c,d,a,x[i+8],20,1163531501);a=md5_gg(a,b,c,d,x[i+13],5,-1444681467);d=md5_gg(d,a,b,c,x[i+2],9,-51403784);c=md5_gg(c,d,a,b,x[i+7],14,1735328473);b=md5_gg(b,c,d,a,x[i+12],20,-1926607734);a=md5_hh(a,b,c,d,x[i+5],4,-378558);d=md5_hh(d,a,b,c,x[i+8],11,-2022574463);c=md5_hh(c,d,a,b,x[i+11],16,1839030562);b=md5_hh(b,c,d,a,x[i+14],23,-35309556);a=md5_hh(a,b,c,d,x[i+1],4,-1530992060);d=md5_hh(d,a,b,c,x[i+4],11,1272893353);c=md5_hh(c,d,a,b,x[i+7],16,-155497632);b=md5_hh(b,c,d,a,x[i+10],23,-1094730640);a=md5_hh(a,b,c,d,x[i+13],4,681279174);d=md5_hh(d,a,b,c,x[i+0],11,-358537222);c=md5_hh(c,d,a,b,x[i+3],16,-722521979);b=md5_hh(b,c,d,a,x[i+6],23,76029189);a=md5_hh(a,b,c,d,x[i+9],4,-640364487);d=md5_hh(d,a,b,c,x[i+12],11,-421815835);c=md5_hh(c,d,a,b,x[i+15],16,530742520);b=md5_hh(b,c,d,a,x[i+2],23,-995338651);a=md5_ii(a,b,c,d,x[i+0],6,-198630844);d=md5_ii(d,a,b,c,x[i+7],10,1126891415);c=md5_ii(c,d,a,b,x[i+14],15,-1416354905);b=md5_ii(b,c,d,a,x[i+5],21,-57434055);a=md5_ii(a,b,c,d,x[i+12],6,1700485571);d=md5_ii(d,a,b,c,x[i+3],10,-1894986606);c=md5_ii(c,d,a,b,x[i+10],15,-1051523);b=md5_ii(b,c,d,a,x[i+1],21,-2054922799);a=md5_ii(a,b,c,d,x[i+8],6,1873313359);d=md5_ii(d,a,b,c,x[i+15],10,-30611744);c=md5_ii(c,d,a,b,x[i+6],15,-1560198380);b=md5_ii(b,c,d,a,x[i+13],21,1309151649);a=md5_ii(a,b,c,d,x[i+4],6,-145523070);d=md5_ii(d,a,b,c,x[i+11],10,-1120210379);c=md5_ii(c,d,a,b,x[i+2],15,718787259);b=md5_ii(b,c,d,a,x[i+9],21,-343485551);a=safe_add(a,olda);b=safe_add(b,oldb);c=safe_add(c,oldc);d=safe_add(d,oldd);}
return Array(a,b,c,d);}
function md5_cmn(q,a,b,x,s,t)
{return safe_add(bit_rol(safe_add(safe_add(a,q),safe_add(x,t)),s),b);}
function md5_ff(a,b,c,d,x,s,t)
{return md5_cmn((b&c)|((~b)&d),a,b,x,s,t);}
function md5_gg(a,b,c,d,x,s,t)
{return md5_cmn((b&d)|(c&(~d)),a,b,x,s,t);}
function md5_hh(a,b,c,d,x,s,t)
{return md5_cmn(b^c^d,a,b,x,s,t);}
function md5_ii(a,b,c,d,x,s,t)
{return md5_cmn(c^(b|(~d)),a,b,x,s,t);}
function core_hmac_md5(key,data)
{var bkey=str2binl(key);if(bkey.length>16)bkey=core_md5(bkey,key.length*chrsz);var ipad=Array(16),opad=Array(16);for(var i=0;i<16;i++)
{ipad[i]=bkey[i]^0x36363636;opad[i]=bkey[i]^0x5C5C5C5C;}
var hash=core_md5(ipad.concat(str2binl(data)),512+data.length*chrsz);return core_md5(opad.concat(hash),512+128);}
function safe_add(x,y)
{var lsw=(x&0xFFFF)+(y&0xFFFF);var msw=(x>>16)+(y>>16)+(lsw>>16);return(msw<<16)|(lsw&0xFFFF);}
function bit_rol(num,cnt)
{return(num<<cnt)|(num>>>(32-cnt));}
function str2binl(str)
{var bin=new Array();var mask=(1<<chrsz)-1;for(var i=0;i<str.length*chrsz;i+=chrsz)
bin[i>>5]|=(str.charCodeAt(i/chrsz)&mask)<<(i%32);return bin;}
function binl2str(bin)
{var str="";var mask=(1<<chrsz)-1;for(var i=0;i<bin.length*32;i+=chrsz)
str+=String.fromCharCode((bin[i>>5]>>>(i%32))&mask);return str;}
function binl2hex(binarray)
{var hex_tab=hexcase?"0123456789ABCDEF":"0123456789abcdef";var str="";for(var i=0;i<binarray.length*4;i++)
{str+=hex_tab.charAt((binarray[i>>2]>>((i%4)*8+4))&0xF)+
hex_tab.charAt((binarray[i>>2]>>((i%4)*8))&0xF);}
return str;}
function binl2b64(binarray)
{var tab="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var str="";for(var i=0;i<binarray.length*4;i+=3)
{var triplet=(((binarray[i>>2]>>8*(i%4))&0xFF)<<16)|(((binarray[i+1>>2]>>8*((i+1)%4))&0xFF)<<8)|((binarray[i+2>>2]>>8*((i+2)%4))&0xFF);for(var j=0;j<4;j++)
{if(i*8+j*6>binarray.length*32)str+=b64pad;else str+=tab.charAt((triplet>>6*(3-j))&0x3F);}}
return str;}
function str_to_ent(str)
{var result='';var i;for(i=0;i<str.length;i++)
{var c=str.charCodeAt(i);var tmp='';if(c>255)
{while(c>=1)
{tmp="0123456789".charAt(c%10)+tmp;c=c/10;}
if(tmp=='')
{tmp="0";}
tmp="#"+tmp;tmp="&"+tmp;tmp=tmp+";";result+=tmp;}
else
{result+=str.charAt(i);}}
return result;}
function trim(s)
{while(s.substring(0,1)==' ')
{s=s.substring(1,s.length);}
while(s.substring(s.length-1,s.length)==' ')
{s=s.substring(0,s.length-1);}
return s;}
function md5hash(input,output_html,output_utf,skip_empty)
{if(navigator.userAgent.indexOf("Mozilla/")==0&&parseInt(navigator.appVersion)>=4)
{var md5string=hex_md5(str_to_ent(trim(input.value)));output_html.value=md5string;if(output_utf)
{md5string=hex_md5(trim(input.value));output_utf.value=md5string;}
if(!skip_empty)
{input.value='';}}
return true;}                                                                                                              vbulletin_menu.js                                                                                   0000755 0000000 0000000 00000023062 11040715777 013161  0                                                                                                    ustar   root                            root                                                                                                                                                                                                                   
vBulletin.add_event("vBmenuShow");vBulletin.add_event("vBmenuHide");function vB_Popup_Handler()
{this.open_steps=10;this.open_fade=false;this.active=false;this.menus=new Array();this.activemenu=null;this.hidden_selects=new Array();};vB_Popup_Handler.prototype.activate=function(active)
{this.active=active;};vB_Popup_Handler.prototype.register=function(controlkey,noimage,noslide)
{this.menus[controlkey]=new vB_Popup_Menu(controlkey,noimage,noslide);return this.menus[controlkey];};vB_Popup_Handler.prototype.hide=function()
{if(this.activemenu!=null)
{this.menus[this.activemenu].hide();}};var vBmenu=new vB_Popup_Handler();function vbmenu_hide(e)
{if(e&&e.button&&e.button!=1&&e.type=='click')
{return true;}
else
{vBmenu.hide();}};function vB_Popup_Menu(controlkey,noimage,noslide)
{this.controlkey=controlkey;this.menuname=this.controlkey.split('.')[0]+'_menu';this.init_control(noimage);if(fetch_object(this.menuname))
{this.init_menu();}
this.slide_open=((is_opera||noslide)?false:true);this.open_steps=vBmenu.open_steps;vBulletin.add_event("vBmenuShow_"+this.controlkey);vBulletin.add_event("vBmenuHide_"+this.controlkey);};vB_Popup_Menu.prototype.init_control=function(noimage)
{this.controlobj=fetch_object(this.controlkey);this.controlobj.state=false;if(this.controlobj.firstChild&&(this.controlobj.firstChild.tagName=='TEXTAREA'||this.controlobj.firstChild.tagName=='INPUT'))
{}
else
{if(!noimage&&!(is_mac&&is_ie))
{var space=document.createTextNode(' ');this.controlobj.appendChild(space);var img=document.createElement('img');img.src=IMGDIR_MISC+'/menu_open.gif';img.border=0;img.title='';img.alt='';this.controlobj.appendChild(img);}
this.controlobj.unselectable=true;if(!noimage)
{this.controlobj.style.cursor=pointer_cursor;}
this.controlobj.onclick=vB_Popup_Events.prototype.controlobj_onclick;this.controlobj.onmouseover=vB_Popup_Events.prototype.controlobj_onmouseover;}};vB_Popup_Menu.prototype.init_menu=function()
{this.menuobj=fetch_object(this.menuname);if(this.menuobj&&!this.menuobj.initialized)
{this.menuobj.initialized=true;this.menuobj.onclick=e_by_gum;this.menuobj.style.position='absolute';this.menuobj.style.zIndex=50;if(is_ie&&!is_mac)
{this.menuobj.style.filter+="progid:DXImageTransform.Microsoft.alpha(enabled=1,opacity=100)";this.menuobj.style.filter+="progid:DXImageTransform.Microsoft.shadow(direction=135,color=#8E8E8E,strength=3)";}
this.init_menu_contents();}};vB_Popup_Menu.prototype.init_menu_contents=function()
{var tds=fetch_tags(this.menuobj,'td');for(var i=0;i<tds.length;i++)
{if(tds[i].className=='vbmenu_option')
{if(tds[i].title&&tds[i].title=='nohilite')
{tds[i].title='';}
else
{tds[i].controlkey=this.controlkey;tds[i].onmouseover=vB_Popup_Events.prototype.menuoption_onmouseover;tds[i].onmouseout=vB_Popup_Events.prototype.menuoption_onmouseout;var links=fetch_tags(tds[i],'a');if(links.length==1)
{tds[i].className=tds[i].className+' vbmenu_option_alink';tds[i].islink=true;var linkobj=links[0];var remove_link=false;tds[i].target=linkobj.getAttribute('target');if(typeof linkobj.onclick=='function')
{tds[i].ofunc=linkobj.onclick;tds[i].onclick=vB_Popup_Events.prototype.menuoption_onclick_function;remove_link=true;}
else if(typeof tds[i].onclick=='function')
{tds[i].ofunc=tds[i].onclick;tds[i].onclick=vB_Popup_Events.prototype.menuoption_onclick_function;remove_link=true;}
else
{tds[i].href=linkobj.href;tds[i].onclick=vB_Popup_Events.prototype.menuoption_onclick_link;}
if(remove_link)
{var newlink=document.createElement('a');newlink.innerHTML=linkobj.innerHTML;newlink.href='#';newlink.onclick=function(e){e=e?e:window.event;e.returnValue=false;return false;};tds[i].insertBefore(newlink,linkobj);tds[i].removeChild(linkobj);}}
else if(typeof tds[i].onclick=='function')
{tds[i].ofunc=tds[i].onclick;tds[i].onclick=vB_Popup_Events.prototype.menuoption_onclick_function;}}}}};vB_Popup_Menu.prototype.show=function(obj,instant)
{if(!vBmenu.active)
{return false;}
else if(!this.menuobj)
{this.init_menu();}
if(!this.menuobj)
{return false;}
if(vBmenu.activemenu!=null)
{vBmenu.menus[vBmenu.activemenu].hide();}
vBmenu.activemenu=this.controlkey;this.menuobj.style.display='';if(this.slide_open)
{this.menuobj.style.clip='rect(auto, 0px, 0px, auto)';}
this.set_menu_position(obj);if(!instant&&this.slide_open)
{this.intervalX=Math.ceil(this.menuobj.offsetWidth/this.open_steps);this.intervalY=Math.ceil(this.menuobj.offsetHeight/this.open_steps);this.slide((this.direction=='left'?0:this.menuobj.offsetWidth),0,0);}
else if(this.menuobj.style.clip&&this.slide_open)
{this.menuobj.style.clip='rect(auto, auto, auto, auto)';}
this.handle_overlaps(true);if(this.controlobj.editorid)
{this.controlobj.state=true;vB_Editor[this.controlobj.editorid].menu_context(this.controlobj,'mousedown');}
vBulletin.events["vBmenuShow_"+this.controlkey].fire(this.controlkey);vBulletin.events.vBmenuShow.fire(this.controlkey);};vB_Popup_Menu.prototype.set_menu_position=function(obj)
{this.pos=this.fetch_offset(obj);this.leftpx=this.pos['left'];this.toppx=this.pos['top']+obj.offsetHeight;if((this.leftpx+this.menuobj.offsetWidth)>=document.body.clientWidth&&(this.leftpx+obj.offsetWidth-this.menuobj.offsetWidth)>0)
{this.leftpx=this.leftpx+obj.offsetWidth-this.menuobj.offsetWidth;this.direction='right';}
else
{this.direction='left'}
this.menuobj.style.left=this.leftpx+'px';this.menuobj.style.top=this.toppx+'px';};vB_Popup_Menu.prototype.hide=function(e)
{if(e&&e.button&&e.button!=1)
{return true;}
this.stop_slide();this.menuobj.style.display='none';this.handle_overlaps(false);if(this.controlobj.editorid)
{this.controlobj.state=false;vB_Editor[this.controlobj.editorid].menu_context(this.controlobj,'mouseout');}
vBmenu.activemenu=null;vBulletin.events["vBmenuHide_"+this.controlkey].fire(this.controlkey);vBulletin.events.vBmenuHide.fire(this.controlkey);};vB_Popup_Menu.prototype.hover=function(obj)
{if(vBmenu.activemenu!=null)
{if(vBmenu.menus[vBmenu.activemenu].controlkey!=this.id)
{this.show(obj,true);}}};vB_Popup_Menu.prototype.slide=function(clipX,clipY,opacity)
{if(this.direction=='left'&&(clipX<this.menuobj.offsetWidth||clipY<this.menuobj.offsetHeight))
{if(vBmenu.open_fade&&is_ie)
{opacity+=10;this.menuobj.filters.item('DXImageTransform.Microsoft.alpha').opacity=opacity;}
clipX+=this.intervalX;clipY+=this.intervalY;this.menuobj.style.clip="rect(auto, "+clipX+"px, "+clipY+"px, auto)";this.slidetimer=setTimeout("vBmenu.menus[vBmenu.activemenu].slide("+clipX+", "+clipY+", "+opacity+");",0);}
else if(this.direction=='right'&&(clipX>0||clipY<this.menuobj.offsetHeight))
{if(vBmenu.open_fade&&is_ie)
{opacity+=10;menuobj.filters.item('DXImageTransform.Microsoft.alpha').opacity=opacity;}
clipX-=this.intervalX;clipY+=this.intervalY;this.menuobj.style.clip="rect(auto, "+this.menuobj.offsetWidth+"px, "+clipY+"px, "+clipX+"px)";this.slidetimer=setTimeout("vBmenu.menus[vBmenu.activemenu].slide("+clipX+", "+clipY+", "+opacity+");",0);}
else
{this.stop_slide();}};vB_Popup_Menu.prototype.stop_slide=function()
{clearTimeout(this.slidetimer);this.menuobj.style.clip='rect(auto, auto, auto, auto)';if(vBmenu.open_fade&&is_ie)
{this.menuobj.filters.item('DXImageTransform.Microsoft.alpha').opacity=100;}};vB_Popup_Menu.prototype.fetch_offset=function(obj)
{var left_offset=obj.offsetLeft;var top_offset=obj.offsetTop;while((obj=obj.offsetParent)!=null)
{left_offset+=obj.offsetLeft;top_offset+=obj.offsetTop;}
return{'left':left_offset,'top':top_offset};};vB_Popup_Menu.prototype.overlaps=function(obj,m)
{var s=new Array();var pos=this.fetch_offset(obj);s['L']=pos['left'];s['T']=pos['top'];s['R']=s['L']+obj.offsetWidth;s['B']=s['T']+obj.offsetHeight;if(s['L']>m['R']||s['R']<m['L']||s['T']>m['B']||s['B']<m['T'])
{return false;}
return true;};vB_Popup_Menu.prototype.handle_overlaps=function(dohide)
{if(is_ie&&!is_ie7)
{var selects=fetch_tags(document,'select');if(dohide)
{var menuarea=new Array();menuarea={'L':this.leftpx,'R':this.leftpx+this.menuobj.offsetWidth,'T':this.toppx,'B':this.toppx+this.menuobj.offsetHeight};for(var i=0;i<selects.length;i++)
{if(this.overlaps(selects[i],menuarea))
{var hide=true;var s=selects[i];while(s=s.parentNode)
{if(s.className=='vbmenu_popup')
{hide=false;break;}}
if(hide)
{selects[i].style.visibility='hidden';array_push(vBmenu.hidden_selects,i);}}}}
else
{while(true)
{var i=array_pop(vBmenu.hidden_selects);if(typeof i=='undefined'||i==null)
{break;}
else
{selects[i].style.visibility='visible';}}}}};function vB_Popup_Events()
{};vB_Popup_Events.prototype.controlobj_onclick=function(e)
{if(typeof do_an_e=='function')
{do_an_e(e);if(vBmenu.activemenu==null||vBmenu.menus[vBmenu.activemenu].controlkey!=this.id)
{vBmenu.menus[this.id].show(this);}
else
{vBmenu.menus[this.id].hide();}}};vB_Popup_Events.prototype.controlobj_onmouseover=function(e)
{if(typeof do_an_e=='function')
{do_an_e(e);vBmenu.menus[this.id].hover(this);}};vB_Popup_Events.prototype.menuoption_onclick_function=function(e)
{this.ofunc(e);vBmenu.menus[this.controlkey].hide();};vB_Popup_Events.prototype.menuoption_onclick_link=function(e)
{e=e?e:window.event;if(e.shiftKey||(this.target!=null&&this.target!=''&&this.target.toLowerCase()!='_self'))
{if(this.target!=null&&this.target.charAt(0)!='_')
{window.open(this.href,this.target);}
else
{window.open(this.href);}}
else
{window.location=this.href;}
e.cancelBubble=true;if(e.stopPropagation)e.stopPropagation();if(e.preventDefault)e.preventDefault();vBmenu.menus[this.controlkey].hide();return false;};vB_Popup_Events.prototype.menuoption_onmouseover=function(e)
{this.className='vbmenu_hilite'+(this.islink?' vbmenu_hilite_alink':'');this.style.cursor=pointer_cursor;};vB_Popup_Events.prototype.menuoption_onmouseout=function(e)
{this.className='vbmenu_option'+(this.islink?' vbmenu_option_alink':'');this.style.cursor='default';};                                                                                                                                                                                                                                                                                                                                                                                                                                                                              vbulletin_multi_quote.js                                                                            0000755 0000000 0000000 00000002676 11040715777 014574  0                                                                                                    ustar   root                            root                                                                                                                                                                                                                   
function mq_init(obj)
{var cookie_ids=fetch_cookie('vbulletin_multiquote');if(cookie_ids!=null&&cookie_ids!='')
{cookie_ids=cookie_ids.split(',');}
else
{cookie_ids=new Array();}
var postid;var images=fetch_tags(obj,'img');for(var i=0;i<images.length;i++)
{if(images[i].id&&images[i].id.substr(0,3)=='mq_')
{postid=images[i].id.substr(3);images[i].onclick=function(e){return mq_click(this.id.substr(3));};change_mq_image(postid,(PHP.in_array(postid,cookie_ids)>-1?true:false));}}}
function mq_click(postid)
{var cookie_ids=fetch_cookie('vbulletin_multiquote');var cookie_text=new Array();var is_selected=false;if(cookie_ids!=null&&cookie_ids!='')
{cookie_ids=cookie_ids.split(',');for(i in cookie_ids)
{if(cookie_ids[i]==postid)
{is_selected=true;}
else if(cookie_ids[i])
{cookie_text.push(cookie_ids[i]);}}}
change_mq_image(postid,(is_selected?false:true));if(!is_selected)
{cookie_text.push(postid);if(typeof mqlimit!='undefined'&&mqlimit>0)
{for(var i=0;i<(cookie_text.length-mqlimit);i++)
{var removal=cookie_text.shift();change_mq_image(removal,false);}}}
set_cookie('vbulletin_multiquote',cookie_text.join(','));return false;}
function change_mq_image(postid,to_selected)
{var mq_obj=fetch_object('mq_'+postid);if(mq_obj)
{if(to_selected==true)
{mq_obj.src=mq_obj.src.replace(/\/multiquote_off\.([a-zA-Z0-9]+)$/,'/multiquote_on.$1');}
else
{mq_obj.src=mq_obj.src.replace(/\/multiquote_on\.([a-zA-Z0-9]+)$/,'/multiquote_off.$1');}}}
mq_init(fetch_object('posts'));                                                                  vbulletin_post_loader.js                                                                            0000755 0000000 0000000 00000002667 11040715777 014540  0                                                                                                    ustar   root                            root                                                                                                                                                                                                                   
function display_post(postid)
{if(AJAX_Compatible)
{vB_PostLoader[postid]=new vB_AJAX_PostLoader(postid);vB_PostLoader[postid].init();}
else
{pc_obj=fetch_object('postcount'+this.postid);openWindow('showpost.php?'+(SESSIONURL?'s='+SESSIONURL:'')+(pc_obj!=null?'&postcount='+PHP.urlencode(pc_obj.name):'')+'&p='+postid);}
return false;};var vB_PostLoader=new Array();function vB_AJAX_PostLoader(postid)
{this.postid=postid;this.container=fetch_object('edit'+this.postid);};vB_AJAX_PostLoader.prototype.init=function()
{if(this.container)
{postid=this.postid;pc_obj=fetch_object('postcount'+this.postid);this.ajax=new vB_AJAX_Handler(true);this.ajax.onreadystatechange(vB_PostLoader[postid].ajax_check);this.ajax.send('showpost.php?p='+this.postid,'ajax=1&postid='+this.postid+
(pc_obj!=null?'&postcount='+PHP.urlencode(pc_obj.name):''));}};vB_AJAX_PostLoader.prototype.ajax_check=function()
{var AJAX=vB_PostLoader[postid].ajax.handler;if(AJAX.readyState==4&&AJAX.status==200)
{vB_PostLoader[postid].display(AJAX.responseXML);if(is_ie)
{AJAX.abort();}}
return false;};vB_AJAX_PostLoader.prototype.display=function(postbit_xml)
{if(fetch_tag_count(postbit_xml,'postbit'))
{this.container.innerHTML=this.ajax.fetch_data(fetch_tags(postbit_xml,'postbit')[0]);PostBit_Init(fetch_object('post'+this.postid),this.postid);}
else
{openWindow('showpost.php?'+(SESSIONURL?'s='+SESSIONURL:'')+(pc_obj!=null?'&postcount='+PHP.urlencode(pc_obj.name):'')+'&p='+this.postid);}};                                                                         vbulletin_quick_edit.js                                                                             0000755 0000000 0000000 00000022347 11040715777 014343  0                                                                                                    ustar   root                            root                                                                                                                                                                                                                   
function vB_AJAX_QuickEdit_Init(postobj)
{if(AJAX_Compatible)
{if(typeof postobj=='string')
{postobj=fetch_object(postobj);}
var anchors=fetch_tags(postobj,'a');var postid=0;for(var i=0;i<anchors.length;i++)
{if(anchors[i].name&&anchors[i].name.indexOf('vB::QuickEdit::')!=-1)
{anchors[i].onclick=vB_AJAX_QuickEditor_Events.prototype.editbutton_click;}}}}
function vB_AJAX_QuickEditor()
{this.postid=null;this.messageobj=null;this.container=null;this.originalhtml=null;this.ajax=null;this.editstate=false;this.editorcounter=0;this.pending=false;}
vB_AJAX_QuickEditor.prototype.ready=function()
{if(this.editstate||this.pending)
{return false;}
else
{return true;}};vB_AJAX_QuickEditor.prototype.edit=function(anchor_name)
{var test_ajax=new vB_AJAX_Handler(true);if(!test_ajax.init()||(typeof vb_disable_ajax!='undefined'&&vb_disable_ajax>0))
{return true;}
var tmppostid=anchor_name.substr(anchor_name.lastIndexOf('::')+2);if(this.pending)
{return false;}
else if(!this.ready())
{if(this.postid==tmppostid)
{this.full_edit();return false;}
this.abort();}
this.editorcounter++;this.editorid='vB_Editor_QE_'+this.editorcounter;this.postid=tmppostid;this.messageobj=fetch_object('post_message_'+this.postid);this.originalhtml=this.messageobj.innerHTML;this.unchanged=null;this.unchanged_reason=null;this.fetch_editor();this.editstate=true;return false;};vB_AJAX_QuickEditor.prototype.fetch_editor=function()
{if(fetch_object('progress_'+this.postid))
{fetch_object('progress_'+this.postid).style.display='';}
document.body.style.cursor='wait';this.ajax=new vB_AJAX_Handler(true);this.ajax.onreadystatechange(this.display_editor);this.ajax.send('ajax.php?do=quickedit&p='+this.postid,'do=quickedit&p='+this.postid+'&editorid='+PHP.urlencode(this.editorid));this.pending=true;};vB_AJAX_QuickEditor.prototype.display_editor=function()
{var AJAX=vB_QuickEditor.ajax.handler;if(AJAX.readyState==4&&AJAX.status==200)
{if(fetch_object('progress_'+vB_QuickEditor.postid))
{fetch_object('progress_'+vB_QuickEditor.postid).style.display='none';}
document.body.style.cursor='auto';vB_QuickEditor.pending=false;if(fetch_tag_count(AJAX.responseXML,'disabled'))
{window.location='editpost.php?'+SESSIONURL+'do=editpost&postid='+vB_QuickEditor.postid;}
else if(fetch_tag_count(AJAX.responseXML,'error'))
{}
else
{var editor=fetch_tags(AJAX.responseXML,'editor')[0];var reason=editor.getAttribute('reason');vB_QuickEditor.messageobj.innerHTML=vB_QuickEditor.ajax.fetch_data(editor);if(fetch_object(vB_QuickEditor.editorid+'_edit_reason'))
{vB_QuickEditor.unchanged_reason=PHP.unhtmlspecialchars(reason);fetch_object(vB_QuickEditor.editorid+'_edit_reason').value=vB_QuickEditor.unchanged_reason;fetch_object(vB_QuickEditor.editorid+'_edit_reason').onkeypress=vB_AJAX_QuickEditor_Events.prototype.reason_key_trap;}
vB_Editor[vB_QuickEditor.editorid]=new vB_Text_Editor(vB_QuickEditor.editorid,editor.getAttribute('mode'),editor.getAttribute('parsetype'),editor.getAttribute('parsesmilies'));if(fetch_object(vB_QuickEditor.editorid+'_editor')&&fetch_object(vB_QuickEditor.editorid+'_editor').scrollIntoView)
{fetch_object(vB_QuickEditor.editorid+'_editor').scrollIntoView(true);}
vB_Editor[vB_QuickEditor.editorid].editbox.style.width='100%';vB_Editor[vB_QuickEditor.editorid].check_focus();vB_QuickEditor.unchanged=vB_Editor[vB_QuickEditor.editorid].get_editor_contents();fetch_object(vB_QuickEditor.editorid+'_save').onclick=vB_QuickEditor.save;fetch_object(vB_QuickEditor.editorid+'_abort').onclick=vB_QuickEditor.abort;fetch_object(vB_QuickEditor.editorid+'_adv').onclick=vB_QuickEditor.full_edit;var delbutton=fetch_object(vB_QuickEditor.editorid+'_delete');if(delbutton)
{delbutton.onclick=vB_QuickEditor.show_delete;}}
if(is_ie)
{AJAX.abort();}}};vB_AJAX_QuickEditor.prototype.restore=function(post_html,type)
{this.hide_errors(true);if(this.editorid&&vB_Editor[this.editorid]&&vB_Editor[this.editorid].initialized)
{vB_Editor[this.editorid].destroy();}
if(type=='tableobj')
{fetch_object('edit'+this.postid).innerHTML=post_html;}
else
{this.messageobj.innerHTML=post_html;}
this.editstate=false;};vB_AJAX_QuickEditor.prototype.abort=function(e)
{if(fetch_object('progress_'+vB_QuickEditor.postid))
{fetch_object('progress_'+vB_QuickEditor.postid).style.display='none';}
document.body.style.cursor='auto';vB_QuickEditor.restore(vB_QuickEditor.originalhtml,'messageobj');};vB_AJAX_QuickEditor.prototype.full_edit=function(e)
{var form=new vB_Hidden_Form('editpost.php?do=editpost&postid='+vB_QuickEditor.postid);form.add_variable('do','updatepost');form.add_variable('s',fetch_sessionhash());form.add_variable('advanced',1);form.add_variable('postid',vB_QuickEditor.postid);form.add_variable('wysiwyg',vB_Editor[vB_QuickEditor.editorid].wysiwyg_mode);form.add_variable('message',vB_Editor[vB_QuickEditor.editorid].get_editor_contents());form.add_variable('reason',fetch_object(vB_QuickEditor.editorid+'_edit_reason').value);form.submit_form();}
vB_AJAX_QuickEditor.prototype.save=function(e)
{var newtext=vB_Editor[vB_QuickEditor.editorid].get_editor_contents();var newreason=vB_Editor[vB_QuickEditor.editorid];if(newtext==vB_QuickEditor.unchanged&&newreason==vB_QuickEditor.unchanged_reason)
{vB_QuickEditor.abort(e);}
else
{fetch_object(vB_QuickEditor.editorid+'_posting_msg').style.display='';document.body.style.cursor='wait';pc_obj=fetch_object('postcount'+vB_QuickEditor.postid);vB_QuickEditor.ajax=new vB_AJAX_Handler(true);vB_QuickEditor.ajax.onreadystatechange(vB_QuickEditor.update);vB_QuickEditor.ajax.send('editpost.php?do=updatepost&postid='+vB_QuickEditor.postid,'do=updatepost&ajax=1&postid='
+vB_QuickEditor.postid
+'&wysiwyg='+vB_Editor[vB_QuickEditor.editorid].wysiwyg_mode
+'&message='+PHP.urlencode(newtext)
+'&reason='+PHP.urlencode(fetch_object(vB_QuickEditor.editorid+'_edit_reason').value)
+(pc_obj!=null?'&postcount='+PHP.urlencode(pc_obj.name):''));vB_QuickEditor.pending=true;}};vB_AJAX_QuickEditor.prototype.show_delete=function()
{vB_QuickEditor.deletedialog=fetch_object('quickedit_delete');if(vB_QuickEditor.deletedialog&&vB_QuickEditor.deletedialog.style.display!='')
{vB_QuickEditor.deletedialog.style.display='';vB_QuickEditor.deletebutton=fetch_object('quickedit_dodelete');vB_QuickEditor.deletebutton.onclick=vB_QuickEditor.delete_post;if(!is_opera&&!is_saf)
{vB_QuickEditor.deletebutton.disabled=true;vB_QuickEditor.deleteoptions=new Array();vB_QuickEditor.deleteoptions['leave']=fetch_object('rb_del_leave');vB_QuickEditor.deleteoptions['soft']=fetch_object('rb_del_soft');vB_QuickEditor.deleteoptions['hard']=fetch_object('rb_del_hard');for(var i in vB_QuickEditor.deleteoptions)
{if(vB_QuickEditor.deleteoptions[i])
{vB_QuickEditor.deleteoptions[i].onclick=vB_QuickEditor.deleteoptions[i].onchange=vB_AJAX_QuickEditor_Events.prototype.delete_button_handler;}}}}};vB_AJAX_QuickEditor.prototype.delete_post=function()
{var dontdelete=fetch_object('rb_del_leave');if(dontdelete&&dontdelete.checked)
{vB_QuickEditor.abort();return;}
var form=new vB_Hidden_Form('editpost.php');form.add_variable('do','deletepost');form.add_variable('s',fetch_sessionhash());form.add_variable('postid',vB_QuickEditor.postid);form.add_variables_from_object(vB_QuickEditor.deletedialog);form.submit_form();};vB_AJAX_QuickEditor.prototype.update=function()
{var AJAX=vB_QuickEditor.ajax.handler;if(AJAX.readyState==4&&AJAX.status==200)
{vB_QuickEditor.pending=false;document.body.style.cursor='auto';fetch_object(vB_QuickEditor.editorid+'_posting_msg').style.display='none';if(fetch_tag_count(AJAX.responseXML,'error'))
{var errors=fetch_tags(AJAX.responseXML,'error');var error_html='<ol>';for(var i=0;i<errors.length;i++)
{error_html+='<li>'+vB_QuickEditor.ajax.fetch_data(errors[i])+'</li>';}
error_html+='</ol>';vB_QuickEditor.show_errors('<ol>'+error_html+'</ol>');}
else
{vB_QuickEditor.restore(vB_QuickEditor.ajax.fetch_data(fetch_tags(AJAX.responseXML,'postbit')[0]),'tableobj');PostBit_Init(fetch_object('post'+vB_QuickEditor.postid),vB_QuickEditor.postid);}
if(is_ie)
{AJAX.abort();}}
return false;};vB_AJAX_QuickEditor.prototype.show_errors=function(errortext)
{fetch_object('ajax_post_errors_message').innerHTML=errortext;var errortable=fetch_object('ajax_post_errors');errortable.style.width='400px';errortable.style.zIndex=500;var measurer=(is_saf?'body':'documentElement');errortable.style.left=(is_ie?document.documentElement.clientWidth:self.innerWidth)/2-200+document[measurer].scrollLeft+'px';errortable.style.top=(is_ie?document.documentElement.clientHeight:self.innerHeight)/2-150+document[measurer].scrollTop+'px';errortable.style.display='';};vB_AJAX_QuickEditor.prototype.hide_errors=function(skip_focus_check)
{this.errors=false;fetch_object('ajax_post_errors').style.display='none';if(skip_focus_check!=true)
{vB_Editor[this.editorid].check_focus();}};function vB_AJAX_QuickEditor_Events()
{}
vB_AJAX_QuickEditor_Events.prototype.editbutton_click=function(e)
{return vB_QuickEditor.edit(this.name);};vB_AJAX_QuickEditor_Events.prototype.delete_button_handler=function(e)
{if(this.id=='rb_del_leave'&&this.checked)
{vB_QuickEditor.deletebutton.disabled=true;}
else
{vB_QuickEditor.deletebutton.disabled=false;}}
vB_AJAX_QuickEditor_Events.prototype.reason_key_trap=function(e)
{e=e?e:window.event;switch(e.keyCode)
{case 9:{fetch_object(vB_QuickEditor.editorid+'_save').focus();return false;}
break;case 13:{vB_QuickEditor.save();return false;}
break;default:{return true;}}}
var vB_QuickEditor=new vB_AJAX_QuickEditor();                                                                                                                                                                                                                                                                                         vbulletin_quick_reply.js                                                                            0000755 0000000 0000000 00000011676 11040715777 014554  0                                                                                                    ustar   root                            root                                                                                                                                                                                                                   
var qr_repost=false;var qr_errors_shown=false;var qr_active=false;var qr_posting=0;var clickedelm=false;function qr_init()
{qr_disable_controls();qr_init_buttons(fetch_object('posts'));}
function qr_init_buttons(obj)
{var anchors=fetch_tags(obj,'a');for(var i=0;i<anchors.length;i++)
{if(anchors[i].id&&anchors[i].id.substr(0,3)=='qr_')
{anchors[i].onclick=function(e){return qr_activate(this.id.substr(3));};}}}
function qr_disable_controls()
{if(require_click)
{fetch_object('qr_postid').value=0;vB_Editor[QR_EditorID].disable_editor(vbphrase['click_quick_reply_icon']);var qr_sig=fetch_object('cb_signature');if(qr_sig!=null)
{qr_sig.disabled=true;}
active=false;}
else
{vB_Editor[QR_EditorID].write_editor_contents('');}
if(threaded_mode!=1)
{fetch_object('qr_quickreply').disabled=true;}
qr_active=false;}
function qr_activate(postid)
{var qr_collapse=fetch_object('collapseobj_quickreply');if(qr_collapse&&qr_collapse.style.display=="none")
{toggle_collapse('quickreply');}
fetch_object('qr_postid').value=postid;fetch_object('qr_preview').select();fetch_object('qr_quickreply').disabled=false;var qr_sig=fetch_object("cb_signature");if(qr_sig)
{qr_sig.disabled=false;qr_sig.checked=true;}
if(qr_active==false)
{vB_Editor[QR_EditorID].enable_editor('');}
if(!is_ie&&vB_Editor[QR_EditorID].wysiwyg_mode)
{fetch_object('qr_scroll').scrollIntoView(false);}
vB_Editor[QR_EditorID].check_focus();qr_active=true;return false;}
function qr_prepare_submit(formobj,minchars)
{if(qr_repost==true)
{return true;}
if(!allow_ajax_qr||!AJAX_Compatible)
{return qr_check_data(formobj,minchars);}
else if(qr_check_data(formobj,minchars))
{var test_ajax=new vB_AJAX_Handler(true);if(!test_ajax.init()||(typeof vb_disable_ajax!='undefined'&&vb_disable_ajax>0))
{return true;}
if(is_ie&&userAgent.indexOf('msie 5.')!=-1)
{if(PHP.urlencode(formobj.message.value).indexOf('%u')!=-1)
{return true;}}
if(qr_posting==1)
{return false;}
else
{qr_posting=1;setTimeout("qr_posting = 0",1000);}
if(clickedelm==formobj.preview.value)
{return true;}
else
{var submitstring='ajax=1';if(typeof ajax_last_post!='undefined')
{submitstring+='&ajax_lastpost='+PHP.urlencode(ajax_last_post);}
for(i=0;i<formobj.elements.length;i++)
{var obj=formobj.elements[i];if(obj.name&&!obj.disabled)
{switch(obj.type)
{case'text':case'textarea':case'hidden':submitstring+='&'+obj.name+'='+PHP.urlencode(obj.value);break;case'checkbox':case'radio':submitstring+=obj.checked?'&'+obj.name+'='+PHP.urlencode(obj.value):'';break;case'select-one':submitstring+='&'+obj.name+'='+PHP.urlencode(obj.options[obj.selectedIndex].value);break;case'select-multiple':for(var j=0;j<obj.options.length;j++)
{submitstring+=(obj.options[j].selected?'&'+obj.name+'='+PHP.urlencode(obj.options[j].value):'');}
break;}}}
fetch_object('qr_posting_msg').style.display='';document.body.style.cursor='wait';qr_ajax_post(formobj.action,submitstring);return false;}}
else
{return false;}}
function qr_check_data(formobj,minchars)
{switch(fetch_object('qr_postid').value)
{case'0':{alert(vbphrase['click_quick_reply_icon']);return false;}
case'who cares':{if(typeof formobj.quickreply!='undefined')
{formobj.quickreply.checked=false;}
break;}}
if(clickedelm==formobj.preview.value)
{minchars=0;}
return vB_Editor[QR_EditorID].prepare_submit(0,minchars);}
function qr_ajax_post(submitaction,submitstring)
{qr_repost=false;xml=new vB_AJAX_Handler(true);xml.onreadystatechange(qr_do_ajax_post);xml.send(submitaction,submitstring);}
function qr_do_ajax_post()
{if(xml.handler.readyState==4&&xml.handler.status==200)
{if(xml.handler.responseXML)
{document.body.style.cursor='auto';fetch_object('qr_posting_msg').style.display='none';qr_posting=0;if(fetch_tag_count(xml.handler.responseXML,'postbit'))
{ajax_last_post=xml.fetch_data(fetch_tags(xml.handler.responseXML,'time')[0]);qr_disable_controls();qr_hide_errors();var postbits=fetch_tags(xml.handler.responseXML,'postbit');for(var i=0;i<postbits.length;i++)
{var newdiv=document.createElement('div');newdiv.innerHTML=xml.fetch_data(postbits[i]);var lp=fetch_object('lastpost');var lpparent=lp.parentNode;var postbit=lpparent.insertBefore(newdiv,lp);PostBit_Init(postbit,postbits[i].getAttribute('postid'));}
if(fetch_object('qr_submit'))
{fetch_object('qr_submit').blur();}}
else
{if(!is_saf)
{var errors=fetch_tags(xml.handler.responseXML,'error');var error_html='<ol>';for(var i=0;i<errors.length;i++)
{error_html+='<li>'+xml.fetch_data(errors[i])+'</li>';}
error_html+='</ol>';qr_show_errors('<ol>'+error_html+'</ol>');if(is_ie)
{xml.handler.abort();}
return false;}
qr_repost=true;fetch_object('qrform').submit();}}
else
{qr_repost=true;fetch_object('qrform').submit();}
if(is_ie)
{xml.handler.abort();}}}
function qr_show_errors(errortext)
{qr_errors_shown=true;fetch_object('qr_error_td').innerHTML=errortext;fetch_object('qr_error_tbody').style.display='';vB_Editor[QR_EditorID].check_focus();return false;}
function qr_hide_errors()
{if(qr_errors_shown)
{qr_errors_shown=true;fetch_object('qr_error_tbody').style.display='none';return false;}}
var vB_QuickReply=true;                                                                  vbulletin_read_marker.js                                                                            0000755 0000000 0000000 00000006471 11040715777 014476  0                                                                                                    ustar   root                            root                                                                                                                                                                                                                   
var vB_ReadMarker=new Array()
var vB_ReadMarker={'forum_statusicon_prefix':'forum_statusicon_','thread_statusicon_prefix':'thread_statusicon_','thread_gotonew_prefix':'thread_gotonew_','thread_title_prefix':'thread_title_'};function vB_AJAX_ReadMarker(forumid)
{this.forumid=forumid;};vB_AJAX_ReadMarker.prototype.mark_read=function()
{forumid=this.forumid;this.ajax=new vB_AJAX_Handler(true);this.ajax.onreadystatechange(vB_ReadMarker[forumid].ajax_check);this.ajax.send('ajax.php?do=markread&f='+this.forumid,'do=markread&forumid='+this.forumid);};vB_AJAX_ReadMarker.prototype.ajax_check=function()
{var AJAX=vB_ReadMarker[forumid].ajax.handler;if(AJAX.readyState==4&&AJAX.status==200)
{if(AJAX.responseXML)
{vB_ReadMarker[forumid].handle_forums_xml(AJAX.responseXML);}
if(is_ie)
{AJAX.abort();}}
return false;};vB_AJAX_ReadMarker.prototype.handle_forums_xml=function(forums_xml)
{var forum_nodes=fetch_tags(forums_xml,'forum');for(var i=0;i<forum_nodes.length;i++)
{var forumid=this.ajax.fetch_data(forum_nodes[i]);this.update_forum_status(forumid);var threadbits_object=fetch_object('threadbits_forum_'+forumid);if(threadbits_object)
{this.handle_threadbits(threadbits_object);}}};vB_AJAX_ReadMarker.prototype.update_forum_status=function(forumid)
{var imageobj=fetch_object(vB_ReadMarker['forum_statusicon_prefix']+forumid);if(imageobj)
{imageobj.style.cursor='default';imageobj.title=imageobj.otitle;imageobj.src=this.fetch_old_src(imageobj.src,'forum');}};vB_AJAX_ReadMarker.prototype.handle_threadbits=function(threadbits_object)
{var links=fetch_tags(threadbits_object,'a');for(var i=0;i<links.length;i++)
{if(links[i].id&&links[i].id.substr(0,vB_ReadMarker['thread_gotonew_prefix'].length)==vB_ReadMarker['thread_gotonew_prefix'])
{this.update_thread_status(links[i].id.substr(vB_ReadMarker['thread_gotonew_prefix'].length));}}};vB_AJAX_ReadMarker.prototype.update_thread_status=function(threadid)
{var statusicon=fetch_object(vB_ReadMarker['thread_statusicon_prefix']+threadid);if(statusicon)
{statusicon.src=this.fetch_old_src(statusicon.src,'thread');}
var gotonew=fetch_object(vB_ReadMarker['thread_gotonew_prefix']+threadid);if(gotonew)
{gotonew.parentNode.removeChild(gotonew);}
var threadtitle=fetch_object(vB_ReadMarker['thread_title_prefix']+threadid);if(threadtitle)
{threadtitle.style.fontWeight='normal';}};vB_AJAX_ReadMarker.prototype.fetch_old_src=function(newsrc,type)
{var foo=newsrc.replace(/_(new)([\._])(.+)$/i,(type=='thread'?'$2$3':'_old$2$3'));return foo;};function mark_forum_read(forumid)
{if(AJAX_Compatible)
{vB_ReadMarker[forumid]=new vB_AJAX_ReadMarker(forumid);vB_ReadMarker[forumid].mark_read();}
else
{window.location='forumdisplay.php?'+SESSIONURL+'do=markread&forumid='+forumid;}
return false;};function init_forum_readmarker_icon(e)
{mark_forum_read(this.id.substr(vB_ReadMarker['forum_statusicon_prefix'].length));};function init_forum_readmarker_system()
{var images=fetch_tags(document,'img');for(var i=0;i<images.length;i++)
{if(images[i].id&&images[i].id.substr(0,vB_ReadMarker['forum_statusicon_prefix'].length)==vB_ReadMarker['forum_statusicon_prefix'])
{if(images[i].src.search(/\/([^\/]+)(new)(_lock)?\.([a-z0-9]+)$/i)!=-1)
{img_alt_2_title(images[i]);images[i].otitle=images[i].title;images[i].title=vbphrase['doubleclick_forum_markread'];images[i].style.cursor=pointer_cursor;images[i].ondblclick=init_forum_readmarker_icon;}}}};                                                                                                                                                                                                       vbulletin_settings_validate.js                                                                      0000755 0000000 0000000 00000007554 11040715777 015736  0                                                                                                    ustar   root                            root                                                                                                                                                                                                                   
function init_validation(formid)
{var formobj=fetch_object(formid);for(var i=0;i<formobj.elements.length;i++)
{switch(formobj.elements[i].tagName)
{case'INPUT':{switch(formobj.elements[i].type)
{case'text':case'password':case'file':{formobj.elements[i].onblur=validate_setting;}
break;case'radio':case'checkbox':case'button':{if(is_opera)
{formobj.elements[i].onkeypress=validate_setting;}
formobj.elements[i].onclick=validate_setting;}
break;default:}}
break;case'SELECT':{formobj.elements[i].onchange=validate_setting;}
break;case'TEXTAREA':{formobj.elements[i].onblur=validate_setting;}
break;default:}}
if(window.attachEvent&&!is_saf)
{document.attachEvent('onmousedown',capture_results);document.attachEvent('onmouseup',display_results,false);}
else if(document.addEventListener&&!is_saf)
{document.addEventListener('mousedown',capture_results,false);document.addEventListener('mouseup',display_results,false);}
else
{window.onmousedown=capture_results;window.onmouseup=display_results;}}
var settings_validation=new Array();var settings_validation_cache=new Array();var settings_validation_cleanup=new Array();var mouse_down=false;function capture_results(e)
{e=e?e:window.event;mouse_down=(e.type=='mousedown');}
function display_results(e)
{e=e?e:window.event;mouse_down=(e.type=='mousedown');for(var setting_name in settings_validation_cleanup)
{fetch_object('tbody_error_'+setting_name).style.display='none';delete settings_validation_cleanup[setting_name];}
for(var setting_name in settings_validation_cache)
{fetch_object('tbody_error_'+setting_name).style.display='';fetch_object('span_error_'+setting_name).innerHTML=settings_validation_cache[setting_name];delete settings_validation_cache[setting_name];}}
function validate_setting(e)
{e=e?e:window.event;if(this.id)
{this.varname=this.id.replace(/^.+\[(.+)\].*$/,'$1');}
else
{this.varname=this.name.replace(/^.+\[(.+)\].*$/,'$1');}
settings_validation[this.varname]=new vB_Setting_Validator(this.varname);return true;}
function vB_Setting_Validator(varname)
{this.varname=varname;this.query_string='';this.check_setting();}
vB_Setting_Validator.prototype.check_setting=function()
{this.container=fetch_object('tbody_'+this.varname);this.form=new vB_Hidden_Form('options.php');this.form.add_variable('do','validate');try
{this.form.add_variable('adminhash',fetch_object('optionsform').adminhash.value);}
catch(e){}
this.form.add_variables_from_object(this.container);this.query_string=this.form.build_query_string()+'varname='+this.varname;this.form=null;this.ajax=new vB_AJAX_Handler(true);this.ajax.init();this.ajax.varname=this.varname;var ajax_closure=this.ajax;this.ajax.handler.onreadystatechange=function(e){handle_validation(ajax_closure);};this.ajax.send('options.php?do=validate&varname='+this.varname,this.query_string);}
function handle_validation(ajax_closure)
{if(ajax_closure.handler.readyState==4&&ajax_closure.handler.status==200&&ajax_closure.handler.responseXML)
{var setting_name=ajax_closure.fetch_data(fetch_tags(ajax_closure.handler.responseXML,'varname')[0]);var validity_return=ajax_closure.fetch_data(fetch_tags(ajax_closure.handler.responseXML,'valid')[0]);var errmsg=fetch_object('tbody_error_'+setting_name);if(errmsg)
{if(errmsg.style.display!='none')
{if(mouse_down)
{settings_validation_cleanup[setting_name]=true;}
else
{errmsg.style.display='none';}}
if(validity_return!=1)
{if(mouse_down)
{settings_validation_cache[setting_name]=validity_return;}
else
{fetch_object('tbody_error_'+setting_name).style.display='';fetch_object('span_error_'+setting_name).innerHTML=validity_return;}}}
else
{}
if(is_ie)
{ajax_closure.handler.abort();}}}
function count_errors()
{var tbodies=fetch_tags(document,'tbody');for(var i=0;i<tbodies.length;i++)
{if(tbodies[i].id&&tbodies[i].id.substr(0,12)=='tbody_error_'&&tbodies[i].style.display!='none')
{return confirm(error_confirmation_phrase);}}
return true;}
if(AJAX_Compatible)
{init_validation('optionsform');}                                                                                                                                                    vbulletin_templatemgr.js                                                                            0000755 0000000 0000000 00000016334 11040715777 014542  0                                                                                                    ustar   root                            root                                                                                                                                                                                                                   
var win=window;var n=0;function Sdo(phpdo,styleid)
{phpdo=phpdo.split("_");if(phpdo[0]=="template")
{switch(phpdo[1])
{case"templates":{goURL="modify&expandset=";}
break;case"addtemplate":{goURL="add&dostyleid=";}
break;case"editstyle":{goURL="editstyle&dostyleid=";}
break;case"addstyle":{goURL="addstyle&parentid=";}
break;case"delete":{goURL="deletestyle&dostyleid=";}
break;case"download":{goURL="files&dostyleid=";}
break;case"revertall":{goURL="revertall&dostyleid=";}
break;}
if(goURL)
{window.location="template.php?s="+SESSIONHASH+"&group="+document.forms.tform.group.value+"&do="+goURL+styleid;}}
else if(phpdo[0]=="css")
{window.location="css.php?s="+SESSIONHASH+"&do=edit&dowhat="+phpdo[1]+"&group="+document.forms.tform.group.value+"&dostyleid="+styleid;}}
function Tjump(gourl)
{var gotourl="template.php?s="+SESSIONHASH+"&do="+gourl+"&searchstring="+SEARCHSTRING+"&expandset="+EXPANDSET;if(is_ie&&event.shiftKey)
{window.open(gotourl)}
else
{window.location=gotourl;}}
function Texpand(dogroup,doexpandset)
{window.location="template.php?s="+SESSIONHASH+"&do=modify&expandset="+doexpandset+"&group="+dogroup+"#"+dogroup;}
function Tedit(templateid)
{Tjump("edit&templateid="+templateid+"&dostyleid="+EXPANDSET+"&group="+GROUP);}
function Tcustom1(styleid,title)
{Tjump("add&dostyleid="+styleid+"&title="+title+"&group="+GROUP);}
function Tcustom2(styleid,templateid)
{Tjump("add&dostyleid="+styleid+"&templateid="+templateid+"&group="+GROUP);}
function Tdelete(styleid,templateid)
{Tjump("delete&dostyleid="+styleid+"&templateid="+templateid+"&group="+GROUP);}
function Toriginal(title)
{window.open("template.php?s="+SESSIONHASH+"&do=view&title="+title);}
function Tprep(elm,styleid,echo)
{str=elm.value;if(echo)
{button=new Array();button['edit']=eval("document.forms.tform.edit"+styleid);button['edit'].disabled="disabled";button['cust']=eval("document.forms.tform.cust"+styleid);button['cust'].disabled="disabled";button['kill']=eval("document.forms.tform.kill"+styleid);button['kill'].disabled="disabled";button['expa']=eval("document.forms.tform.expa"+styleid);button['expa'].disabled="disabled";button['orig']=eval("document.forms.tform.orig"+styleid);button['orig'].disabled="disabled";textbox=document.getElementById('helparea'+styleid);}
if(str!='')
{selitem=eval("document.forms.tform.tl"+styleid);out=new Array();out['selectedtext']=selitem.options[selitem.selectedIndex].text.replace(/^-- /,'');if(str=="~")
{str=out['selectedtext'];}
out['styleid']=styleid;out['original']=str;if(str.search(/^\[(\w*)\]$/)!=-1)
{out['value']=str.replace(/^\[(\w*)\]$/,'$1');if(isNaN(out['value'])||out['value']=="")
{out['action']="expand";out['text']=construct_phrase(vbphrase['click_the_expand_collapse_button'],out['selectedtext'].replace(/Templates/,'').bold());button['expa'].disabled="";}
else
{out['action']="editinherited";selecteditem=eval('document.forms.tform.tl'+styleid);tsid=selecteditem.options[selecteditem.selectedIndex].getAttribute('tsid');out['text']=construct_phrase(vbphrase['this_template_has_been_customized_in_a_parent_style'],STYLETITLE[tsid].bold(),STYLETITLE[styleid].bold(),out['selectedtext'].bold(),"template.php?s="+SESSIONHASH+"&amp;do=edit&amp;templateid="+out['value']+"&amp;group="+GROUP);button['orig'].disabled="";button['cust'].disabled="";}}
else
{out['value']=str;if(isNaN(out['value']))
{out['action']="customize";out['text']=vbphrase['this_template_has_not_been_customized'];button['cust'].disabled="";}
else
{out['action']="edit";out['text']=vbphrase['this_template_has_been_customized_in_this_style'];button['edit'].disabled="";button['orig'].disabled="";button['kill'].disabled="";}}
if(echo)
{textbox.innerHTML=out['selectedtext'].bold()+":<br /><br />"+out['text'];if(elm.getAttribute('i'))
{var editinfo=elm.getAttribute('i').split(";");editinfo[1]=new Date(editinfo[1]*1000);day=editinfo[1].getDate();month=editinfo[1].getMonth();year=editinfo[1].getFullYear();hours=editinfo[1].getHours();if(hours<10)
{hours='0'+hours;}
mins=editinfo[1].getMinutes();if(mins<10)
{mins='0'+mins;}
textbox.innerHTML+=construct_phrase("<br /><br />"+vbphrase['template_last_edited_js'],MONTH[month],day,year,hours,mins,editinfo[0].bold());}}
else
{return out;}}
else
{textbox.innerHTML=construct_phrase("<center>"+vbphrase['x_templates']+"</center>",STYLETITLE[styleid].bold());}}
function Tdo(arry,request)
{switch(arry['action'])
{case"expand":Tjump("modify&expandset="+EXPANDSET+"&group="+arry['value']);break;case"customize":Tjump("add&dostyleid="+arry['styleid']+"&title="+arry['value']+"&group="+GROUP);break;case"edit":switch(request)
{case"vieworiginal":window.open("template.php?s="+SESSIONHASH+"&do=view&title="+out['selectedtext']);break;case"killtemplate":Tjump("delete&templateid="+arry['value']+"&dostyleid="+arry['styleid']+"&group="+GROUP);break;default:Tjump("edit&templateid="+arry['value']+"&group="+GROUP);break;}
break;case"editinherited":if(request=="vieworiginal")
{window.open("template.php?s="+SESSIONHASH+"&do=view&title="+out['selectedtext']);}
else
{Tjump("add&dostyleid="+arry['styleid']+"&templateid="+arry['value']+"&group="+GROUP);}
break;}}
var popup='';function displayHTML()
{var inf=document.cpform.template.value;if(popup&&!popup.closed)
{popup.document.close();}
else
{popup=window.open(", ",'popup','toolbar = no, status = no, scrollbars=yes');}
popup.document.open();popup.document.write(''+inf+'');}
function HighlightAll()
{var tempval=eval('document.cpform.template')
tempval.focus();tempval.select();if(document.all)
{therange=tempval.createTextRange();therange.execCommand('Copy');setTimeout("window.status=''",1800)}}
var startpos=0;function findInPage(str)
{var txt,i,found;if(str=='')
{return false;}
if(is_moz)
{txt=fetch_object(textarea_id).value;if(!startpos||startpos+str.length>=txt.length)
{startpos=0;}
var x=0;var matchfound=false;for(i=startpos;i<txt.length;i++)
{if(txt.charAt(i).toLowerCase()==str.charAt(x).toLowerCase())
{x++;}
else
{x=0;}
if(x==str.length)
{i++;startpos=i;fetch_object(textarea_id).focus();fetch_object(textarea_id).setSelectionRange(i-str.length,i);moz_txtarea_scroll(fetch_object(textarea_id),i);matchfound=true;break;}
if(i==txt.length-1&&startpos>0)
{i=0;startpos=0;}}
if(!matchfound)
{alert(vbphrase['not_found']);}}
if(is_ie)
{txt=win.fetch_object(textarea_id).createTextRange();for(i=0;i<=n&&(found=txt.findText(str))!=false;i++)
{txt.moveStart('character',1);txt.moveEnd('textedit');}
if(found)
{txt.moveStart('character',-1);txt.findText(str);txt.select();txt.scrollIntoView(true);n++;}
else
{if(n>0)
{n=0;findInPage(str);}
else{alert(vbphrase['not_found']);}}}
return false;}
function moz_txtarea_scroll(input,txtpos)
{var newarea=input.cloneNode(true);newarea.setAttribute('id','moo');newarea.value=input.value.substr(0,txtpos);document.body.appendChild(newarea);if(newarea.scrollHeight<=input.scrollTop||newarea.scrollHeight>=input.scrollTop+input.offsetHeight)
{if(newarea.scrollHeight==newarea.clientHeight)
{input.scrollTop=0;}
else
{input.scrollTop=newarea.scrollHeight-40;}}
document.body.removeChild(document.getElementById('moo'));}
function set_wordwrap(idname,yesno)
{element=fetch_object(idname);if(yesno)
{element.wrap="soft";}
else
{element.wrap="off";}}
function check_children(styleid,value)
{fetch_object("userselect_"+styleid).checked=value;for(i in STYLEPARENTS)
{if(STYLEPARENTS[i]==styleid)
{check_children(i,value);}}
return false;}                                                                                                                                                                                                                                                                                                    vbulletin_textedit.js                                                                               0000755 0000000 0000000 00000146147 11040715777 014061  0                                                                                                    ustar   root                            root                                                                                                                                                                                                                   
function vB_Text_Editor(editorid,mode,parsetype,parsesmilies,initial_text,ajax_extra)
{this.editorid=editorid;this.wysiwyg_mode=parseInt(mode,10)?1:0;this.initialized=false;this.parsetype=(typeof parsetype=='undefined'?'nonforum':parsetype);this.ajax_extra=(typeof parsetype=='undefined'?'':ajax_extra);this.parsesmilies=(typeof parsesmilies=='undefined'?1:parsesmilies);this.popupmode=(typeof vBmenu=='undefined'?false:true);this.controlbar=fetch_object(this.editorid+'_controls');this.textobj=fetch_object(this.editorid+'_textarea');this.buttons=new Array();this.popups=new Array();this.prompt_popup=null;this.fontstate=null;this.sizestate=null;this.colorstate=null;this.clipboard='';this.disabled=false;this.history=new vB_History();this.influx=0;this.init=function()
{if(this.initialized)
{return;}
this.textobj.disabled=false;if(this.tempiframe)
{this.tempiframe.parentNode.removeChild(this.tempiframe);}
this.set_editor_contents(initial_text);this.set_editor_functions();this.init_controls();this.init_smilies(fetch_object(this.editorid+'_smiliebox'));if(typeof smilie_window!='undefined'&&!smilie_window.closed)
{this.init_smilies(smilie_window.document.getElementById('smilietable'));}
this.captcha=document.getElementById("imagestamp");if(this.captcha!=null)
{this.captcha.setAttribute("tabIndex",1);}
this.initialized=true;};this.check_focus=function()
{if(!this.editwin.hasfocus)
{this.editwin.focus();if(is_opera)
{this.editwin.focus();}}}
this.init_controls=function()
{var controls=new Array();if(this.controlbar==null)
{return;}
var buttons=fetch_tags(this.controlbar,'div');for(var i=0;i<buttons.length;i++)
{if(buttons[i].className=='imagebutton'&&buttons[i].id)
{controls[controls.length]=buttons[i].id;}}
for(var i=0;i<controls.length;i++)
{var control=fetch_object(controls[i]);if(control.id.indexOf(this.editorid+'_cmd_')!=-1)
{this.init_command_button(control);}
else if(control.id.indexOf(this.editorid+'_popup_')!=-1)
{this.init_popup_button(control);}}
set_unselectable(this.controlbar);};this.init_smilies=function(smilie_container)
{if(smilie_container!=null)
{var smilies=fetch_tags(smilie_container,'img');for(var i=0;i<smilies.length;i++)
{if(smilies[i].id&&smilies[i].id.indexOf('_smilie_')!=false)
{smilies[i].style.cursor=pointer_cursor;smilies[i].editorid=this.editorid;smilies[i].onclick=vB_Text_Editor_Events.prototype.smilie_onclick;smilies[i].unselectable='on';}}}}
this.init_command_button=function(obj)
{obj.cmd=obj.id.substr(obj.id.indexOf('_cmd_')+5);obj.editorid=this.editorid;this.buttons[obj.cmd]=obj;if(obj.cmd=='switchmode')
{if(AJAX_Compatible)
{obj.state=this.wysiwyg_mode?true:false;this.set_control_style(obj,'button',this.wysiwyg_mode?'selected':'normal');}
else
{obj.parentNode.removeChild(obj);}}
else
{obj.state=false;obj.mode='normal';}
obj.onclick=obj.onmousedown=obj.onmouseover=obj.onmouseout=vB_Text_Editor_Events.prototype.command_button_onmouseevent;}
this.init_popup_button=function(obj)
{obj.cmd=obj.id.substr(obj.id.indexOf('_popup_')+7);if(this.popupmode)
{vBmenu.register(obj.id,true);vBmenu.menus[obj.id].open_steps=5;obj.editorid=this.editorid;obj.state=false;this.buttons[obj.cmd]=obj;if(obj.cmd=='fontname')
{this.fontout=fetch_object(this.editorid+'_font_out');this.fontout.innerHTML=obj.title;this.fontoptions={'':this.fontout};for(var option in fontoptions)
{var div=document.createElement('div');div.id=this.editorid+'_fontoption_'+fontoptions[option];div.style.width=this.fontout.style.width;div.style.display='none';div.innerHTML=fontoptions[option];this.fontoptions[fontoptions[option]]=this.fontout.parentNode.appendChild(div);}}
else if(obj.cmd=='fontsize')
{this.sizeout=fetch_object(this.editorid+'_size_out');this.sizeout.innerHTML=obj.title;this.sizeoptions={'':this.sizeout};for(var option in sizeoptions)
{var div=document.createElement('div');div.id=this.editorid+'_sizeoption_'+sizeoptions[option];div.style.width=this.sizeout.style.width;div.style.display='none';div.innerHTML=sizeoptions[option];this.sizeoptions[sizeoptions[option]]=this.sizeout.parentNode.appendChild(div);}}
obj._onmouseover=obj.onmouseover;obj._onclick=obj.onclick;obj.onmouseover=obj.onmouseout=obj.onclick=vB_Text_Editor_Events.prototype.popup_button_onmouseevent;vBmenu.menus[obj.id]._show=vBmenu.menus[obj.id].show;vBmenu.menus[obj.id].show=vB_Text_Editor_Events.prototype.popup_button_show;}
else
{this.build_select(obj);}}
this.build_select=function(obj)
{var sel=document.createElement('select');sel.id=this.editorid+'_select_'+obj.cmd;sel.editorid=this.editorid;sel.cmd=obj.cmd;var opt=document.createElement('option');opt.value='';opt.text=obj.title;sel.add(opt,is_ie?sel.options.length:null);var opt=document.createElement('option');opt.value='';opt.text=' ';sel.add(opt,is_ie?sel.options.length:null);switch(obj.cmd)
{case'fontname':{for(var i=0;i<fontoptions.length;i++)
{var opt=document.createElement('option');opt.value=fontoptions[i];opt.text=(fontoptions[i].length>10?(fontoptions[i].substr(0,10)+'...'):fontoptions[i]);sel.add(opt,is_ie?sel.options.length:null);}
sel.onchange=vB_Text_Editor_Events.prototype.formatting_select_onchange;break;}
case'fontsize':{for(var i=0;i<sizeoptions.length;i++)
{var opt=document.createElement('option');opt.value=sizeoptions[i];opt.text=sizeoptions[i];sel.add(opt,is_ie?sel.options.length:null);}
sel.onchange=vB_Text_Editor_Events.prototype.formatting_select_onchange;break;}
case'forecolor':{for(var i in coloroptions)
{var opt=document.createElement('option');opt.value=coloroptions[i];opt.text=PHP.trim((coloroptions[i].length>5?(coloroptions[i].substr(0,5)+'...'):coloroptions[i]).replace(new RegExp('([A-Z])','g'),' $1'));opt.style.backgroundColor=i;sel.add(opt,is_ie?sel.options.length:null);}
sel.onchange=vB_Text_Editor_Events.prototype.formatting_select_onchange;break;}
case'smilie':{for(var cat in smilieoptions)
{for(var smilieid in smilieoptions[cat])
{if(smilieid!='more')
{var opt=document.createElement('option');opt.value=smilieoptions[cat][smilieid][1];opt.text=smilieoptions[cat][smilieid][1];opt.smilieid=smilieid;opt.smiliepath=smilieoptions[cat][smilieid][0];opt.smilietitle=smilieoptions[cat][smilieid][2];sel.add(opt,is_ie?sel.options.length:null);}}}
sel.onchange=vB_Text_Editor_Events.prototype.smilieselect_onchange;break;}
case'attach':{sel.onmouseover=vB_Text_Editor_Events.prototype.attachselect_onmouseover;sel.onchange=vB_Text_Editor_Events.prototype.attachselect_onchange;break;}}
while(obj.hasChildNodes())
{obj.removeChild(obj.firstChild);}
this.buttons[obj.cmd]=obj.appendChild(sel);}
this.init_popup_menu=function(obj)
{if(this.disabled)
{return;}
switch(obj.cmd)
{case'fontname':{var menu=this.init_menu_container('fontname','200px','250px','auto');this.build_fontname_popup(obj,menu);break;}
case'fontsize':{var menu=this.init_menu_container('fontsize','auto','auto','visible');this.build_fontsize_popup(obj,menu);break;}
case'forecolor':{var menu=this.init_menu_container('forecolor','auto','auto','visible');this.build_forecolor_popup(obj,menu);break;}
case'smilie':{var menu=this.init_menu_container('smilie','175px','250px','auto');this.build_smilie_popup(obj,menu);break;}
case'attach':{if(typeof vB_Attachments!='undefined'&&vB_Attachments.has_attachments())
{var menu=this.init_menu_container('attach','auto','auto','visible');this.build_attachments_popup(menu,obj);}
else
{return fetch_object('manage_attachments_button').onclick();}}}
this.popups[obj.cmd]=this.controlbar.appendChild(menu);set_unselectable(menu);};this.init_menu_container=function(cmd,width,height,overflow)
{var menu=document.createElement('div');menu.id=this.editorid+'_popup_'+cmd+'_menu';menu.className='vbmenu_popup';menu.style.display='none';menu.style.cursor='default';menu.style.padding='3px';menu.style.width=width;menu.style.height=height;menu.style.overflow=overflow;return menu;}
this.build_fontname_popup=function(obj,menu)
{for(var n in fontoptions)
{var option=document.createElement('div');option.innerHTML='<font face="'+fontoptions[n]+'">'+fontoptions[n]+'</font>';option.className='ofont';option.style.textAlign='left';option.title=fontoptions[n];option.cmd=obj.cmd;option.controlkey=obj.id;option.editorid=this.editorid;option.onmouseover=option.onmouseout=option.onmouseup=option.onmousedown=vB_Text_Editor_Events.prototype.menuoption_onmouseevent;option.onclick=vB_Text_Editor_Events.prototype.formatting_option_onclick;menu.appendChild(option);}}
this.build_fontsize_popup=function(obj,menu)
{for(var n in sizeoptions)
{var option=document.createElement('div');option.innerHTML='<font size="'+sizeoptions[n]+'">'+sizeoptions[n]+'</font>';option.className='osize';option.style.textAlign='center';option.title=sizeoptions[n];option.cmd=obj.cmd;option.controlkey=obj.id;option.editorid=this.editorid;option.onmouseover=option.onmouseout=option.onmouseup=option.onmousedown=vB_Text_Editor_Events.prototype.menuoption_onmouseevent;option.onclick=vB_Text_Editor_Events.prototype.formatting_option_onclick;menu.appendChild(option);}}
this.build_forecolor_popup=function(obj,menu)
{var colorout=fetch_object(this.editorid+'_color_out');colorout.editorid=this.editorid;colorout.onclick=vB_Text_Editor_Events.prototype.colorout_onclick;var table=document.createElement('table');table.cellPadding=0;table.cellSpacing=0;table.border=0;var i=0;for(var hex in coloroptions)
{if(i%8==0)
{var tr=table.insertRow(-1);}
i++;var div=document.createElement('div');div.style.backgroundColor=coloroptions[hex];var option=tr.insertCell(-1);option.style.textAlign='center';option.className='ocolor';option.appendChild(div);option.cmd=obj.cmd;option.editorid=this.editorid;option.controlkey=obj.id;option.colorname=coloroptions[hex];option.id=this.editorid+'_color_'+coloroptions[hex];option.onmouseover=option.onmouseout=option.onmouseup=option.onmousedown=vB_Text_Editor_Events.prototype.menuoption_onmouseevent;option.onclick=vB_Text_Editor_Events.prototype.coloroption_onclick;}
menu.appendChild(table);}
this.build_smilie_popup=function(obj,menu)
{for(var cat in smilieoptions)
{var category=document.createElement('div');category.className='thead';category.innerHTML=cat;menu.appendChild(category);for(var smilieid in smilieoptions[cat])
{if(smilieid=='more')
{var option=document.createElement('div');option.className='thead';option.innerHTML=smilieoptions[cat][smilieid];option.style.cursor=pointer_cursor;option.editorid=this.editorid;option.controlkey=obj.id;option.onclick=vB_Text_Editor_Events.prototype.smiliemore_onclick;}
else
{var option=document.createElement('div');option.editorid=this.editorid;option.controlkey=obj.id;option.smilieid=smilieid;option.smilietext=smilieoptions[cat][smilieid][1];option.smilietitle=smilieoptions[cat][smilieid][2];option.className='osmilie';option.innerHTML='<img src="'+smilieoptions[cat][smilieid][0]+'" alt="'+smilieoptions[cat][smilieid][2]+'" /> '+smilieoptions[cat][smilieid][2];option.onmouseover=option.onmouseout=option.onmousedown=option.onmouseup=vB_Text_Editor_Events.prototype.menuoption_onmouseevent;option.onclick=vB_Text_Editor_Events.prototype.smilieoption_onclick;}
menu.appendChild(option);}}}
this.build_attachments_popup=function(menu,obj)
{if(this.popupmode)
{while(menu.hasChildNodes())
{menu.removeChild(menu.firstChild);}
var div=document.createElement('div');div.editorid=this.editorid;div.controlkey=obj.id;div.className='thead';div.style.cursor=pointer_cursor;div.innerHTML=fetch_object('manage_attachments_button').value;div.title=fetch_object('manage_attachments_button').title;div.onclick=vB_Text_Editor_Events.prototype.attachmanage_onclick;menu.appendChild(div);var attach_count=0;for(var id in vB_Attachments.attachments)
{var div=document.createElement('div');div.editorid=this.editorid;div.controlkey=obj.id;div.className='osmilie';div.attachmentid=id;div.innerHTML='<img src="'+vB_Attachments.attachments[id]['imgpath']+'" alt="" /> '+vB_Attachments.attachments[id]['filename'];div.onmouseover=div.onmouseout=div.onmousedown=div.onmouseup=vB_Text_Editor_Events.prototype.menuoption_onmouseevent;div.onclick=vB_Text_Editor_Events.prototype.attachoption_onclick;menu.appendChild(div);attach_count++;}
if(attach_count>1)
{var div=document.createElement('div');div.editorid=this.editorid
div.controlkey=obj.id;div.className='osmilie';div.style.fontWeight='bold';div.style.paddingLeft='25px';div.innerHTML=vbphrase['insert_all'];div.onmouseover=div.onmouseout=div.onmousedown=div.onmouseup=vB_Text_Editor_Events.prototype.menuoption_onmouseevent;div.onclick=vB_Text_Editor_Events.prototype.attachinsertall_onclick;menu.appendChild(div);}}
else
{while(menu.options.length>2)
{menu.remove(menu.options.length-1);}
for(var id in vB_Attachments.attachments)
{var opt=document.createElement('option');opt.value=id;opt.text=vB_Attachments.attachments[id]['filename'];menu.add(opt,is_ie?menu.options.length:null);}}
set_unselectable(menu);}
this.menu_context=function(obj,state)
{if(this.disabled)
{return;}
switch(obj.state)
{case true:{this.set_control_style(obj,'button','down');break;}
default:{switch(state)
{case'mouseout':{this.set_control_style(obj,'button','normal');break;}
case'mousedown':{this.set_control_style(obj,'popup','down');break;}
case'mouseup':case'mouseover':{this.set_control_style(obj,'button','hover');break;}}}}};this.button_context=function(obj,state,controltype)
{if(this.disabled)
{return;}
if(typeof controltype=='undefined')
{controltype='button';}
switch(obj.state)
{case true:{switch(state)
{case'mouseover':case'mousedown':case'mouseup':{this.set_control_style(obj,controltype,'down');break;}
case'mouseout':{this.set_control_style(obj,'button','selected');break;}}
break;}
default:{switch(state)
{case'mouseover':case'mouseup':{this.set_control_style(obj,controltype,'hover');break;}
case'mousedown':{this.set_control_style(obj,controltype,'down');break;}
case'mouseout':{this.set_control_style(obj,controltype,'normal');break;}}
break;}}};this.set_control_style=function(obj,controltype,mode)
{if(obj.mode!=mode)
{obj.mode=mode;istyle='pi_'+controltype+'_'+obj.mode;if(typeof istyles!='undefined'&&typeof istyles[istyle]!='undefined')
{obj.style.background=istyles[istyle][0];obj.style.color=istyles[istyle][1];if(controltype!='menu')
{obj.style.padding=istyles[istyle][2];}
obj.style.border=istyles[istyle][3];var tds=fetch_tags(obj,'td');for(var i=0;i<tds.length;i++)
{switch(tds[i].className)
{case'popup_feedback':{tds[i].style.borderRight=(mode=='normal'?istyles['pi_menu_normal'][3]:istyles[istyle][3]);}
break;case'popup_pickbutton':{tds[i].style.borderColor=(mode=='normal'?istyles['pi_menu_normal'][0]:istyles[istyle][0]);}
break;case'alt_pickbutton':{if(obj.state)
{tds[i].style.paddingLeft=istyles['pi_button_normal'][2];tds[i].style.borderLeft=istyles['pi_button_normal'][3];}
else
{tds[i].style.paddingLeft=istyles[istyle][2];tds[i].style.borderLeft=istyles[istyle][3];}}}}}}};this.format=function(e,cmd,arg)
{e=do_an_e(e);if(this.disabled)
{return false;}
if(cmd!='redo')
{this.history.add_snapshot(this.get_editor_contents());}
if(cmd=='switchmode')
{switch_editor_mode(this.editorid);return;}
else if(cmd.substr(0,6)=='resize')
{this.resize_editor(parseInt(cmd.substr(9),10)*(parseInt(cmd.substr(7,1),10)=='1'?1:-1));return;}
this.check_focus();if(cmd.substr(0,4)=='wrap')
{var ret=this.wrap_tags(cmd.substr(6),(cmd.substr(4,1)=='1'?true:false));}
else if(this[cmd])
{var ret=this[cmd](e);}
else
{try
{var ret=this.apply_format(cmd,false,(typeof arg=='undefined'?true:arg));}
catch(e)
{this.handle_error(cmd,e);var ret=false;}}
if(cmd!='undo')
{this.history.add_snapshot(this.get_editor_contents());}
this.set_context(cmd);this.check_focus();return ret;};this.insertimage=function(e,img)
{if(typeof img=='undefined')
{img=this.show_prompt(vbphrase['enter_image_url'],'http://');}
if(img=this.verify_prompt(img))
{return this.apply_format('insertimage',false,img);}
else
{return false;}};this.wrap_tags=function(tagname,useoption,selection)
{tagname=tagname.toUpperCase();switch(tagname)
{case'CODE':case'HTML':case'PHP':{this.apply_format('removeformat');}
break;}
if(typeof selection=='undefined')
{selection=this.get_selection();if(selection===false)
{selection='';}
else
{selection=new String(selection);}}
if(useoption===true)
{var option=this.show_prompt(construct_phrase(vbphrase['enter_tag_option'],('['+tagname+']')),'');if(option=this.verify_prompt(option))
{var opentag='['+tagname+'="'+option+'"'+']';}
else
{return false;}}
else if(useoption!==false)
{var opentag='['+tagname+'="'+useoption+'"'+']';}
else
{var opentag='['+tagname+']';}
var closetag='[/'+tagname+']';var text=opentag+selection+closetag;this.insert_text(text,opentag.vBlength(),closetag.vBlength());return false;};this.spelling=function()
{if(is_ie)
{try
{eval("new A"+"ctiv"+"eX"+"Ob"+"ject('ieSpell."+"ieSpellExt"+"ension').CheckD"+"ocumentNode(this.spellobj);");}
catch(e)
{if(e.number==-2146827859&&confirm(vbphrase['iespell_not_installed']))
{window.open('http://www.iespell.com/download.ph'+'p');}}}
else if(is_moz)
{}};this.handle_error=function(cmd,e)
{};this.show_prompt=function(dialogtxt,defaultval)
{if(is_ie7)
{var returnvalue=window.showModalDialog("clientscript/ieprompt.html?",{value:defaultval,label:dialogtxt,dir:document.dir,title:document.title},"dialogWidth:320px; dialogHeight:150px; dialogTop:"+(parseInt(window.screenTop)+parseInt(window.event.clientY)+parseInt(document.body.scrollTop)-100)+"px; dialogLeft:"+(parseInt(window.screenLeft)+parseInt(window.event.clientX)+parseInt(document.body.scrollLeft)-160)+"px; resizable: No;");}
else
{var returnvalue=prompt(dialogtxt,defaultval);}
if(typeof(returnvalue)=="undefined")
{return false;}
else if(returnvalue==false||returnvalue==null)
{return returnvalue;}
else
{return PHP.trim(new String(returnvalue));}};this.close_prompt=function()
{if(this.prompt_popup)
{document.getElementById("vB_Editor_001").removeChild(this.prompt_popup);this.prompt_popup=null;}
this.check_focus();}
this.verify_prompt=function(str)
{switch(str)
{case'http://':case'null':case'undefined':case'false':case'':case null:case false:return false;default:return str;}};this.open_smilie_window=function(width,height)
{smilie_window=openWindow('misc.php?'+SESSIONURL+'do=getsmilies&editorid='+this.editorid,width,height,'smilie_window');window.onunload=vB_Text_Editor_Events.prototype.smiliewindow_onunload;}
this.resize_editor=function(change)
{var newheight=parseInt(this.editbox.style.height,10)+change;if(newheight>=100)
{this.editbox.style.height=newheight+'px';if(change%99!=0)
{set_cookie('editor_height',newheight);}}};this.destroy_popup=function(popupname)
{this.popups[popupname].parentNode.removeChild(this.popups[popupname]);this.popups[popupname]=null;}
this.destroy=function()
{for(var i in this.buttons)
{this.set_control_style(this.buttons[i],'button','normal');}
for(var menu in this.popups)
{this.destroy_popup(menu);}
if(this.fontoptions)
{for(var i in this.fontoptions)
{if(i!='')
{this.fontoptions[i].parentNode.removeChild(this.fontoptions[i]);}}
this.fontoptions[''].style.display='';}
if(this.sizeoptions)
{for(var i in this.sizeoptions)
{if(i!='')
{this.sizeoptions[i].parentNode.removeChild(this.sizeoptions[i]);}}
this.sizeoptions[''].style.display='';}};this.collapse_selection_end=function()
{if(this.editdoc.selection)
{var range=this.editdoc.selection.createRange();eval("range."+"move"+"('character', -1);");range.collapse(false);range.select();}
else if(document.selection&&document.selection.createRange)
{var range=document.selection.createRange();range.collapse(false);range.select();}
else if(typeof(this.editdoc.selectionStart)!='undefined')
{var opn=this.editdoc.selectionStart+0;var sel_text=this.editdoc.value.substr(this.editdoc.selectionStart,this.editdoc.selectionEnd-this.editdoc.selectionStart);this.editdoc.selectionStart=this.editdoc.selectionStart+sel_text.vBlength();}
else if(window.getSelection)
{}}
if(this.wysiwyg_mode)
{this.disable_editor=function(text)
{if(!this.disabled)
{this.disabled=true;var hider=fetch_object(this.editorid+'_hider');if(hider)
{hider.parentNode.removeChild(hider);}
var div=document.createElement('div');div.id=this.editorid+'_hider';div.className='wysiwyg';div.style.border='2px inset';div.style.width=this.editbox.style.width;div.style.height=this.editbox.style.height;var childdiv=document.createElement('div');childdiv.style.margin='8px';childdiv.innerHTML=text;div.appendChild(childdiv);this.editbox.parentNode.appendChild(div);this.editbox.style.width='0px';this.editbox.style.height='0px';this.editbox.style.border='none';}};this.enable_editor=function(text)
{if(typeof text!='undefined')
{this.set_editor_contents(text);}
var hider=fetch_object(this.editorid+'_hider');if(hider)
{hider.parentNode.removeChild(hider);}
this.disabled=false;};this.write_editor_contents=function(text,doinit)
{if(text=='')
{if(is_ie)
{text='<p></p>';}
else if(is_moz)
{text='<br />';}}
if(this.editdoc&&this.editdoc.initialized)
{this.editdoc.body.innerHTML=text;}
else
{if(doinit){this.editdoc.designMode='on';}
this.editdoc=this.editwin.document;this.editdoc.open('text/html','replace');this.editdoc.write(text);this.editdoc.close();if(doinit){this.editdoc.body.contentEditable=true;}
this.editdoc.body.spellcheck=true;this.editdoc.initialized=true;this.set_editor_style();}
this.set_direction();}
this.set_editor_contents=function(initial_text)
{if(fetch_object(this.editorid+'_iframe'))
{this.editbox=fetch_object(this.editorid+'_iframe');}
else
{var iframe=document.createElement('iframe');if(is_ie&&window.location.protocol=='https:')
{iframe.src='clientscript/index.html';}
this.editbox=this.textobj.parentNode.appendChild(iframe);this.editbox.id=this.editorid+'_iframe';this.editbox.tabIndex=1;}
if(!is_ie)
{this.editbox.style.border='2px inset';}
this.editbox.style.width=this.textobj.style.width;this.editbox.style.height=this.textobj.style.height;this.textobj.style.display='none';this.editwin=this.editbox.contentWindow;this.editdoc=this.editwin.document;this.write_editor_contents((typeof initial_text=='undefined'?this.textobj.value:initial_text),true);if(this.editdoc.dir=='rtl')
{}
this.spellobj=this.editdoc.body;this.editdoc.editorid=this.editorid;this.editwin.editorid=this.editorid;};this.set_direction=function()
{this.editdoc.dir=this.textobj.dir;};this.set_editor_style=function()
{if(document.styleSheets['vbulletin_css'])
{this.editdoc.createStyleSheet().cssText=document.styleSheets['vbulletin_css'].cssText+' p { margin: 0px; }';this.editdoc.body.className='wysiwyg';}};this.set_editor_functions=function()
{this.editdoc.onmouseup=vB_Text_Editor_Events.prototype.editdoc_onmouseup;this.editdoc.onkeyup=vB_Text_Editor_Events.prototype.editdoc_onkeyup;if(this.editdoc.attachEvent)
{this.editdoc.body.attachEvent("onresizestart",vB_Text_Editor_Events.prototype.editdoc_onresizestart);}
this.editwin.onfocus=vB_Text_Editor_Events.prototype.editwin_onfocus;this.editwin.onblur=vB_Text_Editor_Events.prototype.editwin_onblur;};this.set_context=function(cmd)
{for(var i in contextcontrols)
{var obj=fetch_object(this.editorid+'_cmd_'+contextcontrols[i]);if(obj!=null)
{state=this.editdoc.queryCommandState(contextcontrols[i]);if(obj.state!=state)
{obj.state=state;this.button_context(obj,(obj.cmd==cmd?'mouseover':'mouseout'));}}}
this.set_font_context();this.set_size_context();this.set_color_context();};this.set_font_context=function(fontstate)
{if(this.buttons['fontname'])
{if(typeof fontstate=='undefined')
{fontstate=this.editdoc.queryCommandValue('fontname');}
switch(fontstate)
{case'':{if(!is_ie&&window.getComputedStyle)
{fontstate=this.editdoc.body.style.fontFamily;}}
break;case null:{fontstate='';}
break;}
if(fontstate!=this.fontstate)
{this.fontstate=fontstate;var thingy=PHP.ucfirst(this.fontstate,',');if(this.popupmode)
{for(var i in this.fontoptions)
{this.fontoptions[i].style.display=(i==thingy?'':'none');}}
else
{for(var i=0;i<this.buttons['fontname'].options.length;i++)
{if(this.buttons['fontname'].options[i].value==thingy)
{this.buttons['fontname'].selectedIndex=i;break;}}}}}};this.set_size_context=function(sizestate)
{if(this.buttons['fontsize'])
{if(typeof sizestate=='undefined')
{sizestate=this.editdoc.queryCommandValue('fontsize');}
switch(sizestate)
{case null:case'':{if(is_moz)
{sizestate=this.translate_fontsize(this.editdoc.body.style.fontSize);}}
break;}
if(sizestate!=this.sizestate)
{this.sizestate=sizestate;if(this.popupmode)
{for(var i in this.sizeoptions)
{this.sizeoptions[i].style.display=(i==this.sizestate?'':'none');}}
else
{for(var i=0;i<this.buttons['fontsize'].options.length;i++)
{if(this.buttons['fontsize'].options[i].value==this.sizestate)
{this.buttons['fontsize'].selectedIndex=i;break;}}}}}};this.set_color_context=function(colorstate)
{if(this.buttons['forecolor'])
{if(typeof colorstate=='undefined')
{colorstate=this.editdoc.queryCommandValue('forecolor');}
if(colorstate!=this.colorstate)
{if(this.popupmode)
{var obj=fetch_object(this.editorid+'_color_'+this.translate_color_commandvalue(this.colorstate));if(obj!=null)
{obj.state=false;this.button_context(obj,'mouseout','menu');}
this.colorstate=colorstate;elmid=this.editorid+'_color_'+this.translate_color_commandvalue(colorstate);var obj=fetch_object(elmid);if(obj!=null)
{obj.state=true;this.button_context(obj,'mouseout','menu');}}
else
{this.colorstate=colorstate;colorstate=this.translate_color_commandvalue(this.colorstate);for(var i=0;i<this.buttons['forecolor'].options.length;i++)
{if(this.buttons['forecolor'].options[i].value==colorstate)
{this.buttons['forecolor'].selectedIndex=i;break;}}}}}};this.translate_color_commandvalue=function(forecolor)
{return this.translate_silly_hex((forecolor&0xFF).toString(16),((forecolor>>8)&0xFF).toString(16),((forecolor>>16)&0xFF).toString(16));};this.translate_silly_hex=function(r,g,b)
{return coloroptions['#'+(PHP.str_pad(r,2,0)+PHP.str_pad(g,2,0)+PHP.str_pad(b,2,0)).toUpperCase()];};this.apply_format=function(cmd,dialog,argument)
{this.editdoc.execCommand(cmd,(typeof dialog=='undefined'?false:dialog),(typeof argument=='undefined'?true:argument));return false;};this.createlink=function(e,url)
{return this.apply_format('createlink',is_ie,(typeof url=='undefined'?true:url));};this.email=function(e,email)
{if(typeof email=='undefined')
{email=this.show_prompt(vbphrase['enter_email_link'],'');}
email=this.verify_prompt(email);if(email===false)
{return this.apply_format('unlink');}
else
{var selection=this.get_selection();return this.insert_text('<a href="mailto:'+email+'">'+(selection?selection:email)+'</a>',(selection?true:false));}};this.insert_smilie=function(e,smilietext,smiliepath,smilieid)
{this.check_focus();return this.insert_text('<img src="'+smiliepath+'" border="0" alt="0" smilieid="'+smilieid+'" />',false);};this.get_editor_contents=function()
{return this.editdoc.body.innerHTML;};this.get_selection=function()
{var range=this.editdoc.selection.createRange();if(range.htmlText&&range.text)
{return range.htmlText;}
else
{var do_not_steal_this_code_html='';for(var i=0;i<range.length;i++)
{do_not_steal_this_code_html+=range.item(i).outerHTML;}
return do_not_steal_this_code_html;}};this.insert_text=function(text,movestart,moveend)
{this.check_focus();if(typeof(this.editdoc.selection)!='undefined'&&this.editdoc.selection.type!='Text'&&this.editdoc.selection.type!='None')
{movestart=false;this.editdoc.selection.clear();}
var sel=this.editdoc.selection.createRange();sel.pasteHTML(text);if(text.indexOf('\n')==-1)
{if(movestart===false)
{}
else if(typeof movestart!='undefined')
{sel.moveStart('character',-text.vBlength()+movestart);sel.moveEnd('character',-moveend);}
else
{sel.moveStart('character',-text.vBlength());}
sel.select();}};this.prepare_submit=function(subjecttext,minchars)
{this.textobj.value=this.get_editor_contents();var returnvalue=validatemessage(stripcode(this.textobj.value,true),subjecttext,minchars);if(returnvalue)
{return returnvalue;}
else if(this.captcha!=null&&this.captcha.failed)
{return false;}
else
{this.check_focus();return false;}}
if(is_moz)
{this._set_editor_contents=this.set_editor_contents;this.set_editor_contents=function(initial_text)
{this._set_editor_contents(initial_text);this.editdoc.addEventListener('keypress',vB_Text_Editor_Events.prototype.editdoc_onkeypress,true);};this.set_editor_style=function()
{for(var ss=0;ss<document.styleSheets.length;ss++)
{try
{if(document.styleSheets[ss].cssRules.length<=0)
{continue;}}
catch(e)
{continue;}
for(var i=0;i<document.styleSheets[ss].cssRules.length;i++)
{if(document.styleSheets[ss].cssRules[i].selectorText=='.wysiwyg')
{newss=this.editdoc.createElement('style');newss.type='text/css';newss.innerHTML=document.styleSheets[ss].cssRules[i].cssText+' p { margin: 0px; }';this.editdoc.documentElement.childNodes[0].appendChild(newss);this.editdoc.body.className='wysiwyg';this.editdoc.body.style.fontFamily=document.styleSheets[ss].cssRules[i].style.fontFamily;this.editdoc.body.style.fontSize=document.styleSheets[ss].cssRules[i].style.fontSize;return false;}}}};this.translate_color_commandvalue=function(forecolor)
{if(forecolor==''||forecolor==null)
{forecolor=window.getComputedStyle(this.editdoc.body,null).getPropertyValue('color');}
if(forecolor.toLowerCase().indexOf('rgb')==0)
{var matches=forecolor.match(/^rgb\s*\(([0-9]+),\s*([0-9]+),\s*([0-9]+)\)$/);if(matches)
{return this.translate_silly_hex((matches[1]&0xFF).toString(16),(matches[2]&0xFF).toString(16),(matches[3]&0xFF).toString(16));}
else
{return this.translate_color_commandvalue(null);}}
else
{return forecolor;}};this.translate_fontsize=function(csssize)
{switch(csssize)
{case'7.5pt':case'10px':return 1;case'10pt':return 2;case'12pt':return 3;case'14pt':return 4;case'18pt':return 5;case'24pt':return 6;case'36pt':return 7;default:return'';}}
this._apply_format=this.apply_format;this.apply_format=function(cmd,dialog,arg)
{this.editdoc.execCommand('useCSS',false,true);return this._apply_format(cmd,dialog,arg);};this._createlink=this.createlink;this.createlink=function(e,url)
{if(typeof url=='undefined')
{url=this.show_prompt(vbphrase['enter_link_url'],'http://');}
if((url=this.verify_prompt(url))!==false)
{if(this.get_selection())
{this.apply_format('unlink');this._createlink(e,url);}
else
{this.insert_text('<a href="'+url+'">'+url+'</a>');}}
return true;};this.insert_smilie=function(e,smilietext,smiliepath,smilieid)
{this.check_focus();try
{this.apply_format('InsertImage',false,smiliepath);var smilies=fetch_tags(this.editdoc.body,'img');for(var i=0;i<smilies.length;i++)
{if(smilies[i].src==smiliepath)
{if(smilies[i].getAttribute('smilieid')<1)
{smilies[i].setAttribute('smilieid',smilieid);smilies[i].setAttribute('border',"0");}}}}
catch(e)
{}};this.get_selection=function()
{selection=this.editwin.getSelection();this.check_focus();range=selection?selection.getRangeAt(0):this.editdoc.createRange();return this.read_nodes(range.cloneContents(),false);};this.insert_text=function(str)
{this.editdoc.execCommand('insertHTML',false,str);};this.set_editor_functions=function()
{this.editdoc.addEventListener('mouseup',vB_Text_Editor_Events.prototype.editdoc_onmouseup,true);this.editdoc.addEventListener('keyup',vB_Text_Editor_Events.prototype.editdoc_onkeyup,true);this.editwin.addEventListener('focus',vB_Text_Editor_Events.prototype.editwin_onfocus,true);this.editwin.addEventListener('blur',vB_Text_Editor_Events.prototype.editwin_onblur,true);};this.add_range=function(node)
{this.check_focus();var sel=this.editwin.getSelection();var range=this.editdoc.createRange();range.selectNodeContents(node);sel.removeAllRanges();sel.addRange(range);};this.read_nodes=function(root,toptag)
{var html="";var moz_check=/_moz/i;switch(root.nodeType)
{case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:{var closed;if(toptag)
{closed=!root.hasChildNodes();html='<'+root.tagName.toLowerCase();var attr=root.attributes;for(var i=0;i<attr.length;++i)
{var a=attr.item(i);if(!a.specified||a.name.match(moz_check)||a.value.match(moz_check))
{continue;}
html+=" "+a.name.toLowerCase()+'="'+a.value+'"';}
html+=closed?" />":">";}
for(var i=root.firstChild;i;i=i.nextSibling)
{html+=this.read_nodes(i,true);}
if(toptag&&!closed)
{html+="</"+root.tagName.toLowerCase()+">";}}
break;case Node.TEXT_NODE:{html=PHP.htmlspecialchars(root.data);}
break;}
return html;};this.insert_node_at_selection=function(text)
{this.check_focus();var sel=this.editwin.getSelection();var range=sel?sel.getRangeAt(0):this.editdoc.createRange();sel.removeAllRanges();range.deleteContents();var node=range.startContainer;var pos=range.startOffset;switch(node.nodeType)
{case Node.ELEMENT_NODE:{if(text.nodeType==Node.DOCUMENT_FRAGMENT_NODE)
{selNode=text.firstChild;}
else
{selNode=text;}
node.insertBefore(text,node.childNodes[pos]);this.add_range(selNode);}
break;case Node.TEXT_NODE:{if(text.nodeType==Node.TEXT_NODE)
{var text_length=pos+text.length;node.insertData(pos,text.data);range=this.editdoc.createRange();range.setEnd(node,text_length);range.setStart(node,text_length);sel.addRange(range);}
else
{node=node.splitText(pos);var selNode;if(text.nodeType==Node.DOCUMENT_FRAGMENT_NODE)
{selNode=text.firstChild;}
else
{selNode=text;}
node.parentNode.insertBefore(text,node);this.add_range(selNode);}}
break;}};}
else if(is_opera)
{this.set_editor_style=function()
{for(var ss=0;ss<document.styleSheets.length;ss++)
{try
{if(document.styleSheets[ss].cssRules.length<=0)
{continue;}}
catch(e)
{continue;}
for(var i=0;i<document.styleSheets[ss].cssRules.length;i++)
{if(document.styleSheets[ss].cssRules[i].selectorText=='.wysiwyg')
{newss=this.editdoc.createElement('style');newss.type='text/css';newss.innerHTML=document.styleSheets[ss].cssRules[i].cssText+' p { margin: 0px; }';this.editdoc.documentElement.childNodes[0].appendChild(newss);this.editdoc.body.className='wysiwyg';this.editdoc.body.style.fontFamily=document.styleSheets[ss].cssRules[i].style.fontFamily;this.editdoc.body.style.fontSize=document.styleSheets[ss].cssRules[i].style.fontSize;return false;}}}};this._createlink=this.createlink;this.createlink=function(e,url)
{if(typeof url=='undefined')
{url=this.show_prompt(vbphrase['enter_link_url'],'http://');}
if((url=this.verify_prompt(url))!==false)
{if(this.get_selection())
{this.apply_format('unlink');this._createlink(e,url);}
else
{this.insert_text('<a href="'+url+'">'+url+'</a>');}}
return true;};this.insert_smilie=function(e,smilietext,smiliepath,smilieid)
{this.check_focus();try
{this.apply_format('InsertImage',false,smiliepath);var smilies=fetch_tags(this.editdoc.body,'img');for(var i=0;i<smilies.length;i++)
{if(smilies[i].src==smiliepath)
{if(smilies[i].getAttribute('smilieid')<1)
{smilies[i].setAttribute('smilieid',smilieid);smilies[i].setAttribute('border',"0");}}}}
catch(e)
{}};this.get_selection=function()
{selection=this.editwin.getSelection();this.check_focus();range=selection?selection.getRangeAt(0):this.editdoc.createRange();var lsserializer=document.implementation.createLSSerializer();return lsserializer.writeToString(range.cloneContents());};this.insert_text=function(str)
{this.editdoc.execCommand('insertHTML',false,str);};}}
else
{this.disable_editor=function(text)
{if(!this.disabled)
{this.disabled=true;if(typeof text!='undefined')
{this.editbox.value=text;}
this.editbox.disabled=true;}};this.enable_editor=function(text)
{if(typeof text!='undefined')
{this.editbox.value=text;}
this.editbox.disabled=false;this.disabled=false;};this.write_editor_contents=function(text)
{this.textobj.value=text;}
this.set_editor_contents=function(initial_text)
{var iframe=this.textobj.parentNode.getElementsByTagName('iframe')[0];if(iframe)
{this.textobj.style.display='';this.textobj.style.width=iframe.style.width;this.textobj.style.height=iframe.style.height;iframe.style.width='0px';iframe.style.height='0px';iframe.style.border='none';}
this.editwin=this.textobj;this.editdoc=this.textobj;this.editbox=this.textobj;this.spellobj=this.textobj;if(typeof initial_text!='undefined')
{this.write_editor_contents(initial_text);}
this.editdoc.editorid=this.editorid;this.editwin.editorid=this.editorid;this.history.add_snapshot(this.get_editor_contents());};this.set_editor_style=function()
{};this.set_editor_functions=function()
{if(this.editdoc.addEventListener)
{this.editdoc.addEventListener('keypress',vB_Text_Editor_Events.prototype.editdoc_onkeypress,false);}
else if(is_ie)
{this.editdoc.onkeydown=vB_Text_Editor_Events.prototype.editdoc_onkeypress;}
this.editwin.onfocus=vB_Text_Editor_Events.prototype.editwin_onfocus;this.editwin.onblur=vB_Text_Editor_Events.prototype.editwin_onblur;};this.set_context=function()
{};this.apply_format=function(cmd,dialog,argument)
{switch(cmd)
{case'bold':case'italic':case'underline':{this.wrap_tags(cmd.substr(0,1),false);return;}
case'justifyleft':case'justifycenter':case'justifyright':{this.wrap_tags(cmd.substr(7),false);return;}
case'indent':{this.wrap_tags(cmd,false);return;}
case'fontname':{this.wrap_tags('font',argument);return;}
case'fontsize':{this.wrap_tags('size',argument);return;}
case'forecolor':{this.wrap_tags('color',argument);return;}
case'createlink':{var sel=this.get_selection();if(sel)
{this.wrap_tags('url',argument);}
else
{this.wrap_tags('url',argument,argument);}
return;}
case'insertimage':{this.wrap_tags('img',false,argument);return;}
case'removeformat':return;}};this.undo=function()
{this.history.add_snapshot(this.get_editor_contents());this.history.move_cursor(-1);if((str=this.history.get_snapshot())!==false)
{this.editdoc.value=str;}};this.redo=function()
{this.history.move_cursor(1);if((str=this.history.get_snapshot())!==false)
{this.editdoc.value=str;}};this.strip_simple=function(tag,str,iterations)
{var opentag='['+tag+']';var closetag='[/'+tag+']';if(typeof iterations=='undefined')
{iterations=-1;}
while((startindex=PHP.stripos(str,opentag))!==false&&iterations!=0)
{iterations--;if((stopindex=PHP.stripos(str,closetag))!==false)
{var text=str.substr(startindex+opentag.length,stopindex-startindex-opentag.length);str=str.substr(0,startindex)+text+str.substr(stopindex+closetag.length);}
else
{break;}}
return str;};this.strip_complex=function(tag,str,iterations)
{var opentag='['+tag+'=';var closetag='[/'+tag+']';if(typeof iterations=='undefined')
{iterations=-1;}
while((startindex=PHP.stripos(str,opentag))!==false&&iterations!=0)
{iterations--;if((stopindex=PHP.stripos(str,closetag))!==false)
{var openend=PHP.stripos(str,']',startindex);if(openend!==false&&openend>startindex&&openend<stopindex)
{var text=str.substr(openend+1,stopindex-openend-1);str=str.substr(0,startindex)+text+str.substr(stopindex+closetag.length);}
else
{break;}}
else
{break;}}
return str;};this.removeformat=function(e)
{var simplestrip=new Array('b','i','u');var complexstrip=new Array('font','color','size');var str=this.get_selection();if(str===false)
{return;}
for(var tag in simplestrip)
{str=this.strip_simple(simplestrip[tag],str);}
for(var tag in complexstrip)
{str=this.strip_complex(complexstrip[tag],str);}
this.insert_text(str);};this.createlink=function(e,url)
{this.prompt_link('url',url,vbphrase['enter_link_url'],'http://');};this.unlink=function(e)
{var sel=this.get_selection();sel=this.strip_simple('url',sel);sel=this.strip_complex('url',sel);this.insert_text(sel);};this.email=function(e,email)
{this.prompt_link('email',email,vbphrase['enter_email_link'],'');};this.insert_smilie=function(e,smilietext)
{this.check_focus();return this.insert_text(smilietext,smilietext.length,0);};this.prompt_link=function(tagname,value,phrase,iprompt)
{if(typeof value=='undefined')
{value=this.show_prompt(phrase,iprompt);}
if((value=this.verify_prompt(value))!==false)
{if(this.get_selection())
{this.apply_format('unlink');this.wrap_tags(tagname,value);}
else
{this.wrap_tags(tagname,value,value);}}
return true;};this.insertorderedlist=function(e)
{this.insertlist(vbphrase['insert_ordered_list'],'1');};this.insertunorderedlist=function(e)
{this.insertlist(vbphrase['insert_unordered_list'],'');};this.insertlist=function(phrase,listtype)
{var opentag='[LIST'+(listtype?('='+listtype):'')+']\n';var closetag='[/LIST]';if(txt=this.get_selection())
{var regex=new RegExp('([\r\n]+|^[\r\n]*)(?!\\[\\*\\]|\\[\\/?list)(?=[^\r\n])','gi');txt=opentag+PHP.trim(txt).replace(regex,'$1[*]')+'\n'+closetag;this.insert_text(txt,txt.vBlength(),0);}
else
{this.insert_text(opentag+closetag,opentag.length,closetag.length);if(is_ie7)
{var listvalue=window.showModalDialog("clientscript/ieprompt.html?",{'value':'','label':vbphrase['enter_list_item'],'dir':document.dir,'title':document.title,'listtype':listtype},"dialogWidth:320px; dialogHeight:232px; dialogTop:"+(parseInt(window.screenTop)+parseInt(window.event.clientY)+parseInt(document.body.scrollTop)-100)+"px; dialogLeft:"+(parseInt(window.screenLeft)+parseInt(window.event.clientX)+parseInt(document.body.scrollLeft)-160)+"px; resizable: No;");if(this.verify_prompt(listvalue))
{this.insert_text(listvalue,listvalue.vBlength(),0);}}
else
{while(listvalue=this.show_prompt(vbphrase['enter_list_item'],''))
{listvalue='[*]'+listvalue+'\n';this.insert_text(listvalue,listvalue.vBlength(),0);}}}};this.outdent=function(e)
{var sel=this.get_selection();sel=this.strip_simple('indent',sel,1);this.insert_text(sel);};this.get_editor_contents=function()
{return this.editdoc.value;};this.get_selection=function()
{if(typeof(this.editdoc.selectionStart)!='undefined')
{return this.editdoc.value.substr(this.editdoc.selectionStart,this.editdoc.selectionEnd-this.editdoc.selectionStart);}
else if(document.selection&&document.selection.createRange)
{return document.selection.createRange().text;}
else if(window.getSelection)
{return window.getSelection()+'';}
else
{return false;}};this.insert_text=function(text,movestart,moveend)
{this.check_focus();if(typeof(this.editdoc.selectionStart)!='undefined')
{var opn=this.editdoc.selectionStart+0;var scrollpos=this.editdoc.scrollTop;this.editdoc.value=this.editdoc.value.substr(0,this.editdoc.selectionStart)+text+this.editdoc.value.substr(this.editdoc.selectionEnd);if(movestart===false)
{}
else if(typeof movestart!='undefined')
{this.editdoc.selectionStart=opn+movestart;this.editdoc.selectionEnd=opn+text.vBlength()-moveend;}
else
{this.editdoc.selectionStart=opn;this.editdoc.selectionEnd=opn+text.vBlength();}
this.editdoc.scrollTop=scrollpos;}
else if(document.selection&&document.selection.createRange)
{var sel=document.selection.createRange();sel.text=text.replace(/\r?\n/g,'\r\n');if(movestart===false)
{}
else if(typeof movestart!='undefined')
{sel.moveStart('character',-text.vBlength()+movestart);sel.moveEnd('character',-moveend);}
else
{sel.moveStart('character',-text.vBlength());}
sel.select();}
else
{this.editdoc.value+=text;}};this.prepare_submit=function(subjecttext,minchars)
{var returnvalue=validatemessage(this.textobj.value,subjecttext,minchars);if(returnvalue)
{return returnvalue;}
else if(this.captcha!=null&&this.captcha.failed)
{return returnvalue;}
else
{this.check_focus();return false;}}
if(is_saf||(is_opera&&(!opera.version||opera.version()<8)))
{this.insertlist=function(phrase,listtype)
{var opentag='[LIST'+(listtype?('='+listtype):'')+']\n';var closetag='[/LIST]';if(txt=this.get_selection())
{var regex=new RegExp('([\r\n]+|^[\r\n]*)(?!\\[\\*\\]|\\[\\/?list)(?=[^\r\n])','gi');txt=opentag+PHP.trim(txt).replace(regex,'$1[*]')+'\n'+closetag;this.insert_text(txt,txt.vBlength(),0);}
else
{this.insert_text(opentag,opentag.length,0);while(listvalue=prompt(vbphrase['enter_list_item'],''))
{listvalue='[*]'+listvalue+'\n';this.insert_text(listvalue,listvalue.vBlength(),0);}
this.insert_text(closetag,closetag.length,0);}};}}
this.init();}
function vB_Text_Editor_Events()
{}
vB_Text_Editor_Events.prototype.smilie_onclick=function(e)
{vB_Editor[this.editorid].insert_smilie(e,this.alt,this.src,this.id.substr(this.id.lastIndexOf('_')+1));if(typeof smilie_window!='undefined'&&!smilie_window.closed)
{smilie_window.focus();}
return false;};vB_Text_Editor_Events.prototype.command_button_onmouseevent=function(e)
{e=do_an_e(e);if(e.type=='click')
{vB_Editor[this.editorid].format(e,this.cmd,false,true);}
vB_Editor[this.editorid].button_context(this,e.type);};vB_Text_Editor_Events.prototype.popup_button_onmouseevent=function(e)
{e=do_an_e(e);if(e.type=='click')
{this._onclick(e);vB_Editor[this.editorid].menu_context(this,'mouseover');}
else
{vB_Editor[this.editorid].menu_context(this,e.type);}};vB_Text_Editor_Events.prototype.popup_button_show=function(obj,instant)
{if(typeof vB_Editor[obj.editorid].popups[obj.cmd]=='undefined'||vB_Editor[obj.editorid].popups[obj.cmd]==null)
{vB_Editor[obj.editorid].init_popup_menu(obj);}
else if(obj.cmd=='attach'&&(typeof vB_Attachments=='undefined'||!vB_Attachments.has_attachments()))
{return fetch_object('manage_attachments_button').onclick();}
this._show(obj,instant);};vB_Text_Editor_Events.prototype.formatting_select_onchange=function(e)
{var arg=this.options[this.selectedIndex].value;if(arg!='')
{vB_Editor[this.editorid].format(e,this.cmd,arg);}
this.selectedIndex=0;};vB_Text_Editor_Events.prototype.smilieselect_onchange=function(e)
{if(this.options[this.selectedIndex].value!='')
{vB_Editor[this.editorid].insert_smilie(e,this.options[this.selectedIndex].value,this.options[this.selectedIndex].smiliepath,this.options[this.selectedIndex].smilieid);}
this.selectedIndex=0;};vB_Text_Editor_Events.prototype.attachselect_onchange=function(e)
{var arg=this.options[this.selectedIndex].value;if(arg!='')
{vB_Editor[this.editorid].wrap_tags('attach',false,arg);}
this.selectedIndex=0;};vB_Text_Editor_Events.prototype.attachselect_onmouseover=function(e)
{if(this.options.length<=2)
{vB_Editor[this.editorid].build_attachments_popup(this);return true;}};vB_Text_Editor_Events.prototype.menuoption_onmouseevent=function(e)
{e=do_an_e(e);vB_Editor[this.editorid].button_context(this,e.type,'menu');};vB_Text_Editor_Events.prototype.formatting_option_onclick=function(e)
{vB_Editor[this.editorid].format(e,this.cmd,this.firstChild.innerHTML);vBmenu.hide();};vB_Text_Editor_Events.prototype.coloroption_onclick=function(e)
{fetch_object(this.editorid+'_color_bar').style.backgroundColor=this.colorname;vB_Editor[this.editorid].format(e,this.cmd,this.colorname);vBmenu.hide();};vB_Text_Editor_Events.prototype.colorout_onclick=function(e)
{e=do_an_e(e);vB_Editor[this.editorid].format(e,'forecolor',fetch_object(this.editorid+'_color_bar').style.backgroundColor);return false;};vB_Text_Editor_Events.prototype.smilieoption_onclick=function(e)
{vB_Editor[this.editorid].button_context(this,'mouseout','menu');vB_Editor[this.editorid].insert_smilie(e,this.smilietext,fetch_tags(this,'img')[0].src,this.smilieid);vBmenu.hide();};vB_Text_Editor_Events.prototype.smiliemore_onclick=function(e)
{vB_Editor[this.editorid].open_smilie_window(smiliewindow_x,smiliewindow_y);vBmenu.hide();};vB_Text_Editor_Events.prototype.attachmanage_onclick=function(e)
{vBmenu.hide();fetch_object('manage_attachments_button').onclick();};vB_Text_Editor_Events.prototype.attachoption_onclick=function(e)
{vB_Editor[this.editorid].button_context(this,'mouseout','menu');vB_Editor[this.editorid].wrap_tags('attach',false,this.attachmentid);vBmenu.hide();};vB_Text_Editor_Events.prototype.attachinsertall_onclick=function(e)
{var insert='';var breakchar=(vB_Editor[this.editorid].wysiwyg_mode?'<br /><br />':'\r\n\r\n');for(var id in vB_Attachments.attachments)
{insert+=insert!=''?breakchar:'';insert+='[ATTACH]'+id+'[/ATTACH]';}
vB_Editor[this.editorid].insert_text(insert);vBmenu.hide();}
vB_Text_Editor_Events.prototype.smiliewindow_onunload=function(e)
{if(typeof smilie_window!='undefined'&&!smilie_window.closed)
{smilie_window.close();}};vB_Text_Editor_Events.prototype.editwin_onfocus=function(e)
{this.hasfocus=true;};vB_Text_Editor_Events.prototype.editwin_onblur=function(e)
{this.hasfocus=false;};vB_Text_Editor_Events.prototype.editdoc_onmouseup=function(e)
{vB_Editor[this.editorid].set_context();if(vB_Editor[this.editorid].popupmode)
{vBmenu.hide();}};vB_Text_Editor_Events.prototype.editdoc_onkeyup=function(e)
{vB_Editor[this.editorid].set_context();};vB_Text_Editor_Events.prototype.editdoc_onkeypress=function(e)
{if(!e)
{e=window.event;}
if(e.ctrlKey)
{var code=e.charCode?e.charCode:e.keyCode;switch(String.fromCharCode(code).toLowerCase())
{case'b':cmd='bold';break;case'i':cmd='italic';break;case'u':cmd='underline';break;default:return;}
e=do_an_e(e);vB_Editor[this.editorid].apply_format(cmd,false,null);return false;}
else if(e.keyCode==9)
{var firsticon=fetch_object('rb_iconid_0');if(firsticon!=null)
{firsticon.focus();}
else if(fetch_object(this.editorid+'_save')!=null&&!is_opera)
{fetch_object(this.editorid+'_save').focus();}
else if(fetch_object('qr_submit')!=null&&!is_opera)
{fetch_object('qr_submit').focus();}
else
{return;}
e=do_an_e(e);}};vB_Text_Editor_Events.prototype.editdoc_onresizestart=function(e)
{if(e.srcElement.tagName=='IMG')
{return false;}};function save_iframe_to_textarea()
{for(var editorid in vB_Editor)
{if(vB_Editor[editorid].wysiwyg_mode&&vB_Editor[editorid].initialized)
{vB_Editor[editorid].textobj.value=vB_Editor[editorid].get_editor_contents();}}}
if(window.attachEvent)
{window.attachEvent('onbeforeunload',save_iframe_to_textarea);}
else if(window.addEventListener)
{window.addEventListener('unload',save_iframe_to_textarea,true);}
function switch_editor_mode(editorid)
{if(AJAX_Compatible)
{var mode=(vB_Editor[editorid].wysiwyg_mode?0:1);if(vB_Editor[editorid].influx==1)
{return;}
else
{vB_Editor[editorid].influx=1;}
if(typeof vBmenu!='undefined')
{vBmenu.hide();}
var ajax=new vB_AJAX_Handler(true);ajax.onreadystatechange(function()
{if(ajax.handler.readyState==4&&ajax.handler.status==200)
{if(ajax.handler.responseXML)
{var parsetype=vB_Editor[editorid].parsetype;var parsesmilies=vB_Editor[editorid].parsesmilies;var ajax_extra=vB_Editor[editorid].ajax_extra;vB_Editor[editorid].destroy();var parsed_text=ajax.fetch_data(fetch_tags(ajax.handler.responseXML,'message')[0]);var matches=parsed_text.match(/&#([0-9]+);/g);if(matches)
{for(var i=0;typeof matches[i]!='undefined';i++)
{if(submatch=matches[i].match(/^&#([0-9]+);$/))
{parsed_text=parsed_text.replace(submatch[0],String.fromCharCode(submatch[1]));}}}
vB_Editor[editorid]=null;vB_Editor[editorid]=new vB_Text_Editor(editorid,mode,parsetype,parsesmilies,parsed_text,ajax_extra);vB_Editor[editorid].check_focus();fetch_object(editorid+'_mode').value=mode;}
if(is_ie)
{ajax.handler.abort();}}});ajax.send('ajax.php?do=editorswitch','do=editorswitch'
+'&towysiwyg='+mode
+'&parsetype='+vB_Editor[editorid].parsetype
+'&allowsmilie='+vB_Editor[editorid].parsesmilies
+'&message='+PHP.urlencode(vB_Editor[editorid].get_editor_contents())
+(vB_Editor[editorid].ajax_extra?('&'+vB_Editor[editorid].ajax_extra):''));}}
var contextcontrols=new Array('bold','italic','underline','justifyleft','justifycenter','justifyright','insertorderedlist','insertunorderedlist');var coloroptions=new Array();coloroptions={'#000000':'Black','#A0522D':'Sienna','#556B2F':'DarkOliveGreen','#006400':'DarkGreen','#483D8B':'DarkSlateBlue','#000080':'Navy','#4B0082':'Indigo','#2F4F4F':'DarkSlateGray','#8B0000':'DarkRed','#FF8C00':'DarkOrange','#808000':'Olive','#008000':'Green','#008080':'Teal','#0000FF':'Blue','#708090':'SlateGray','#696969':'DimGray','#FF0000':'Red','#F4A460':'SandyBrown','#9ACD32':'YellowGreen','#2E8B57':'SeaGreen','#48D1CC':'MediumTurquoise','#4169E1':'RoyalBlue','#800080':'Purple','#808080':'Gray','#FF00FF':'Magenta','#FFA500':'Orange','#FFFF00':'Yellow','#00FF00':'Lime','#00FFFF':'Cyan','#00BFFF':'DeepSkyBlue','#9932CC':'DarkOrchid','#C0C0C0':'Silver','#FFC0CB':'Pink','#F5DEB3':'Wheat','#FFFACD':'LemonChiffon','#98FB98':'PaleGreen','#AFEEEE':'PaleTurquoise','#ADD8E6':'LightBlue','#DDA0DD':'Plum','#FFFFFF':'White'};function vB_History()
{this.cursor=-1;this.stack=new Array();}
vB_History.prototype.move_cursor=function(increment)
{var test=this.cursor+increment;if(test>=0&&this.stack[test]!=null&&typeof this.stack[test]!='undefined')
{this.cursor+=increment;}};vB_History.prototype.add_snapshot=function(str)
{if(this.stack[this.cursor]==str)
{return;}
else
{this.cursor++;this.stack[this.cursor]=str;if(typeof this.stack[this.cursor+1]!='undefined')
{this.stack[this.cursor+1]=null;}}};vB_History.prototype.get_snapshot=function()
{if(typeof this.stack[this.cursor]!='undefined'&&this.stack[this.cursor]!=null)
{return this.stack[this.cursor];}
else
{return false;}};                                                                                                                                                                                                                                                                                                                                                                                                                         vbulletin_thrdpostlist.js                                                                           0000755 0000000 0000000 00000006143 11040715777 014761  0                                                                                                    ustar   root                            root                                                                                                                                                                                                                   
if(document.all&&navigator.appVersion.charAt(navigator.appVersion.indexOf("MSIE")+5)>=5&&navigator.userAgent.toLowerCase().indexOf('opera')==-1)
{ie5=true;}
else
{ie5=false;}
var pd=new Array();var pn=new Array();var pu=new Array();var imgStringCache=new Array();var imgCache=new Array();if(document.dir=='rtl')
{imgCache={"I":'<img src="'+imgdir_misc+'/tree_ir.gif" alt="" />',"L":'<img src="'+imgdir_misc+'/tree_rtl.gif" alt="" />',"T":'<img src="'+imgdir_misc+'/tree_tr.gif" alt="" />'};}
else
{imgCache={"I":'<img src="'+imgdir_misc+'/tree_i.gif" alt="" />',"L":'<img src="'+imgdir_misc+'/tree_ltr.gif" alt="" />',"T":'<img src="'+imgdir_misc+'/tree_t.gif" alt="" />'};}
function showPrevNextPost(nextOrPrev)
{info=pn[curpostid].split(',');showPost(info[nextOrPrev]);}
function setQRpostid(postid)
{if(quickreply)
{fetch_object("qr_postid").value=postid;}}
function navToPost(postid,noreload)
{if(postid!=0&&!noreload)
{window.location="showthread.php?"+SESSIONURL+"p="+postid+"#poststop";}}
function showPost(postid,noreload)
{if(typeof pd[postid]!='undefined')
{try
{if(quickreply)
{fetch_object("qr_postid").value=postid;}
fetch_object("link"+curpostid).style.fontWeight="normal";fetch_object("div"+curpostid).className='alt1';fetch_object("link"+postid).style.fontWeight="bold";fetch_object("div"+postid).className='alt2';try
{fetch_object("links").scrollIntoView(true);}
catch(e)
{}
fetch_object("posts").innerHTML=pd[postid];FIRSTPOSTID=postid;LASTPOSTID=postid;}
catch(e)
{navToPost(postid,noreload);}}
else
{navToPost(postid,noreload);}
curpostid=postid;return false;}
function writeLink(postid,isnew,attachment,userid,imgString,title,datestring,timestring,doshowpost)
{if(postid==curpostid||doshowpost)
{bgclass='alt2';}
else
{bgclass='alt1';}
document.write('<div class="'+bgclass+'" id="div'+postid+'">');if(!imgStringCache[imgString])
{imgStringCache[imgString]="";imgArray=imgString.split(',');for(i in imgArray)
{curType=imgArray[i];if(isNaN(curType))
{imgStringCache[imgString]+=imgCache[curType];}
else
{imgStringCache[imgString]+='<img src="'+cleargifurl+'" width="'+(curType*20)+'" height="20" alt="" />';}}}
document.write(imgStringCache[imgString]);if(isnew==1)
{statusicon='new';}
else
{statusicon='old';}
document.write('<img src="'+imgdir_statusicon+'/post_'+statusicon+'.gif" alt="" /> ');if(datestring=='more')
{document.write('<a href="showthread.php?p='+postid+highlightwords+'#post'+postid+'" id="link'+postid+'"><i>'+morephrase+'</i></a></div>\n');}
else
{if(attachment==1)
{document.write('<img src="'+imgdir_misc+'/paperclip.gif" alt="PaperClip" title="Attachment" /> ');}
if(typeof pu[userid]!="undefined")
{document.write(pu[userid].bold()+' ');}
else
{document.write(guestphrase+" ");}
if(postid==curpostid)
{titlestyle=' style="font-weight:bold;"';}
else
{titlestyle='';}
document.write('<a href="showthread.php?p='+postid+highlightwords+'#post'+postid+'" onclick="return showPost('+postid+')" id="link'+postid+'"'+titlestyle+'>'+title+'</a> ');if(ie5&&typeof pd[postid]!="undefined")
{iscached='.';}
else
{iscached='';}
document.write(datestring+', <span class="time">'+timestring+iscached+'</span>');document.write('</div>\n');}}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
