
var NewCount=0;function ShowHideElement(id){if(id!=lastOpenedItem){HideElement(lastOpenedItem);}
var obj=document.getElementById(id);if(obj!=null){obj.style.display=(obj.style.display=='block')?'none':'block';}
lastOpenedItem=currentOpenedItem;currentOpenedItem=id;}
function HideElement(id){var obj=document.getElementById(id);if(obj!=null){if(id=="topicsfayt"){obj.innerHTML='';}
else
obj.style.display='none';}}
function getSelected(fieldname){var fobj=eval("document.editform."+fieldname)
var max=fobj.length;selected="";var num=0;for(var i=0;i<max;i++)
{if(fobj[i].checked){if(selected!="")selected+="*";selected+=fobj[i].value;num+=1;}}
return{'selected':selected,'num':num};}
function KeepCount(obj,tb){var txtbox=document.getElementById(tb);var fobj=eval("document.editform."+tb)
var selected=getSelected(obj.name);var errmsg=("pastProfOPT"==obj.name?"Past professions":"Hobbies");if("Other"==obj.value){txtbox.readOnly=false;}
if("tbLangs"!=tb&&selected['num']>5){alert("Please select up to 5 "+errmsg+".");return false;}else{if(txtbox!=null){txtbox.value=selected['selected'].replace(/[*]/g,', ');}}}
function setColor(obj){var currentColor=document.editform.bgcolor.value;var colorField=document.getElementById('bgcolorid');if(colorField!=null){colorField.value=obj.id;document.getElementById(currentColor).style.border="0px;";obj.style.border="1px solid gray";currentColor=obj.id;}}
if("undefined"!=typeof wgEditProfileCaptcha&&wgEditProfileCaptcha){CaptchaResponse=MobileAjaxResponse.prototype.inherit("CaptchaResponse");CaptchaResponse.prototype.statusOK=function(data){jQuery("#editform").submit(function(){return true;}).submit();return true;};function submitCaptcha(){_hbLink('SubmitCaptchaBtn','UserBio_'+(checkLogin()?"":"Not")+"Lgd");if(jQuery("#recaptcha_challenge_field").length<1){modalDialog.hide();alert("Error: There\'s no captcha loaded");return false;}
var captcha_challenge=jQuery("#recaptcha_challenge_field").val();var captcha_response=jQuery("#recaptcha_response_field").val();jQuery("#editform [name=captcha]").val(captcha_challenge);jQuery("#editform [name=cresponse]").val(captcha_response);return getCaptcha();}
function getCaptcha(){modalDialog.showWait(null,318,300);var form=jQuery("#editform");var url=form.attr("action");var data={jsonly:1};jQuery("input,textarea,select",form).each(function(index,elem){var el=jQuery(elem);data[el.attr("name")]=el.val();});var captchaResponse=new CaptchaResponse;var resp=captchaResponse.postJsonSync(url,data,null,{timeout:30000});return false;}}
function validateSubmit(action,fromPreviewPage){if(!fromPreviewPage){document.editform.PastprofInput.value=getSelected('pastProfOPT')['selected'];document.editform.HobbiesInput.value=getSelected('hobOPT')['selected'];document.editform.langsInput.value=getSelected('langOPT')['selected'];document.editform.gender.value=getSelectedRadio('editform','gender');document.editform.wpTextbox1.value=document.getElementById("wysiwygwysiwyg").contentWindow.document.body.innerHTML;if(""!=document.editform.bioYear.value){document.editform.dateOfbirth.value=document.editform.bioYear.value+'-'+document.editform.bioMonth.value+'-'+document.editform.bioDay.value;}else{document.editform.dateOfbirth.value=null;}}else{var bodytext=document.getElementById('selfText');if(null!=bodytext){document.editform.wpTextbox1.value=bodytext.innerHTML;}}
document.editform.stage.value=action;var inputobj=jQuery('#textInputId');if(1==inputobj.length){if(""==inputobj.val().trim()){document.editform.fvtCat.value="";}else{document.editform.fvtCat.value=inputobj.get(0).name;}}
if("undefined"!=typeof wgEditProfileCaptcha&&wgEditProfileCaptcha&&"save"==action&&(""==document.editform.captcha.value||""==document.editform.cresponse.value)){return getCaptcha();}else{document.editform.submit();}}
var username="";function callRecommend(url,user){username=user;jQuery.ajax({url:url,data:"",type:"POST",success:function(resp){justRecommend();}});}
function justRecommend(){var recommendspan=document.getElementById('recmId');var recommendTd=document.getElementById('recTdId');if(recommendspan!=null)
recommendspan.innerHTML='<img src="'+wgStaticFilesServer+'/templates/icons/thumbsup1_ds.png" /> <span style="color:red;"><a rel="nofollow" href="/Q/UserDiscuss:'+username+'#Add">Send feedback</a></span>';if(recommendTd!=null)
recommendTd.innerHTML="<span id='recommendSpan' style=\"color:red;\">You\'ve recommended "+username+"</span>";}
function fixWidths(){var limit=420;var imageArray=jQuery('#selfText').find("img");imageArray.each(function(){obj=jQuery(this);obj.show();width=obj.width();height=obj.height();obj.hide();ratio=width/height;var nheight=height;if(width>limit){nwidth=width*(limit/width);ratio=nwidth/width;nheight=Math.floor(height*ratio);obj.css({"width":nwidth+"px","height":nheight+"px"});}
if(isIE6()){bioSelfDIV=jQuery("#bioSelf");if(bioSelfDIV.length>0){nBioHeight=bioSelfDIV.height()+nheight;nBioHeight=isEven(nBioHeight)?nBioHeight:nBioHeight+1;bioSelfDIV.css({"height":nBioHeight+"px"});}}
obj.css({"display":"inline"});});}
function getClickedElement(e){if(!e){var e=window.event;}
var tg=(window.event)?e.srcElement:e.target;return tg;}
function lastContributionsHUN(user){var msg=jQuery('#last_cont_hun').html();var show=(msg=="Hide")?"0":"1";jQuery.ajax({url:'/Q/Special:Servlet',data:'user='+user+'&show='+show+'&op=huh',type:"POST",success:function(resp){lastContributionsHUNPost();}});}
function lastContributionsHUNPost(){var hideStr="Hide";var showStr="Show";var msg=jQuery('#last_cont_hun').html();if(msg==hideStr){jQuery('.showHide').html(showStr);_hbLink('show_contribs');}
else{jQuery('.showHide').html(hideStr);_hbLink('hide_contribs');}}
function resetDates(){var year="Year";var month="Month";var day="Day";var max,prev;var yearSelect=document.editform.bioYear;if(yearSelect!=null){if(yearSelect.options[0].text!=year){max=yearSelect.options.length;for(var i=max;i>0;i--)
{prev=yearSelect.options[i-1];yearSelect.options[i]=new Option(prev.text,prev.value);}
yearSelect.options[0]=new Option(year,'');}
yearSelect.selectedIndex=0;}
var monthSelect=document.editform.bioMonth;if(monthSelect!=null){if(monthSelect.options[0].text!=month){max=monthSelect.options.length;for(var i=max;i>0;i--)
{prev=monthSelect.options[i-1];monthSelect.options[i]=new Option(prev.text,prev.value);}
monthSelect.options[0]=new Option(month,'01');}
monthSelect.selectedIndex=0;}
var daySelect=document.editform.bioDay;if(daySelect!=null){if(daySelect.options[0].text!=day){max=daySelect.options.length;for(var i=max;i>0;i--)
{prev=daySelect.options[i-1];daySelect.options[i]=new Option(prev.text,prev.value);}
daySelect.options[0]=new Option(day,'01');}
daySelect.selectedIndex=0;daySelect.style.width="57px";}}
function resetGender(){document.editform.gender[0].checked=0;document.editform.gender[1].checked=0;}
var alreadyResized=false;function resizeBio(){if(jQuery('#bioTopGigya')&&!alreadyResized){jQuery('#bioPicBack').show();jQuery('#bioTopGigya').css('height',jQuery('#bioTopGigya').height()+'px');alreadyResized=true;}}
backWarnUser=null;makeWarningActive=null;step3WarnUser=null;stepsWarnUser={step1:{selection:13},step2:{rmsg:"",cmsg:"",pcontent:""}};function step2WarnUser(titleNons){var selection='';for(var c=0;c<document.forms['selectionWarnUserFORM'].selectionWarnUser.length;c++){if(document.forms['selectionWarnUserFORM'].selectionWarnUser[c].checked){selection=document.forms['selectionWarnUserFORM'].selectionWarnUser[c].value;stepsWarnUser.step1.selection=c;break;}}
if(selection!=''){popup_elem.ph=0
jQuery('#headerWarnUserDIV').html("");jQuery('#selectionWarnUserDIV').html("");jQuery('#submitWarnUserDIV').html("");jQuery('#outerWarnUserDIV').parent().css("cursor","wait");jQuery('#selectionWarnUserDIV').html("<div style='font-size: 12px; width: 100%;'><div style='padding-top: 170px; text-align: center;'><img src='"+wgStaticFilesServer+"/templates/icons/ajax-loader3.gif' border=0 alt='Please wait...' /><br><font style='font-size: 12px; color: #A9A9A9;'>Please wait...</font></div></div>");var url='/Q/Special:WarnUser&ajax=1&step=1&sel='+selection+'&user='+titleNons;jQuery.ajax({url:url,success:function(data){jQuery('#outerWarnUserDIV').parent().css("cursor","default");eval(data);jQuery('#wuText').focus();},error:function(){alert("Your browser is not supported.\n\nPlease upgrade in order to use this function.");}});}
else return;}
var warnUserPopupContentBuffer=null;function warnUser(nobuild){if(!nobuild){disableScrollBars();}
if(!nobuild){popup_elem.buildModal("warn_user",init_size.x,init_size.y);}
if(null==warnUserPopupContentBuffer){warnUserPopupContentBuffer=jQuery("#outerWarnUserDIVContainer").html();jQuery("#outerWarnUserDIVContainer").html("")}
popup_elem.fill(warnUserPopupContentBuffer);var cornersObj=new curvyCorners({tl:{radius:5},tr:{radius:5},bl:{radius:5},br:{radius:5},antiAlias:true,autoPad:false},jQuery('#headerWarnUserDIV').get(0));cornersObj.applyCornersToAll();init_size.y=jQuery('#outerWarnUserDIV').height();init_size.x=jQuery('#outerWarnUserDIV').width();jQuery('#warn_user').css({"width":init_size.x+"px","height":init_size.y+"px"});popup_elem.pw=init_size.x;popup_elem.ph=init_size.y;jQuery('#outerWarnUserDIV').css("position","static");popup_elem.centralize();_hbLink('initiate_warn','biopage');if(!jQuery('#warn_user').get(0).xDragEnabled){xEnableDrag('warn_user',function(ele,mouseX,mouseY,xEventObj){var targ;if(!xEventObj){var xEventObj=window.event;}
if(xEventObj.target){targ=xEventObj.target;}
else if(xEventObj.srcElement){targ=xEventObj.srcElement;}
if(targ.nodeType&&targ.nodeType==3){targ=targ.parentNode;}
if(targ.tagName.match(/textarea|input/i)){return;}
jQuery('#warn_user').unbind('mouseover',popupCursorCheck);jQuery('#warn_user').unbind('mouseout',popupCursorCheck);jQuery('#warn_user').unbind('mousemove',popupCursorCheck);jQuery('#warn_user').css("cursor","move");},function(ele,mouseDX,mouseDY,xEventObj){var targ;if(!xEventObj){var xEventObj=window.event;}
if(xEventObj.target){targ=xEventObj.target;}
else if(xEventObj.srcElement){targ=xEventObj.srcElement;}
if(targ.nodeType&&targ.nodeType==3){targ=targ.parentNode;}
if(targ.tagName.match(/textarea|input/i)){return;}
var x=xLeft('warn_user')+mouseDX;var y=xTop('warn_user')+mouseDY;jQuery('#warn_user').css("cursor","move");xMoveTo('warn_user',x,y);},function(ele,mouseX,mouseY,xEventObj){var targ;if(!xEventObj){var xEventObj=window.event;}
if(xEventObj.target){targ=xEventObj.target;}
else if(xEventObj.srcElement){targ=xEventObj.srcElement;}
if(targ.nodeType&&targ.nodeType==3){targ=targ.parentNode;}
if(targ.tagName.match(/textarea|input/i)){return;}
jQuery('#warn_user').mouseover(popupCursorCheck);jQuery('#warn_user').mouseout(popupCursorCheck);jQuery('#warn_user').mousemove(popupCursorCheck);jQuery('#warn_user').css("cursor","auto");});}
jQuery('#warn_user').mouseover(popupCursorCheck);jQuery('#warn_user').mouseout(popupCursorCheck);jQuery('#warn_user').mousemove(popupCursorCheck);}
var popupCursorCheck=function(event){if(!event){var event=window.event;}
var cursor=getCursorPosition(event);var left=xLeft('warn_user');var top=xTop('warn_user');var height=xHeight('warn_user');var width=xWidth('warn_user');if(left<cursor.x&&top<cursor.y&&left+width>cursor.x&&top+height>cursor.y&&!(left+15<cursor.x&&top+15<cursor.y&&left+width-15>cursor.x&&top+height-15>cursor.y)){jQuery('#warn_user').css("cursor","move");}
else{jQuery('#warn_user').css("cursor","auto");}};function showBlockHint(elem,block,blockednow){if(block>0){if(blockednow){popup_elem.build(elem,261,0);popup_elem.makeTooltip("This user is blocked. He/she has been blocked "+block+" times. Click here to unblock.");}
else{popup_elem.build(elem,261,0);popup_elem.makeTooltip("This user is not currently blocked, but he/she has already been blocked "+block+" times. Click here to block.");}}
else{popup_elem.build(elem,261,0);popup_elem.makeTooltip("This user is not blocked.<br/>Click here to block this user.");}
popup_elem.moveFromElemX(-8);popup_elem.moveFromElemY(-(jQuery('#tooltip_elem').children().height()+3));}
function statsBoxToolTip(which,text){if(1==jQuery("#"+which).length){jQuery("#"+which).mouseover(function(event){popup_elem.build(this,261,0);popup_elem.makeTooltip(text);popup_elem.moveFromElemX(-8);popup_elem.moveFromElemY(-(jQuery('#tooltip_elem').height()+3));}).mouseout(function(event){if(popup_elem.isTooltip){hideTooltip();}});}}
function userBioOnloadFunc(){resizeBio();fireForSplitContributions(2);if(0==jQuery('html.IE7').length){jQuery(".rank").hover(function(){var thisRank=jQuery(this);thisRank.css("background-image","url("+wgStaticFilesServer+"/templates/icons/burst-B.gif?v=73119)");var text=thisRank.attr("title");thisRank.attr("alt",thisRank.attr("title"));thisRank.attr("title","");var color=jQuery('.titles').css("color");jQuery('<span>').attr("id","rank_popup").text(text).css({"backgroundColor":"#"+userBioColor,"borderColor":color,"left":thisRank.offset().left-8+"px","top":thisRank.offset().top-26+"px"}).prependTo('#right-column');},function(){var thisRank=jQuery(this);thisRank.css("background-image","url("+wgStaticFilesServer+"/templates/icons/burst-A.gif?v=73119)");jQuery('#rank_popup').remove();thisRank.attr("title",thisRank.attr("alt"));});}
jQuery('.showHide').each(function(){jQuery(this).mouseover(function(event){showHide_value=jQuery(this).html();var text=(showHide_value=='Hide')?'Hide most active list and recent contributions list from other users.':'Show most active list and recent contributions list to other users.';popup_elem.build(this,261,0);popup_elem.makeTooltip(text);popup_elem.moveFromElemX(-8);popup_elem.moveFromElemY(-(jQuery('#tooltip_elem').children().height()+3));}).mouseout(function(event){if(popup_elem.isTooltip){hideTooltip();}});});statsBoxToolTip('messageUser',"Write on this user\'s message board.");if(1==jQuery('#recmId').length){statsBoxToolTip('recmId',"If you found this person\'s contributions helpful, you can give them a thumbs-up.");}else{statsBoxToolTip('feedback',"You have already recommended this person.<br/>Click here to write feedback on their board.");}
var text;if(0==userWarnings){text="Send this person a warning about inappropriate behavior.";}else{text="This person has already been warned. Click here to warn them again.";}
statsBoxToolTip('warn',text);if(1==jQuery('#blockuserlink').length){jQuery('#blockuserlink').mouseover(function(){showBlockHint(this,(userBlocks?userBlocks:0),userBioIsBlocked);}).mouseout(function(){if(popup_elem.isTooltip){hideTooltip();}});}}
function getScrollBarWidth(){var inner=document.createElement("p");Element.setStyle(inner,{width:"100%",height:"200px"});var outer=document.createElement("div");Element.setStyle(outer,{position:"absolute",top:"0px",left:"0px",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"});outer.appendChild(inner);document.body.appendChild(outer);var w1=inner.offsetWidth;outer.style.overflow="scroll";var w2=inner.offsetWidth;if(w1==w2)w2=outer.clientWidth;document.body.removeChild(outer);return(w1-w2);};function escapeHTML(str){var div=document.createElement('div');var text=document.createTextNode(str);div.appendChild(text);return div.innerHTML;}
function xParentNode(ele,n)
{while(ele&&n--){ele=ele.parentNode;}
return ele;}
function updateFilterCats(){globalHideModal();var url='/Q/Special:Search&ajax=1&action=getfilter&trunks='+search_trunks+'&search='+search_term;$('notin').innerHTML=' ';$('topics_hint').innerHTML="Loading...";$('topics_hint').setStyle({color:"#000000",textDecoration:"none",cursor:"default"});var pere=new PeriodicalExecuter(function(pe){if($('topics_hint').innerHTML=="Loading..."){$('topics_hint').innerHTML="Loading.";}
else{$('topics_hint').innerHTML+='.';}},1);new Ajax.Request(url,{method:"get",onSuccess:function(transport){pere.stop();$('topics_hint').setStyle({color:"#003399",textDecoration:"underline",cursor:"pointer"});eval(transport.responseText.trim());},onException:function(requester,except){pere.stop();$('topics_hint').setStyle({color:"#003399",textDecoration:"underline",cursor:"pointer"});alert("Your browser is not supported.\n\nPlease upgrade in order to use this function.");}});}
var trunks=null;function updateTopicsJSON(){top_container=document.getElementById("searchform");top_container.trunks.value=JSON.stringify(trunks);}
function submitCategories(){void(0);}
function openTopic(topic_id,link){var div=$("t"+topic_id);if(xDef(link)&&typeof(link)=="object"&&link.length>0)
for(var i=0;i<link.length;i++){if($("t"+link[i])&&$("t"+link[i]).innerHTML.replace(/(<([^>]+)>)/ig,"").match(/[a-z]+/i)){div.innerHTML=$("t"+link[i]).innerHTML;$("t"+link[i]).innerHTML="";div.style.display="block";nodes=new Array();table=$("t"+link[i]);while(!table.parentNode.id||table.parentNode.id!="t0"){if(table.parentNode.id&&table.parentNode.id.match(/t[0-9]+/i)){nodes[nodes.length]=table.parentNode.id;}
table=table.parentNode;}
nodes[nodes.length]="t0";var mobj=trunks;for(var i2=nodes.length-1;i2>=0;i2--){if(mobj[nodes[i2]]){mobj=mobj[nodes[i2]].subs;if(mobj["t"+link[i]]){mobj=mobj["t"+link[i]];break;}}
else{mobj=null;break;}}
if(mobj!=null){nodes=new Array();table=$("t"+topic_id);while(!table.parentNode.id||table.parentNode.id!="t0"){if(table.parentNode.id&&table.parentNode.id.match(/t[0-9]+/i)){nodes[nodes.length]=table.parentNode.id;}
table=table.parentNode;}
nodes[nodes.length]="t0";var mobj2=trunks;for(var i2=nodes.length-1;i2>=0;i2--){if(mobj2[nodes[i2]]&&nodes[i2-1]&&mobj2[nodes[i2]].subs[nodes[i2-1]]){mobj2=mobj2[nodes[i2]].subs;}
else if(mobj2[nodes[i2]]&&nodes[i2-1]){mobj2[nodes[i2]].subs[nodes[i2-1]]=new Object();if(mobj2[nodes[i2]].all==1){mobj2[nodes[i2]].subs[nodes[i2-1]].sel=1;mobj2[nodes[i2]].subs[nodes[i2-1]].all=1;mobj2[nodes[i2]].subs[nodes[i2-1]].subs=new Object();}
else{mobj2[nodes[i2]].subs[nodes[i2-1]].sel=0;mobj2[nodes[i2]].subs[nodes[i2-1]].all=0;mobj2[nodes[i2]].subs[nodes[i2-1]].subs=new Object();}
mobj2=mobj2[nodes[i2]].subs;}
else if(mobj2[nodes[i2]]){mobj2=mobj2[nodes[i2]].subs;}}
if(mobj2["t"+topic_id]){mobj2["t"+topic_id].all=mobj.all;mobj2["t"+topic_id].sel=mobj.sel;mobj2["t"+topic_id].subs=eval('('+JSON.stringify(mobj.subs)+')');mobj2["t"+topic_id].open=true;}
else{mobj2["t"+topic_id]=new Object();mobj2["t"+topic_id].all=mobj.all;mobj2["t"+topic_id].sel=mobj.sel;mobj2["t"+topic_id].subs=eval('('+JSON.stringify(mobj.subs)+')');mobj2["t"+topic_id].open=true;}
mobj.subs=new Object();mobj.open=false;}
return;}}
if(div.innerHTML.replace(/(<([^>]+)>)/ig,"").match(/[a-z]+/i)){div.style.display="block";return;}
showPWsmall();var html="";var xmlHTTP=getXMLHTTP();if(xmlHTTP){var url="/Q/Special:Search&gettopictree="+topic_id;document.body.style.cursor='wait';xmlHTTP.open("POST",url,false);xmlHTTP.send(null);var responseText=xmlHTTP.responseText.trim();if(responseText!="None"){div.innerHTML=responseText;div.style.display="block";divs=div.getElementsByTagName('div');for(var i=0;i<divs.length;i++){if(divs[i]&&divs[i].getAttribute('islink')&&divs[i].getAttribute('islink')!=0){links=eval('('+divs[i].getAttribute('islink')+')');if(links&&links.length>0){for(var i2=0;i2<links.length;i2++){if($("i"+links[i2])){id=divs[i].id.replace(/[^0-9]+/i,'');if($("i"+links[i2]).value==1){check($("i"+id),$("c"+id),false,true);}
else{uncheck($("i"+id),$("c"+id),false,true);}}}}}}}
document.body.style.cursor='auto';}
else{alert("Your browser is not supported by this web-site.\nPlease update to a newer version.");}
hidePWsmall();}
function fillCategoriesDialog(){$('categories_popup').parentNode.style.cursor="wait";$('categories_popup').innerHTML="<div style='font-size: 12px; padding-left: 13px;'>"+"Please wait..."+"<div style='padding-top: 180px; text-align: center; margin-left: -13px;'><img src='"+wgStaticFilesServer+"/templates/icons/ajax-loader3.gif' border=0 alt="+"Please wait..."+" /></div></div>";var url='/Q/Special:Search&ajax=1&act=selcats';new Ajax.Request(url,{method:"get",onSuccess:function(transport){var responseText=transport.responseText.trim();$('categories_popup').parentNode.style.cursor="default";disableScrollBars();$('categories_popup').style.fontSize="12px";jQuery('#categories_popup').html(""+responseText+"");resizeButtonsGroup('cat_popup_btns_res_top');resizeButtonsGroup('cat_popup_btns_res_bot');trunks=eval('('+document.forms['searchform'].trunks.value+')');selectTopicsFromJSON(trunks,true);},onException:function(requester,except){alert("Your browser is not supported.\n\nPlease upgrade in order to use this function.");popup_elem.destroyModal();globalHideModal();xModalDialog.instances["select_topics"]=null;disableScrollBars();}});}
function closeTopic(topic_id){$("t"+topic_id).style.display="none";}
function subTopics(topic_id,link){if($("t"+topic_id).innerHTML.replace(/(<([^>]+)>)/ig,"").match(/[a-z]+/i)&&$("t"+topic_id).style.display!="none"){closeTopic(topic_id);if($("subsel"+topic_id))
$("subsel"+topic_id).parentNode.removeChild($("subsel"+topic_id));}
else{if(xDef(link)&&typeof(link)=="object"&&link.length>0)
openTopic(topic_id,link);else
openTopic(topic_id);nodes=new Array();table=$("t"+topic_id);while(!table.parentNode.id||table.parentNode.id!="t0"){if(table.parentNode.id&&table.parentNode.id.match(/t[0-9]+/i)){nodes[nodes.length]=table.parentNode.id;}
table=table.parentNode;}
nodes[nodes.length]="t0";var mobj=trunks;for(var i=nodes.length-1;i>=0;i--){if(mobj[nodes[i]]&&nodes[i-1]&&mobj[nodes[i]].subs[nodes[i-1]])
mobj=mobj[nodes[i]].subs;else
break;}
selectTopicsFromJSON(mobj,false);}}
function selectTopicsFromJSONclone(id){if(typeof(id)!='undefined'){var nodes=new Array();var table=$("t"+id);while(!table.parentNode.id||table.parentNode.id!="t0"){if(table.parentNode.id&&table.parentNode.id.match(/t[0-9]+/i)){nodes[nodes.length]=table.parentNode.id;}
table=table.parentNode;}
nodes[nodes.length]="t0";var mobj=trunks;for(var i=nodes.length-1;i>=0;i--){if(mobj[nodes[i]]&&nodes[i-1]&&mobj[nodes[i]].subs[nodes[i-1]])
mobj=mobj[nodes[i]].subs;else
break;}
selectTopicsFromJSON(mobj,false);}
else{selectTopicsFromJSON(trunks,false);}
if(trunks.t0.all==0&&JSON.stringify(trunks.t0.subs).match(/^[\{\}\s]+$/i)){var buttons=jQuery("#catsform").find("a.btn");buttons.each(function(index){if(index==0||index==2){jQuery(this).disableBtn();}});}
else{var buttons=jQuery("#catsform").find("a.btn");buttons.each(function(index){if(index==0||index==2){jQuery(this).enableBtn();}});}}
function clearTrunks(chkd){if(chkd==1){trunks.t0.all=1;trunks.t0.subs=new Object();}
else{trunks.t0.all=0;trunks.t0.subs=new Object();}
selectTopicsFromJSONclone();}
function rebuildSubSelection(topic_id){if($("subsel"+topic_id))
$("subsel"+topic_id).parentNode.removeChild($("subsel"+topic_id));spans=new Array();divs=$("t"+topic_id).getElementsByTagName("div");for(var i=0;i<divs.length;i++){if(divs[i].id&&divs[i].id.match(/^t[0-9]+$/i))
spans[spans.length]=divs[i];}
if($("i"+topic_id).value==1){var display=false;for(i=0;i<spans.length;i++){if($("i"+spans[i].id.replace(/[^0-9]+/i,'')).value==0){display=true;break;}}
if(display){jQuery("#t"+topic_id).before("<span id='subsel"+topic_id+"'>&nbsp;&nbsp;<a href='javascript:checkAll($(\"t"+topic_id+"\"), true);' style='font-size: 10px; color: #A0A0A0; font-weight: bold;'>"+"Select subcategories"+"</a></span>");}}
else{var display=false;for(i=0;i<spans.length;i++){if($("i"+spans[i].id.replace(/[^0-9]+/i,'')).value==1){display=true;break;}}
if(display){jQuery("#t"+topic_id).before("<span id='subsel"+topic_id+"'>&nbsp;&nbsp;<a href='javascript:uncheckAll($(\"t"+topic_id+"\"), true);' style='font-size: 10px; color: #A0A0A0; font-weight: bold;'>"+"Deselect subcategories"+"</a></span>");}}
var node="";var nd=$("t"+topic_id);while(!nd.parentNode.id||nd.parentNode.id!="t0"){if(nd.parentNode.id&&nd.parentNode.id.match(/t[0-9]+/i)){node=nd.parentNode.id.replace(/[^0-9]+/i,'');break;}
nd=nd.parentNode;}
if(node!="")
rebuildSubSelection(node);}
function isChecked(img){if($("i"+img.id.replace(/[^0-9]+/i,'')).value=="1")
return true;else
return false;}
function uncheckJSON(nodes,tops){if(nodes.length==1){tops[nodes[nodes.length-1]].sel=0;return tops;}
if(tops[nodes[nodes.length-1]].all==0&&(tops[nodes[nodes.length-1]].subs.length==0||!tops[nodes[nodes.length-1]].subs[nodes[nodes.length-2]]))
return tops;if(tops[nodes[nodes.length-1]].all==0){nodes_nxt=nodes.slice(0);nodes_nxt.splice(nodes_nxt.length-1,1);if(nodes_nxt.length==1&&JSON.stringify(tops[nodes[nodes.length-1]].subs[nodes[nodes.length-2]].subs).match(/^[\{\}\s]+$/i)&&tops[nodes[nodes.length-1]].subs[nodes[nodes.length-2]].all==0)
delete tops[nodes[nodes.length-1]].subs[nodes[nodes.length-2]];else{tops[nodes[nodes.length-1]].subs=uncheckJSON(nodes_nxt,tops[nodes[nodes.length-1]].subs);if(tops[nodes[nodes.length-1]].subs[nodes[nodes.length-2]].sel==0&&JSON.stringify(tops[nodes[nodes.length-1]].subs[nodes[nodes.length-2]].subs).match(/^[\{\}\s]+$/i)&&tops[nodes[nodes.length-1]].subs[nodes[nodes.length-2]].all==0){delete tops[nodes[nodes.length-1]].subs[nodes[nodes.length-2]];}}
return tops;}
if(tops[nodes[nodes.length-1]].subs.length==0){tops[nodes[nodes.length-1]].subs=new Object();}
if(!tops[nodes[nodes.length-1]].subs[nodes[nodes.length-2]]){tops[nodes[nodes.length-1]].subs[nodes[nodes.length-2]]=new Object();tops[nodes[nodes.length-1]].subs[nodes[nodes.length-2]].sel=1;tops[nodes[nodes.length-1]].subs[nodes[nodes.length-2]].all=1;tops[nodes[nodes.length-1]].subs[nodes[nodes.length-2]].subs=new Object();}
nodes_nxt=nodes.slice(0);nodes_nxt.splice(nodes_nxt.length-1,1);tops[nodes[nodes.length-1]].subs=uncheckJSON(nodes_nxt,tops[nodes[nodes.length-1]].subs);return tops;}
function uncheck(input,img,open,refresh,openmrr){if(typeof(open)=='undefined')
open=true;if(typeof(refresh)=='undefined')
refresh=true;if(typeof(openmrr)=='undefined')
openmrr=false;input.value="0";img.src=wgStaticFilesServer+"/templates/icons/no_chk.gif";topic_id=input.name.replace(/[^0-9]+/i,'');if(open&&(!$("t"+topic_id).innerHTML.replace(/(<([^>]+)>)/ig,"").match(/[a-z]+/i)||($("t"+topic_id).innerHTML.replace(/(<([^>]+)>)/ig,"").match(/[a-z]+/i)&&$("t"+topic_id).style.display=="none")))
if($("t"+topic_id)&&$("t"+topic_id).getAttribute('islink')&&$("t"+topic_id).getAttribute('islink')!=0)
openTopic(topic_id,eval('('+$("t"+topic_id).getAttribute('islink')+')'));else
openTopic(topic_id);if(refresh){nodes=new Array();nodes[nodes.length]="t"+topic_id;while(!input.parentNode.id||input.parentNode.id!="t0"){if(input.parentNode.id&&input.parentNode.id.match(/t[0-9]+/i)){nodes[nodes.length]=input.parentNode.id;}
input=input.parentNode;}
nodes[nodes.length]="t0";trunks=uncheckJSON(nodes,trunks);}
rebuildSubSelection(topic_id);if($('t'+topic_id)&&$('t'+topic_id).getAttribute('islink')&&$('t'+topic_id).getAttribute('islink')!=0&&openmrr){links=eval('('+$('t'+topic_id).getAttribute('islink')+')');if(links&&links.length>0){for(var i=0;i<links.length;i++){if($("i"+links[i])){uncheck($("i"+links[i]),$("c"+links[i]),false,true);}}}}}
function checkJSON(nodes,tops){if(nodes.length==1){tops[nodes[nodes.length-1]].sel=1;return tops;}
if(tops[nodes[nodes.length-1]].all==1&&(tops[nodes[nodes.length-1]].subs.length==0||!tops[nodes[nodes.length-1]].subs[nodes[nodes.length-2]]))
return tops;if(tops[nodes[nodes.length-1]].all==1){nodes_nxt=nodes.slice(0);nodes_nxt.splice(nodes_nxt.length-1,1);if(nodes_nxt.length==1&&JSON.stringify(tops[nodes[nodes.length-1]].subs[nodes[nodes.length-2]].subs).match(/^[\{\}\s]+$/i)&&tops[nodes[nodes.length-1]].subs[nodes[nodes.length-2]].all==1)
delete tops[nodes[nodes.length-1]].subs[nodes[nodes.length-2]];else{tops[nodes[nodes.length-1]].subs=checkJSON(nodes_nxt,tops[nodes[nodes.length-1]].subs);if(tops[nodes[nodes.length-1]].subs[nodes[nodes.length-2]].sel==1&&JSON.stringify(tops[nodes[nodes.length-1]].subs[nodes[nodes.length-2]].subs).match(/^[\{\}\s]+$/i)&&tops[nodes[nodes.length-1]].subs[nodes[nodes.length-2]].all==1){delete tops[nodes[nodes.length-1]].subs[nodes[nodes.length-2]];}}
return tops;}
if(tops[nodes[nodes.length-1]].subs.length==0){tops[nodes[nodes.length-1]].subs=new Object();}
if(!tops[nodes[nodes.length-1]].subs[nodes[nodes.length-2]]){tops[nodes[nodes.length-1]].subs[nodes[nodes.length-2]]=new Object();tops[nodes[nodes.length-1]].subs[nodes[nodes.length-2]].sel=0;tops[nodes[nodes.length-1]].subs[nodes[nodes.length-2]].all=0;tops[nodes[nodes.length-1]].subs[nodes[nodes.length-2]].subs=new Object();}
nodes_nxt=nodes.slice(0);nodes_nxt.splice(nodes_nxt.length-1,1);tops[nodes[nodes.length-1]].subs=checkJSON(nodes_nxt,tops[nodes[nodes.length-1]].subs);return tops;}
function check(input,img,open,refresh,openmrr){if(typeof(open)=='undefined')
open=true;if(typeof(refresh)=='undefined')
refresh=true;if(typeof(openmrr)=='undefined')
openmrr=false;input.value="1";img.src=wgStaticFilesServer+"/templates/icons/chk.gif";topic_id=input.name.replace(/[^0-9]+/i,'');if(open&&(!$("t"+topic_id).innerHTML.replace(/(<([^>]+)>)/ig,"").match(/[a-z]+/i)||($("t"+topic_id).innerHTML.replace(/(<([^>]+)>)/ig,"").match(/[a-z]+/i)&&$("t"+topic_id).style.display=="none")))
if($("t"+topic_id)&&$("t"+topic_id).getAttribute('islink')&&$("t"+topic_id).getAttribute('islink')!=0)
openTopic(topic_id,eval('('+$("t"+topic_id).getAttribute('islink')+')'));else
openTopic(topic_id);if(refresh){nodes=new Array();nodes[nodes.length]="t"+topic_id;while(!input.parentNode.id||input.parentNode.id!="t0"){if(input.parentNode.id&&input.parentNode.id.match(/t[0-9]+/i)){nodes[nodes.length]=input.parentNode.id;}
input=input.parentNode;}
nodes[nodes.length]="t0";trunks=checkJSON(nodes,trunks);}
rebuildSubSelection(topic_id);if($('t'+topic_id)&&$('t'+topic_id).getAttribute('islink')&&$('t'+topic_id).getAttribute('islink')!=0&&openmrr){links=eval('('+$('t'+topic_id).getAttribute('islink')+')');if(links&&links.length>0){for(var i=0;i<links.length;i++){if($("i"+links[i])){check($("i"+links[i]),$("c"+links[i]),false,true);}}}}}
function checkAll(table,incsubs,refresh){if(typeof(incsubs)!='undefined'&&incsubs==true){var topic_id=table.id.replace(/[^0-9]+/i,'');var str_trunks=JSON.stringify(trunks);if(str_trunks.indexOf('"t'+topic_id+'":{"sel":1,"all":0,"subs":')>=0||(str_trunks.indexOf('"t'+topic_id+'":{"sel":1,"all":1,"subs":')>=0&&str_trunks.indexOf('"t'+topic_id+'":{"sel":1,"all":1,"subs":{}')==-1)||(str_trunks.indexOf('"t'+topic_id)==-1)||str_trunks.indexOf('"t'+topic_id+'":{"sel":0,"all":0,"subs":{}')>=0){if(str_trunks.indexOf('"t'+topic_id)==-1){if($("i"+topic_id).value==1){uncheck($("i"+topic_id),$("c"+topic_id),false,true);}
else{check($("i"+topic_id),$("c"+topic_id),false,true);}}
nodes=new Array();while(!table.parentNode.id||table.parentNode.id!="t0"){if(table.parentNode.id&&table.parentNode.id.match(/t[0-9]+/i)){nodes[nodes.length]=table.parentNode.id;}
table=table.parentNode;}
var mobj=trunks.t0.subs;for(var i=nodes.length-1;i>=0;i--){mobj=mobj[nodes[i]].subs;}
mobj["t"+topic_id].subs=new Object();mobj["t"+topic_id].all=1;checkAll($("t"+topic_id));if(str_trunks.indexOf('"t'+topic_id)==-1){if($("i"+topic_id).value==1){uncheck($("i"+topic_id),$("c"+topic_id),false,true);}
else{check($("i"+topic_id),$("c"+topic_id),false,true);}}}
if($("subsel"+topic_id))
$("subsel"+topic_id).parentNode.removeChild($("subsel"+topic_id));jQuery("#t"+topic_id).before("<span id='subsel"+topic_id+"'>&nbsp;&nbsp;<a href='javascript:uncheckAll($(\"t"+topic_id+"\"), true);' style='font-size: 10px; color: #A0A0A0; font-weight: bold;'>"+"Deselect subcategories"+"</a></span>");var allsubs_desel=true;var divs=$("t0").getElementsByTagName("input");for(var i=0;i<divs.length;i++){if(divs[i].id&&divs[i].id.match(/^i[0-9]+$/i)&&divs[i].value==1){allsubs_desel=false;break;}}
if(!allsubs_desel){var buttons=jQuery("#catsform").find("a.btn");buttons.each(function(index){if(index==0||index==2){jQuery(this).enableBtn();}});}}
else{inputs=table.getElementsByTagName('input');if(typeof(refresh)=='undefined')
refresh=true;for(i=0;i<inputs.length;i++){if(inputs[i].name.match(/i[0-9]+/i))
check(inputs[i],$('c'+inputs[i].name.replace(/[^0-9]+/i,'')+''),false,refresh);}}}
function uncheckAll(table,incsubs,refresh){if(typeof(incsubs)!='undefined'&&incsubs==true){var topic_id=table.id.replace(/[^0-9]+/i,'');var str_trunks=JSON.stringify(trunks);if(str_trunks.indexOf('"t'+topic_id+'":{"sel":0,"all":1,"subs":')>=0||(str_trunks.indexOf('"t'+topic_id+'":{"sel":0,"all":0,"subs":')>=0&&str_trunks.indexOf('"t'+topic_id+'":{"sel":0,"all":0,"subs":{}')==-1)||(str_trunks.indexOf('"t'+topic_id)==-1)||str_trunks.indexOf('"t'+topic_id+'":{"sel":1,"all":1,"subs":{}')>=0){if(str_trunks.indexOf('"t'+topic_id)==-1){if($("i"+topic_id).value==1){uncheck($("i"+topic_id),$("c"+topic_id),false,true);}
else{check($("i"+topic_id),$("c"+topic_id),false,true);}}
nodes=new Array();while(!table.parentNode.id||table.parentNode.id!="t0"){if(table.parentNode.id&&table.parentNode.id.match(/t[0-9]+/i)){nodes[nodes.length]=table.parentNode.id;}
table=table.parentNode;}
var mobj=trunks.t0.subs;for(var i=nodes.length-1;i>=0;i--){mobj=mobj[nodes[i]].subs;}
mobj["t"+topic_id].subs=new Object();mobj["t"+topic_id].all=0;uncheckAll($("t"+topic_id));if(str_trunks.indexOf('"t'+topic_id)==-1){if($("i"+topic_id).value==1){uncheck($("i"+topic_id),$("c"+topic_id),false,true);}
else{check($("i"+topic_id),$("c"+topic_id),false,true);}}}
if($("subsel"+topic_id))
$("subsel"+topic_id).parentNode.removeChild($("subsel"+topic_id));jQuery("#t"+topic_id).before("<span id='subsel"+topic_id+"'>&nbsp;&nbsp;<a href='javascript:checkAll($(\"t"+topic_id+"\"), true);' style='font-size: 10px; color: #A0A0A0; font-weight: bold;'>"+"Select subcategories"+"</a></span>");var allsubs_desel=true;var divs=$("t0").getElementsByTagName("input");for(var i=0;i<divs.length;i++){if(divs[i].id&&divs[i].id.match(/^i[0-9]+$/i)&&divs[i].value==1){allsubs_desel=false;break;}}
if((trunks.t0.all==0&&JSON.stringify(trunks.t0.subs).match(/^[\{\}\s]+$/i))||allsubs_desel){var buttons=jQuery("#catsform").find("a.btn");buttons.each(function(index){if(index==0||index==2){jQuery(this).disableBtn();}});}}
else{inputs=table.getElementsByTagName('input');if(typeof(refresh)=='undefined')
refresh=true;for(i=0;i<inputs.length;i++){if(inputs[i].name.match(/i[0-9]+/i))
uncheck(inputs[i],$('c'+inputs[i].name.replace(/[^0-9]+/i,'')+''),false,refresh);}}}
function selectTopicsFromJSON(topics,open){for(var topic in topics){if(topic.replace(/[^0-9]+/i,"")=="")
continue;subs_length=0;for(var sub in topics[topic]["subs"]){if(sub.match(/t[0-9]+/i)){subs_length++;break;}}
if(typeof(open)=='undefined'||open!==false)
open=true;topic_id=topic.replace(/[^0-9]+/i,"");if(topics[topic]["sel"]=="1"&&topic!="t0"){var topen;if((open||subs_length>0)&&(!xDef(topics[topic]["open"])||topics[topic]["open"]))
topen=true;else
topen=false;check($("i"+topic_id),$("c"+topic_id),topen,false);}
else if(topic!="t0"){var topen;if((open||subs_length>0)&&(!xDef(topics[topic]["open"])||topics[topic]["open"]))
topen=true;else
topen=false;uncheck($("i"+topic_id),$("c"+topic_id),topen,false);}
if(topics[topic]["all"]=="1"){if($(topic))
checkAll($(topic),false,false);}
else{if($(topic))
uncheckAll($(topic),false,false);}
if(subs_length>0){selectTopicsFromJSON(topics[topic].subs,open);}}}
function clone(myObj){if(typeof(myObj)!='object')return myObj;if(myObj==null)return myObj;var myNewObj=new Object();for(var i in myObj){if(i=="mArticleID"||i=="mTitle"||i=="canEditQ"||i=="isAnswered"||i=="isSysop"||i=="numAlts"||i=="isProtected"||i=="all"||i=="subs"||i=="sel"||i.match(/^t[0-9]+$/i))
myNewObj[i]=clone(myObj[i]);}
return myNewObj;}
function setSearchTabs(){jQuery('#AdvancedSearchMenu a').click(function(){searchTabs(jQuery(this),jQuery(this).attr('class'));});var hashTag=document.location.hash;if(hashTag!=""&&hashTag.substring(0,3)!="#?="){var subHashTag=document.location.hash.substring(1);searchTabs(jQuery('.'+subHashTag),subHashTag);}}
function showTopicsHint(id){var jElem=jQuery("#"+id);popup_elem.build(jElem,230,0);if(categories_list.length==0){popup_elem.makeTooltip("Click here to choose categories to include or exclude in your search");}else{popup_elem.makeTooltip("Click here to edit the list of categories you\'re searching in");}
popup_elem.moveFromElemX(-20);var moveY=($('tooltip_elem'))?-($('tooltip_elem').getHeight()):-45;popup_elem.moveFromElemY(moveY);}
function selectAllCats(){categories_list=[];$('topics_hint').innerHTML="all categories";$('searchform').trunks.value='{"t0":{"sel":1,"all":1,"subs":[]}}';$('notin').innerHTML="";search_trunks=URLEncodeEmail($('searchform').trunks.value);navGo(1);}
function check_searchA(elem){btnElm=jQuery('#searchanswersform').find("a.btn:first");if(jQuery(elem).val().length>2){btnElm.enableBtn();}else{btnElm.disableBtn();}}
function check_searchRA(elem){btnElm=jQuery('form[name=raSearch]').find("a.btn:first");if(jQuery(elem).val().length>0){btnElm.enableBtn();}else{btnElm.disableBtn();}}
function check_searchM(elem){btnElm=jQuery('#userNameSearch').find("a.btn:first");if(jQuery(elem).val().length>2){btnElm.enableBtn();}else{btnElm.disableBtn();}}
function check_searchQ(elem){return false;}
function searchTabs(link,id){jQuery('#selected').attr('id','');jQuery(link).attr('id','selected');jQuery("#"+current_id).hide();text_id=jQuery('#text_'+id);jQuery(text_id).val(jQuery('#text_'+current_id).val());checkID="check_"+id+'(text_id)';jQuery("#"+id).show();eval(checkID);current_id=id;}
handleEnterKeyOnForms("searchform");handleEnterKeyOnForms("searchanswersform");handleEnterKeyOnForms("userNameSearch");function selectionPopupMenu(containingDivId,windowSize,content){var popupWindowId="popupMenu";popup_elem.buildModal(popupWindowId,windowSize.x,windowSize.y);var popupWindow=jQuery("#"+popupWindowId);popup_elem.fill(content);var containingDiv=jQuery("#"+containingDivId);if(windowSize.y!=0){windowSize.y=containingDiv.height();popupWindow.css({height:windowSize.y+"px"});popup_elem.ph=windowSize.y;}
if(windowSize.x!=0){windowSize.x=containingDiv.width();popupWindow.css({width:windowSize.x+"px"});popup_elem.pw=windowSize.x;}
containingDiv.css({position:"static"});popup_elem.centralize({x:containingDiv.width(),y:containingDiv.height()});if(!popupWindow[0].xDragEnabled){xEnableDrag('popupWindow',function(ele,mouseX,mouseY,xEventObj){popupWindow.css({cursor:"move"});},function(ele,mouseDX,mouseDY,xEventObj){var x=xLeft(popupWindow[0])+mouseDX;var y=xTop(popupWindow[0])+mouseDY;xMoveTo(popupWindow[0],x,y);},function(ele,mouseX,mouseY,xEventObj){popupWindow.css({cursor:"auto"});});}}
function popupMenuHide(){enableScrollBars();popup_elem.closeModal();}
var popup_elem={pw:0,ph:0,elem:null,innerHTML:'',menuItems:[],isTooltip:false,isModal:false,initialize:function(elem,pw,ph){popup_elem.pw=pw;popup_elem.ph=ph;popup_elem.elem=elem;popup_elem.clearMenu();popup_elem.innerHTML="";popup_elem.isTooltip=false;popup_elem.isModal=false;},buildModal:function(id,pw,ph){popup_elem.initialize(document,pw,ph);setTimeout("hideTooltip();",50);if(!xModalDialog.instances[id]){var div=document.createElement("div");div.id=id;div.className="clsModalDialog";div.innerHTML="";jQuery(div).css({backgroundColor:"#FFFFFF",position:"absolute",left:"-500px",top:"-500px",width:(this.pw?this.pw+"px":"auto"),height:(this.ph?this.ph+"px":"auto"),padding:0,margin:0,overflow:"hidden",zIndex:"52"}).hide();jQuery('#container').after(div);new xModalDialog(id);}
popup_elem.elem=jQuery("#"+id)[0];popup_elem.isModal=true;},makeModal:function(close_on_click){if(!xModalDialog.instances["temp_modal"]){var div=document.createElement("div");div.id="temp_modal";div.className="clsModalDialog";div.innerHTML="";jQuery(div).css({position:"absolute",left:"-500px",top:"-500px",width:0,height:0,padding:0,margin:0,zIndex:"49"});jQuery('#container').after(div);new xModalDialog("temp_modal");}
var need_hide_float=false;if(jQuery('#br_container').length!=0&&(!jQuery('#br_container').css('display')||jQuery('#br_container').css('display')!="none")){need_hide_float=true;br_hide_float_container();}
xModalDialog.instances["temp_modal"].show();popup_elem.operaRefresh();if(need_hide_float){br_show_float_container();}
if(typeof(close_on_click)!='undefined'&&close_on_click){jQuery(xModalDialog.grey).bind("click",popup_elem.removeModal);}},removeModal:function(){if(xModalDialog.instances["temp_modal"]){xModalDialog.instances["temp_modal"].hide();popup_elem.operaRefresh();jQuery(xModalDialog.grey).unbind("click",popup_elem.removeModal);}},destroyModal:function(){popup_elem.elem.parentNode.removeChild(popup_elem.elem);popup_elem.operaRefresh();},hideModal:function(){if(popup_elem.elem&&popup_elem.elem.id&&xModalDialog&&xModalDialog.instances&&xModalDialog.instances[popup_elem.elem.id]){xModalDialog.instances[popup_elem.elem.id].hide();popup_elem.operaRefresh();}},closeModal:function(){popup_elem.hideModal();if(xModalDialog.instances[popup_elem.elem.id]){jQuery("#"+popup_elem.elem.id).remove();xModalDialog.instances[popup_elem.elem.id]=null;jQuery('#xModalDialogGreyElement').remove();xModalDialog.grey=null;popup_elem.operaRefresh();}},centralize:function(dims){var div=null;if(popup_elem.isModal)
div=jQuery(popup_elem.elem);else
div=jQuery('#tooltip_elem')[0];var ie=document.all;if(dims==null){dims={x:popup_elem.pw,y:popup_elem.ph};}
new_left=ie&&!window.opera?iecompattest().scrollLeft+parseInt(iecompattest().clientWidth/2):window.pageXOffset+parseInt(window.innerWidth/2);new_left=parseInt(new_left-(dims.x/2));new_top=ie&&!window.opera?iecompattest().scrollTop+parseInt(iecompattest().clientHeight/2):window.pageYOffset+parseInt(window.innerHeight/2);new_top=parseInt(new_top-(dims.y/2));browserName=navigator.appName;if(browserName.match(/opera/i)){new_top=new_top-20;}
popup_elem.moveX(new_left);popup_elem.moveY(new_top);div.show();},build:function(elem,pw,ph,shadow){popup_elem.initialize(elem,pw,ph);hideTooltip();var div=document.createElement("div");div.id="tooltip_shadow";div.innerHTML="";jQuery(div).css({position:"absolute",left:"-500px",padding:0,margin:0,overflow:"hidden",zIndex:"50",width:((popup_elem.pw!=0)?""+popup_elem.pw+"px":"auto"),height:((popup_elem.ph!=0)?""+popup_elem.ph+"px":"auto")}).hide();jQuery('#left-column').before(div);var div2=document.createElement("div");div2.id="tooltip_elem";jQuery(div2).css({position:"absolute",left:"-500px",padding:0,margin:0,zIndex:"51",width:((popup_elem.pw!=0)?""+popup_elem.pw+"px":"auto"),height:((popup_elem.ph!=0)?""+popup_elem.ph+"px":"auto")}).hide();jQuery('#left-column').before(div2);if(typeof(shadow)!='undefined'&&shadow){arVersion=navigator.appVersion.split("MSIE");version=parseFloat(arVersion[1]);browserName=navigator.appName;if((browserName=="Microsoft Internet Explorer")&&(version>=5.5)&&(version<7.0)&&(document.body.filters)){jQuery(div2).css({background:"url("+wgStaticFilesServer+"/templates/icons/shadow_small.gif) repeat bottom right"});}
else{jQuery(div2).css({background:"url("+wgStaticFilesServer+"/templates/icons/shadowAlpha.png) repeat bottom right"});}}
jQuery(document).bind("click",checkTooltip);},operaRefresh:function(){browserName=navigator.appName;if(browserName.match(/opera/i)){document.body.className=document.body.className.replace(/ttip/i,"");document.body.className+=' ttip';}},fill:function(html){if(!xModalDialog.grey){new xModalDialog(popup_elem.elem.id);}
if(!popup_elem.isModal){jQuery('#tooltip_elem').html(html);}
else{jQuery(popup_elem.elem).html(html).show();if(xModalDialog.instances[popup_elem.elem.id]){var need_hide_float=false;var cur_br_tt_scroll_top=0;var br_tt=jQuery('#br_tt');if(br_tt.length!=0){cur_br_tt_scroll_top=br_tt.scrollTop();}
if(jQuery('#br_container').length!=0&&(!jQuery('#br_container').css("display")||jQuery('#br_container').css("display")!="none")){need_hide_float=true;br_hide_float_container();}
xModalDialog.instances[popup_elem.elem.id].show();var fade=new Fadomatic(xModalDialog.grey,100,30,30,30);fade.fadeIn();if(need_hide_float){br_show_float_container();}
if(br_tt.length!=0){br_tt.scrollTop(cur_br_tt_scroll_top);}}}
popup_elem.operaRefresh();},makeTooltip:function(text){popup_elem.fill("<table cellpadding='0' cellspacing='0' style='padding: 0; margin: 0; border: 0; width: "+(popup_elem.pw-9)+"px;'><tr><td style='height: "+(popup_elem.ph-32)+"px; padding: 0; margin: 0; width: "+(popup_elem.pw-9)+"px; border: 0; overflow: hidden; text-align: left;'><div style='color: #000000; font-size: 11px; padding: 5px; width: "+(popup_elem.pw-29)+"px; white-space: normal; background-color: #FFFF8F; text-align: center; border: #DCDCDC 1px solid;'>"+text+"</div></td></tr></table>");popup_elem.isTooltip=true;},menuStart:function(id){if(typeof(id)=='undefined')
id='';popup_elem.innerHTML="<table cellpadding='0' cellspacing='0' style='padding: 0; margin: 0; border: 0; width: "+popup_elem.pw+"px;'><tr><td style='height: "+popup_elem.ph+"px; padding: 0; margin: 0; width: "+popup_elem.pw+"px; border: 0; text-align: left;'><div style='color: #000000; font-size: 11px; padding: 5px; width: "+(popup_elem.pw-13)+"px; white-space: normal; background-color: #FFFFFF; text-align: center; border: #DCDCDC 1px solid; position: relative; left: -5px; top: -5px; height: "+(popup_elem.ph-13)+"px;' onmouseover='' id='"+id+"'>";},menuLongStart:function(){popup_elem.innerHTML="<table cellpadding='0' cellspacing='0' style='padding: 0; margin: 0; border: 0;'><tr><td style='height: 250px; padding: 0; margin: 0; border: 0; text-align: left;'><div style='color: #000000; font-size: 11px; padding: 5px; white-space: normal; background-color: #FFFFFF; text-align: center; border: #DCDCDC 1px solid; position: relative; left: -5px; top: -5px;' onmouseover=''><div style='height: 237px; margin: 0; padding: 0; overflow-y: auto; overflow-x: hidden; margin-bottom: 5px; padding-right: 5px;' id='long_menu_list'>";},menuEnd:function(){popup_elem.innerHTML+="</div></td></tr></table>";},menuLongEnd1:function(){popup_elem.innerHTML+="</div>";},makeMenu:function(id){if(typeof(id)=='undefined')
id='';popup_elem.menuStart(id);for(i=0;i<popup_elem.menuItems.length;i++){popup_elem.innerHTML+=popup_elem.menuItems[i];}
popup_elem.menuEnd();popup_elem.fill(popup_elem.innerHTML);popup_elem.isTooltip=false;popup_elem.isModal=false;},makeLongMenu:function(){popup_elem.menuLongStart();for(i=0;i<popup_elem.menuItems.length;i++){popup_elem.innerHTML+=popup_elem.menuItems[i];}
popup_elem.menuLongEnd1();popup_elem.fill(popup_elem.innerHTML+"</div></td></tr></table>");popup_elem.isTooltip=false;popup_elem.isModal=false;},clearMenu:function(){popup_elem.menuItems=[];},addCustomMenuItem:function(text,align){var code="<p style='white-space: nowrap; ";if(align&&align!='')
code=code+"text-align: "+align+";";code=code+"color: #A0A0A0; cursor: default; margin: 0; padding: 0;'>"+text+"";popup_elem.menuItems[popup_elem.menuItems.length]=code;},addMenuItem:function(text,ds,action,align){var code="<p style='white-space: nowrap; ";if(align&&align!='')
code=code+"text-align: "+align+";";if(ds){code+="color: #A0A0A0; cursor: default; margin: 0; padding: 4px;";}
else{code+="color: #000000; cursor: pointer; padding: 4px; margin: 0;' onmouseover='this.style.padding=\"3px\"; this.style.backgroundColor=\"#E0FEC0\"; this.style.border=\"#CEECAE 1px solid\";' onmouseout='this.style.padding=\"4px\"; this.style.backgroundColor=\"#FFFFFF\"; this.style.border=\"0\";' onclick='";if(action&&action!=""){code+=action;}}
code=code+"'>"+text+"</p>";popup_elem.menuItems[popup_elem.menuItems.length]=code;},addLinkMenuItem:function(text,ds,url,align,nw,bold,linkType){var p="<p style='white-space: nowrap; ";var a="";if(align&&align!='')
p=p+"text-align: "+align+";";if(ds){p+="color: #A0A0A0; cursor: default; margin: 0; padding: 4px;'>";}
else{p+="color: #003399; cursor: pointer; padding: 4px; margin: 0;' onmouseover='this.style.padding=\"3px\"; this.style.backgroundColor=\"#E0FEC0\"; this.style.border=\"#CEECAE 1px solid\"; this.style.textDecoration = \"underline\";' onmouseout='this.style.padding=\"4px\"; this.style.backgroundColor=\"#FFFFFF\"; this.style.border=\"0\"; this.style.textDecoration = \"none\";'>";if(url&&url!=""){a="<a href=\"";if(url.match(/^javascript:/i))
a=a+"javascript:void(0);\"";else
a=a+url+"\"";if(url.match(/^javascript:/i)){if(linkType&&typeof(subRefererOrangeMenu)!='undefined'){a=a+" onclick='addsubReferer("+subRefererOrangeMenu[linkType]+",\""+article_object.mTitle+"\"); "+url.replace(/^javascript:/i,"")+" return false;'";}else{a=a+" onclick='"+url.replace(/^javascript:/i,"")+"' return false; ";}}
if(nw){if(linkType&&typeof(subRefererOrangeMenu)!='undefined'){a=a+" target='_blank' onclick=\"addsubReferer("+subRefererOrangeMenu[linkType]+",'"+article_object.mTitle+"');popup_elem.removeModal();\"";}else{a=a+" target='_blank' onclick='popup_elem.removeModal();'";}}
if(bold){a=a+" style='font-weight: bold;'";}
a+=">";}}
a=a+p+text;a+="</p>";if(!ds&&url&&url!="")
a+="</a>";popup_elem.menuItems[popup_elem.menuItems.length]=a;},moveX:function(pos){if(!popup_elem.isModal)
jQuery('#tooltip_elem').css({left:pos+"px"});else
jQuery(popup_elem.elem).css({left:pos+"px"});popup_elem.operaRefresh();},moveY:function(pos){if(!popup_elem.isModal)
jQuery('#tooltip_elem').css({top:pos+"px"});else
jQuery(popup_elem.elem).css({top:pos+"px"});popup_elem.operaRefresh();},moveFromElemX:function(mx){popup_elem.moveX(getposOffset(popup_elem.elem,"left")+mx);},moveFromElemY:function(my){popup_elem.moveY(getposOffset(popup_elem.elem,"top")+my);jQuery('#tooltip_elem').show();},addMenuLine:function(){var code="<div style='color: #A0A0A0; cursor: default; margin: 0; padding-top: 5px; padding-bottom: 5px;'><div style='padding: 0; margin: 0; height: 1px; background-color: #CBCBCB; overflow: hidden;'></div></div>";popup_elem.menuItems[popup_elem.menuItems.length]=code;},addMenuButton:function(text,ds,action){var code="<p style='white-space: nowrap; text-align: left; color: #A0A0A0; cursor: default; margin: 0; padding: 0;'><table cellpadding=0 cellspacing=0 border=0><tr><td style='padding: 0; margin: 0;'><div style='color: #000000; cursor: pointer; padding: 0; margin: 0; width: 20px; height: 16px; background-color: #DCDCDC; vertical-align: middle; text-align: center; border: #A0A0A0 1px solid;' onmouseover='this.style.backgroundColor=\"#E0FEC0\";' onmouseout='this.style.backgroundColor=\"#DCDCDC\";' onclick='";if(action&&action!=""){code+=action;}
code=code+"'>+</div></td><td style='white-space: nowrap; color: #000000; padding: 0; margin: 0; vertical-align: middle; text-align: left; padding-left: 10px;'>"+text+"</td></tr></table></p>";popup_elem.menuItems[popup_elem.menuItems.length]=code;},realignBySize:function(){var height=jQuery('#tooltip_elem').height();var width=jQuery('#tooltip_elem').width();var html=popup_elem.innerHTML;popup_elem.build(popup_elem.elem,width,height,true);popup_elem.innerHTML=html;popup_elem.fill(popup_elem.innerHTML);}};function showModalWait(msg,height){var cur_msg=msg?msg:(typeof(msg_wait)!="undefined"?msg_wait:"Please wait...");var cur_height=height?height:(typeof(winHeight_wait)!="undefined"?winHeight_wait:72);popup_elem.buildModal("ajax_loader2",222,cur_height);popup_elem.fill("<table cellpadding='0' cellspacing='0' style='background: #FFFFFF; width: 222px; height: "+(cur_height-4)+"px; border: #99CB04 2px dotted; padding: 0; margin: 0;'><tr><td style='text-align: center; width: 222px; height: "+(cur_height-4)+"px; vertical-align: middle; padding: 0; margin: 0; font-size: 16px; border: 0;'><b>"+cur_msg+"</b><br><img src='"+wgStaticFilesServer+"/templates/icons/ajax-loader2.gif' style='height: 32px; width: 32px; margin-top: 5px;' /></td></tr></table>");jQuery('#container').css({cursor:"wait"});disableScrollBars();}
globalHideModal=function(){enableScrollerAfterModal();popup_elem.hideModal();jQuery('#container').css("cursor","default");if(jQuery('#new_wording').length!=0&&!jQuery('#new_wording')[0].isDisabled){jQuery('#new_wording').focus();}
if(jQuery('#ni_popup').length!=0){popupCursorCheck=(typeof popupCursorCheck!='undefined')?popupCursorCheck:function(){};jQuery('#ni_popup').unbind("mouseover",popupCursorCheck).unbind("mouseout",popupCursorCheck).unbind("mousemove",popupCursorCheck);}
if(jQuery('#warn_user').length!=0){popupCursorCheck=(typeof popupCursorCheck!='undefined')?popupCursorCheck:function(){};jQuery('#warn_user').unbind("mouseover",popupCursorCheck).unbind("mouseout",popupCursorCheck).unbind("mousemove",popupCursorCheck);}
if(jQuery('#rss_elem').length!=0){popupRSSCursorCheck=(typeof popupRSSCursorCheck!='undefined')?popupRSSCursorCheck:function(){};jQuery('#rss_elem').unbind("mouseover",popupCursorCheck).unbind("mouseout",popupCursorCheck).unbind("mousemove",popupCursorCheck);}
if(jQuery('#modal_elem').length!=0){popupModalCursorCheck=(typeof popupModalCursorCheck!='undefined')?popupModalCursorCheck:function(){};jQuery('#modal_elem').unbind("mouseover",popupModalCursorCheck).unbind("mouseout",popupModalCursorCheck).unbind("mousemove",popupModalCursorCheck);if(jQuery('#wysiwygwysiwyg').length!=0&&typeof giveFocusToWysiwyg=='function'){giveFocusToWysiwyg();}}}
function showPWsmall(){var need_hide_float=false;var cur_br_tt_scroll_top=0;var br_tt=jQuery('#br_tt');if(br_tt.length!=0)
cur_br_tt_scroll_top=br_tt.scrollTop();if(jQuery('#br_container').length!=0&&(!jQuery('#br_container').css("display")||jQuery('#br_container').css("display")!="none")){need_hide_float=true;br_hide_float_container();}
setTimeout("hideTooltip();",50);jQuery('#container').css({cursor:"wait"});var buttons=jQuery("#catsform").find("a.btn");buttons.each(function(index){if(index==0||index==2){jQuery(this).disableBtn();}});popup_elem.operaRefresh();var div=document.createElement("div");div.id="please_wait_grey";div.className="clsModalDialog";jQuery(div).css({padding:"0",margin:"87px 5px",overflow:"hidden",backgroundColor:"#000000",width:"481px",height:"305px",position:"absolute",left:"0",top:"0",zIndex:"53"});div.innerHTML="&nbsp;";jQuery("#tt").append(div);var fade=new Fadomatic(jQuery("#please_wait_grey")[0],100,30,30,30);fade.fadeIn();if(!xModalDialog.instances["please_wait"]){div=document.createElement("div");div.id="please_wait";div.className="clsModalDialog";div.innerHTML="<table cellpadding='0' cellspacing='0' style='background: #FFFFFF; width: 222px; height: 68px; border: #99CB04 2px dotted; padding: 0; margin: 0;'><tr><td style='text-align: center; width: 222px; height: 68px; vertical-align: middle; padding: 0; margin: 0; font-size: 16px; border: 0;'><b>"+"Please wait..."+"</b><br><img src='"+wgStaticFilesServer+"/templates/icons/ajax-loader2.gif' style='height: 32px; width: 32px; margin-top: 5px;' /></td></tr></table>";jQuery(div).css({backgroundColor:"#FFFFFF",position:"absolute",left:"-500px",top:"-500px",width:"222px",height:"72px",padding:0,margin:0,overflow:"hidden",zIndex:"52"}).hide();jQuery("#select_topics").after(div);new xModalDialog("please_wait");}
jQuery('#please_wait').show();if(xModalDialog.instances["please_wait"]){xModalDialog.instances["please_wait"].show();jQuery("#please_wait").css({left:function(index,oldval){return parseInt(oldval)-15;}});}
if(need_hide_float){br_show_float_container();}
if(br_tt.length!=0){br_tt.scrollTop(cur_br_tt_scroll_top);}
popup_elem.operaRefresh();}
function hidePWsmall(){jQuery('#container').css({cursor:"default"});if(!Object.isUndefined(trunks)&&!Object.isUndefined(trunks.t0)&&(trunks.t0.all==1||(trunks.t0.all==0&&Object.keys(trunks.t0.subs).length>0))){var buttons=jQuery("#catsform").find("a.btn");buttons.each(function(index){if(index==0||index==2){jQuery(this).enableBtn();}});}
popup_elem.operaRefresh();if(jQuery('#please_wait').length!=0){jQuery('#please_wait').css({display:"none"});jQuery('#please_wait_grey').remove();popup_elem.operaRefresh();}}
function appearSlow(e,w,h,tw,th,onfinish){var jObj=jQuery("#"+e);jObj.css({width:tw-(w*w)+"px",height:th-(h*h)+"px"});jObj.find("div:first").css({width:tw-(w*w)+"px",height:th-(h*h)+"px"});popup_elem.pw=tw-(w*w);popup_elem.ph=th-(h*h);var offset=jObj.offset();offset.left+=0.5-w;offset.top+=0.5-h;jObj.offset(offset);if((w*w)>0&&(h*h)>0){setTimeout("appearSlow('"+e+"', "+(w-1)+", "+(h-1)+", "+tw+", "+th+", '"+onfinish+"');",0);}else{(new Function(onfinish+"();"))();}}
function goSelectCat(){popup_elem.buildModal("select_topics",0,0);popup_elem.fill("<div style='margin: 0; padding: 0; font-size: 16px; vertical-align: top; width: 0; height: 0; text-align: left; border: #8E8E8E 2px solid; background: #FFFFFF;'><div id='categories_popup' style='margin: 0; padding: 0;'>&nbsp;</div></div>");jQuery("#select_topics").css({overflow:'visible',backgroundColor:'transparent'});var cornersObj=new curvyCorners({tl:{radius:10},tr:{radius:10},bl:{radius:10},br:{radius:10},antiAlias:true,autoPad:false},jQuery('#categories_popup').parent()[0]);cornersObj.applyCornersToAll();appearSlow("select_topics",21,21,491,441,"fillCategoriesDialog");}
function showPW2(label){if(typeof label!="undefined"&&label=='ok'){updateTopicsJSON();search_trunks=URLEncodeEmail(jQuery("#searchform input[name=trunks]").val());try{jQuery("#catsform").submit();}catch(err){void(0);}
popup_elem.destroyModal();xModalDialog.instances["select_topics"]=null;enableScrollerAfterModal();disableScrollBars();if(typeof(navGo)=='function'){if(typeof search_total!="undefined"&&search_total==0&&typeof search_page!="undefined"&&search_page!=1){jQuery("#searchform").submit();}else{navGo(1,false,"updateFilterCats");}}}else{jQuery("#searchform input[name=trunks]").val(unescape(search_trunks));popup_elem.destroyModal();xModalDialog.instances["select_topics"]=null;globalHideModal();}}
function showPW1(elem){if(elem.value=='ok'){updateTopicsJSON();search_trunks=URLEncodeEmail(jQuery("#searchform input[name=trunks]").val());try{jQuery("#catsform").submit();}catch(err){void(0);}
popup_elem.destroyModal();xModalDialog.instances["select_topics"]=null;disableScrollBars();if(typeof(navGo)=='function'){navGo(1,false,"updateFilterCats");}}else{jQuery("#searchform input[name=trunks]").val(unescape(search_trunks));popup_elem.destroyModal();globalHideModal();xModalDialog.instances["select_topics"]=null;}}
function fillCategoriesDialog(){var categories_popup=jQuery('#categories_popup');categories_popup.parent().css({cursor:"wait"});categories_popup.html("<div style='font-size: 12px; padding-left: 13px;'>"+"Please wait..."+"<div style='padding-top: 180px; text-align: center; margin-left: -13px;'><img src='"
+wgStaticFilesServer+"/templates/icons/ajax-loader3.gif' border=0 alt='"
+"Please wait..."+"' /></div></div>");var url='/Q/Special:Search&ajax=1&act=selcats';new Ajax.Request(url,{method:"get",onSuccess:function(transport){categories_popup.parent().css({cursor:"default"});disableScrollBars();categories_popup.css({fontSize:"12px"}).html(transport.responseText);trunks=(new Function("return "+jQuery("#searchform input[name=trunks]").val()))();selectTopicsFromJSON(trunks,true);},onException:function(requester,except){alertBrowserError();popup_elem.destroyModal();globalHideModal();xModalDialog.instances["select_topics"]=null;disableScrollBars();}});}
function submitCaptcha(){var challenge=jQuery("#recaptcha_frame").contents().find("#recaptcha_challenge_field");var response=jQuery("#recaptcha_frame").contents().find("#recaptcha_response_field");if(challenge.length!=0&&response.length!=0){var captcha_challenge=challenge.val();var captcha_response=response.val();}else{globalHideModal();alert("Error: There's no captcha loaded");return;}
jQuery('#modal_int_text').html("<div style='font-size: 12px;'><div style='padding-top: 118px; text-align: center;'><img src='"+wgStaticFilesServer+"/templates/icons/ajax-loader3.gif' border=0 alt='Please wait...' /></div></div>");submitDiscussion(2,{captcha:captcha_challenge,cresponse:captcha_response});}
function setFunctionsForCaptcha(captchaContents){getCaptchaAPI=function(){globalHideModal();(new Function(captchaContents))();jQuery('#modal_elem').css({"z-index":101});};hideBDA=function(){globalHideModal();enableNewButtons('#editform');jQuery("#wysiwygwysiwyg").focus();};focusBDA=function(){jQuery('#bda_int_text').find("a:first").focus();jQuery('#closeModalDIV').find("img").click(hideBDA);};}
hideModal=function(){enableScrollerAfterModal();popup_elem.hideModal();jQuery('#modal_elem').unbind("mouseover",popupModalCursorCheck).unbind("mouseout",popupModalCursorCheck).unbind("mousemove",popupModalCursorCheck);if(jQuery('#wysiwygwysiwyg').length!=0&&typeof giveFocusToWysiwyg=='function'){giveFocusToWysiwyg();}};popupModalCursorCheck=function(event){if(!event)var event=window.event;var cursor=getCursorPosition(event);var left=jQuery('#modal_elem').offset().left;var top=jQuery('#modal_elem').offset().top;var height=jQuery('#modal_elem').height();var width=jQuery('#modal_elem').width();if(left<cursor.x&&top<cursor.y&&left+width>cursor.x&&top+height>cursor.y&&!(left+15<cursor.x&&top+15<cursor.y&&left+width-15>cursor.x&&top+height-15>cursor.y)){jQuery('#modal_elem').css({cursor:"move"});}else{jQuery('#modal_elem').css({cursor:"auto"});}};resizeModal=function(){jQuery('#outerModalDIV').css({position:"absolute"});init_size={x:jQuery('#outerModalDIV').outerWidth(),y:jQuery('#outerModalDIV').outerHeight()};jQuery('#modal_elem').css({width:init_size.x,height:init_size.y});popup_elem.pw=init_size.x;popup_elem.ph=init_size.y;jQuery('#outerModalDIV').css({position:"static"});popup_elem.centralize();};showModal=function(modal_body,width,height){var init_size={x:(!!width)?width:400,y:(!!height)?height:300};var translatedClose="Close";popup_elem.buildModal('modal_elem',init_size.x,init_size.y);popup_elem.fill("<div id='outerModalDIV' style='position: absolute; left: -10000px; top: -10000px;'><table cellpadding='0' cellspacing='0' style='background: #FFFFFF; width: "+init_size.x+"px; height: "+(init_size.y-4)+"px; border: #8E8E8E 2px solid; padding: 0; margin: 0;'><tr><td style='text-align: center; width: "+init_size.x+"px; height: "+(init_size.y-4)+"px; vertical-align: top; padding: 0; margin: 0; font-size: 16px; border: 0;'><div id='closeModalDIV' align='right'><img src='"+wgStaticFilesServer+"/templates/icons/x.gif' style='cursor: pointer;' title='"+translatedClose+"' alt='"+translatedClose+"' onclick='hideModal(); isInviteFriednWinClosed = true;' /></div><div id='modal_int_text' style='color: #000000; font-size: 12px; padding-left: 15px; padding-right: 15px;'></div></td></tr></table></div>");disableScrollerOnModal();if(!jQuery('#modal_elem')[0].xDragEnabled)
xEnableDrag('modal_elem',function(ele,mouseX,mouseY,xEventObj){var targ;if(!xEventObj)var xEventObj=window.event;if(xEventObj.target)targ=xEventObj.target;else if(xEventObj.srcElement)targ=xEventObj.srcElement;if(targ.nodeType&&targ.nodeType==3)
targ=targ.parentNode;if(targ.tagName.match(/textarea|input/i))return false;jQuery('#modal_elem').unbind("mouseover",popupModalCursorCheck).unbind("mouseout",popupModalCursorCheck).unbind("mousemove",popupModalCursorCheck);jQuery('#modal_elem').css("cursor","move");return true;},function(ele,mouseDX,mouseDY,xEventObj){var targ;if(!xEventObj)var xEventObj=window.event;if(xEventObj.target)targ=xEventObj.target;else if(xEventObj.srcElement)targ=xEventObj.srcElement;if(targ.nodeType&&targ.nodeType==3)
targ=targ.parentNode;if(targ.tagName.match(/textarea|input/i))return false;var offset=jQuery('#modal_elem').offset();offset.left+=mouseDX;offset.top+=mouseDY;jQuery('#modal_elem').css("cursor","move");jQuery('#modal_elem').offset(offset);return true;},function(ele,mouseX,mouseY,xEventObj){var targ;if(!xEventObj)var xEventObj=window.event;if(xEventObj.target)targ=xEventObj.target;else if(xEventObj.srcElement)targ=xEventObj.srcElement;if(targ.nodeType&&targ.nodeType==3)
targ=targ.parentNode;if(targ.tagName.match(/textarea|input/i))return false;jQuery('#modal_elem').css("cursor","auto");jQuery('#modal_elem').bind("mouseover",popupModalCursorCheck).bind("mouseout",popupModalCursorCheck).bind("mousemove",popupModalCursorCheck);return true;});jQuery('#modal_elem').bind("mouseover",popupModalCursorCheck).bind("mouseout",popupModalCursorCheck).bind("mousemove",popupModalCursorCheck);jQuery('#modal_int_text').html(modal_body);resizeModal();};getInviteFriendAPI=function(text){isInviteFriednWinClosed=false;globalHideModal();showModal(text,405,245);jQuery('#modal_int_text').css({padding:"0"});jQuery('#outerModalDIV').find("table:first").css({borderStyle:"dashed",borderWidth:"1px",borderColor:"#787878",backgroundColor:"transparent"});jQuery('#modal_elem').css({backgroundColor:"transparent"});jQuery('#outerModalDIV').find("td:first").css({backgroundColor:"#fff"});jQuery("#invfform").find("[name=emails]").focus();}
showInviteFriend=function(lpos){if(lpos){_hbLink('send',lpos);}
initialiseGetData();ajaxUrl="/Q/Special:Userlogin";ajaxData="wpCreateaccount=1&jsonly=1&about=1";jQuery.ajax({url:ajaxUrl,data:ajaxData,type:"POST",success:function(resp){setFunctionsForCaptcha();getInviteFriendAPI(resp);}});}
function JwgData(){this.articleData=new ArticleData();this.config=new ConfigData();}
function ArticleData(){}
function ConfigData(){}