if(document.all&&!document.getElementById){document.getElementById=function(B){return document.all[B]}}function BlockSubmit(F,E){var D=F.keyCode||F.which;if(D==13){E();return false}else{return true}}function CheckAll(D){var C=Explode(D,",");for(j=0;j<C.length;j++){CheckSwitch(C[j],true)}}function CheckNone(D){var C=Explode(D,",");for(j=0;j<C.length;j++){CheckSwitch(C[j],false)}}function CheckSwitch(E,D){var F=document.getElementsByTagName("input");for(i=0;i<F.length;i++){if(F[i].type=="checkbox"&&F[i].id.indexOf(E)==0){F[i].checked=D}}}function ClearContents(B){if(B){B.innerHTML=""}}function CompletePreferenceSet(D){var C=document.getElementById(D);if(C){C.className="PreferenceComplete"}}function Explode(D,C){return D.split(C)}function Focus(C){var D=document.getElementById(C);if(D){D.focus()}}function GetElements(E,H){var F=document.getElementsByTagName(E);var G=new Array();for(i=0;i<F.length;i++){if(F[i].id.indexOf(H)==0){G[G.length]=F[i]}}return G}function HideElement(D,E){var F=document.getElementById(D);if(F){F.style.display="none";if(E==1){ClearContents(F)}}}function PathFinder(){this.params=new function(){this.url=document.URL;this.domain=document.domain;this.httpMethod=this.url.replace(/^(http|https)(:\/\/).*$/,"$1$2");return this};this.getRootPath=function(tag,attr,path){var Tags=document.getElementsByTagName(tag);var src="";var root="";for(var i=0;i<Tags.length;i++){src="";if(Tags[i].getAttribute&&Tags[i].getAttribute(attr)){src=Tags[i].getAttribute(attr)}else{if(eval("Tags["+i+"]."+attr)){src=eval("Tags["+i+"]."+attr)}}if(src.match(path)){root=src.replace(path,"");root=root.replace(/^http(s)?:\/\/[^\/]+/,"");break}}return root||false};return this}function PopTermsOfService(B){window.open(B,"TermsOfService","toolbar=no,status=yes,location=no,menubar=no,resizable=yes,height=600,width=400,scrollbars=yes")}function PreferenceSet(B){setTimeout("CompletePreferenceSet('"+this.Param+"');",400)}function RefreshPage(B){if(!B){B=400}setTimeout("document.location.reload();",B)}function RefreshPageWhenAjaxComplete(B){RefreshPage()}function SubmitForm(E,D,F){Wait(D,F);document[E].submit()}function SwitchElementClass(M,J,H,I,K,L){var N=document.getElementById(M);Sender=document.getElementById(J);if(N&&Sender){if(N.className==I){N.className=H;Sender.innerHTML=K}else{N.className=I;Sender.innerHTML=L}}}function SwitchExtension(I,H,J){var K=document.getElementById(H);if(K){K.className="Processing"}var L="ExtensionKey="+H+"&PostBackKey="+J;var G=new DataManager();G.Param=H;G.RequestFailedEvent=SwitchExtensionResult;G.RequestCompleteEvent=SwitchExtensionResult;G.LoadData(I+"?"+L)}function SwitchExtensionResult(D){var C=document.getElementById(Trim(D.responseText));if(C){setTimeout("SwitchExtensionItemClass('"+Trim(D.responseText)+"')",400)}else{alert(Trim(D.responseText))}}function SwitchExtensionItemClass(E){var F=document.getElementById(E);var D=document.getElementById("chk"+E+"ID");if(F&&D){F.className=D.checked?"Enabled":"Disabled"}}function SwitchPreference(I,J,M,K){var H=document.getElementById(J);var L=document.getElementById(J+"ID");if(L&&H){H.className="PreferenceProgress";var N=new DataManager();N.Param=J;N.RequestFailedEvent=HandleFailure;if(M==1){N.RequestCompleteEvent=RefreshPageWhenAjaxComplete}else{N.RequestCompleteEvent=PreferenceSet}N.LoadData(I+"?Type="+J+"&PostBackKey="+K+"&Switch="+L.checked)}}function Trim(B){return B.replace(/^\s*|\s*$/g,"")}function UpdateCheck(F,H,G){var E=new DataManager();E.RequestCompleteEvent=UpdateCheckStatus;E.RequestFailedEvent=UpdateCheckStatus;E.Param=F;E.LoadData(F+"?RequestName="+H+"&PostBackKey="+G)}function UpdateCheckStatus(K){if(K.responseText=="COMPLETE"){return }var J=K.responseText.substring(0,K.responseText.indexOf("|"));if(J=="First"){var N=document.getElementById("Core");var I=document.getElementById("CoreDetails")}else{var N=document.getElementById(J);var I=document.getElementById(J+"Details")}var L=K.responseText.slice(K.responseText.indexOf("|")+1);var H=document.getElementById("FormPostBackKey");var M=(H)?H.value:"";if(N&&I){if(L.indexOf("ERROR]")==1){N.className="UpdateError";I.innerHTML=L.replace(/\[ERROR\]/g,"")}else{if(L.indexOf("OLD]")==1){N.className="UpdateOld"}else{if(L.indexOf("UNKNOWN]")==1){N.className="UpdateUnknown"}else{N.className="UpdateGood"}}I.innerHTML=L.replace(/\[OLD\]/g,"").replace(/\[UNKNOWN\]/g,"").replace(/\[GOOD\]/g,"");setTimeout("UpdateCheck('"+this.Param+"', '"+J+"', '"+M+"');",300)}}else{alert("Error: "+K.responseText)}}function Wait(C,D){C.disabled=true;C.value=D;el=C.parentNode;while(el!=null){if(el.tagName=="FORM"){el.submit();break}el=el.parentNode}}function WriteEmail(J,I,N,L){if(document.createElement&&document.getElementById){var H,K,M;H=document.createElement("a");H.href="mailto:"+I+"@"+J;N=N||I+"@"+J;M=document.createTextNode(N);H.appendChild(M);K=document.getElementById(L).parentNode;if(K){K.appendChild(H)}}}function AddLabelValuePair(){var H=document.getElementById("LabelValuePairCount");var G=document.getElementById("CustomInfo");if(H&&G){H.value++;var I=document.createElement("li");var J=document.createElement("input");J.type="text";J.name="Label"+H.value;J.maxLength="20";J.className="LVLabelInput";var L=document.createElement("li");var K=document.createElement("input");K.type="text";K.name="Value"+H.value;K.maxLength="200";K.className="LVValueInput";I.appendChild(J);L.appendChild(K);G.appendChild(I);G.appendChild(L)}}function DiscussionSwitch(M,O,P,Q,N,L){var J=document.getElementById(N);if(J){J.className="Progress"}var R="Type="+O+"&DiscussionID="+P+"&Switch="+Q+"&PostBackKey="+L;var K=new DataManager();K.RequestCompleteEvent=RefreshPageWhenAjaxComplete;K.RequestFailedEvent=HandleFailure;K.LoadData(M+"?"+R)}function HideComment(M,O,Q,N,V,L,P,U){var R=(O==1?L:V);if(confirm(R)){var S=document.getElementById(P);if(S){S.innerHTML="&nbsp;";S.className="HideProgress"}var T=new DataManager();T.RequestCompleteEvent=RefreshPageWhenAjaxComplete;T.RequestFailedEvent=HandleFailure;T.LoadData(M+"?Type=Comment&Switch="+O+"&DiscussionID="+Q+"&CommentID="+N+"&PostBackKey="+U)}}function SetBookmark(L,O,R,M,Q,T){var P=document.getElementById("SetBookmark");if(P){P.className="Progress";var N=P.name==""?O:P.name;var K=N==1?0:1;P.name=K;var S=new DataManager();S.Param=(K==0?M:Q);S.RequestCompleteEvent=BookmarkComplete;S.RequestFailedEvent=BookmarkFailed;S.LoadData(L+"?Type=Bookmark&Switch="+K+"&DiscussionID="+R+"&PostBackKey="+T)}}function ApplyBookmark(H,G,F){var E=document.getElementById(H);if(E){E.className=G;E.innerHTML=F}}function BookmarkComplete(B){setTimeout("ApplyBookmark('SetBookmark', 'Complete', '"+this.Param+"');",400)}function BookmarkFailed(D){var C=document.getElementById("SetBookmark");if(C){C.className="Complete";alert("Failed: ("+D.status+") "+D.statusText)}}function ShowAdvancedSearch(){var F=document.getElementById("SearchSimpleFields");var E=document.getElementById("SearchDiscussionFields");var G=document.getElementById("SearchCommentFields");var H=document.getElementById("SearchUserFields");if(F&&E&&G&&H){F.style.display="none";E.style.display="block";G.style.display="block";H.style.display="block"}}function ShowSimpleSearch(){var F=document.getElementById("SearchSimpleFields");var E=document.getElementById("SearchDiscussionFields");var G=document.getElementById("SearchCommentFields");var H=document.getElementById("SearchUserFields");if(F&&E&&G&&H){F.style.display="block";E.style.display="none";G.style.display="none";H.style.display="none"}}function ToggleCategoryBlock(K,O,L,J,M){var N=document.getElementById(J);if(N){N.innerHTML="&nbsp;";N.className="HideProgress"}var P="BlockCategoryID="+O+"&Block="+L+"&PostBackKey="+M;var I=new DataManager();I.RequestCompleteEvent=RefreshPageWhenAjaxComplete;I.RequestFailedEvent=HandleFailure;I.LoadData(K+"?"+P)}function ToggleCommentBox(M,J,O,N){SwitchElementClass("CommentBox","CommentBoxController","SmallCommentBox","LargeCommentBox",O,J);var L=0;var K=document.getElementById("CommentBox");if(K){if(K.className=="LargeCommentBox"){L=1}var P="Type=ShowLargeCommentBox&Switch="+L+"&PostBackKey="+N;var I=new DataManager();I.RequestCompleteEvent=ToggleCommentBoxComplete;I.RequestFailedEvent=HandleFailure;I.LoadData(M+"?"+P)}}function ToggleCommentBoxComplete(B){}function WhisperBack(F,E,H){var G=document.getElementById("frmPostComment");if(!G){document.location=H+"post.php?PostBackAction=Reply&DiscussionID="+F+"&WhisperUsername="+escape(E)}else{G.WhisperUsername.value=E;G.Body.focus()}}function DataManager(){var B=this;B.RequestCompleteEvent=null;this.RequestCompleteEvent=B.RequestCompleteEvent;B.RequestFailedEvent=null;this.RequestFailedEvent=B.RequestFailedEvent;B.Param=null;this.Param=B.Param;this.CreateDataHandler=function(D){var A=function(){if(D.readyState==4){if(D.status==200){B.RequestCompleteEvent(D)}else{B.RequestFailedEvent(D)}}};A.Request=D;A.RequestCompleteEvent=B.RequestCompleteEvent;A.RequestFailedEvent=B.RequestFailedEvent;A.Param=B.Param;return A};this.InitiateXmlHttpRequest=function(){var E=null;try{E=new ActiveXObject("Msxml2.XMLHTTP")}catch(A){try{E=new ActiveXObject("Microsoft.XMLHTTP")}catch(F){E=null}}if(!E&&typeof (XMLHttpRequest)!="undefined"){E=new XMLHttpRequest()}if(!E){alert("Failed to create new ajax request.")}return E};this.LoadData=function(A){var E=this.InitiateXmlHttpRequest();if(E!=null){try{E.onreadystatechange=this.CreateDataHandler(E);E.open("GET",A,true);E.send(null)}catch(F){alert(F)}}}}function HandleFailure(B){alert("Failed: ("+B.status+") "+B.statusText)}function AutoComplete(TextInputID,AllowMultipleChoices){this.TimeOut=-1;this.MouseSupport=true;if(AllowMultipleChoices){this.Delimiter=new Array(";",",")}else{this.Delimiter=new Array("")}this.StartCharacter=1;this.KeywordSourceUrl="autocomplete.php?Search=";this.ResultContainerClass="AutoCompleteContainer";this.StandardRowClass="AutoCompleteRow";this.HoverRowClass="AutoCompleteHoverRow";this.TableID="AutoCompleteTable";var _DelimWords=new Array();var _CDelimWord=0;var _DelimChar=new Array();var _Display=false;var _Pos=0;var _Total=0;var _Curr=null;var _RangeU=0;var _RangeD=0;var _Bool=new Array();var _Pre=0;var _ToId;var _ToMake=false;var _GetPre="";var _MouseOnList=1;var _KWCount=0;var _CaretMove=false;this._Keywords=new Array();var _Self=this;_Curr=null;_Curr=document.getElementById(TextInputID);if(_Curr){addEvent(_Curr,"focus",SetupEvents);_Curr.setAttribute("autocomplete","off")}function SetupEvents(){addEvent(document,"keydown",CheckKey);addEvent(_Curr,"blur",ClearEvents);addEvent(document,"keypress",KeyPress)}function ClearEvents(evt){if(!evt){evt=event}removeEvent(document,"keydown",CheckKey);removeEvent(_Curr,"blur",ClearEvents);removeEvent(document,"keypress",KeyPress);RemoveAutocomplete()}function GenerateItems(Request){_Self._Keywords=Request.responseText.split(",");_KWCount=_Self._Keywords.length;if(_KWCount==1&&_Self._Keywords[0]==""){_KWCount=0;_Self._Keywords=new Array()}_Total=_KWCount;if(document.getElementById(_Self.TableID)){_Display=false;document.body.removeChild(document.getElementById(_Self.TableID))}if(document.getElementById(_Self.TableID+"_iefix")){document.body.removeChild(document.getElementById(_Self.TableID+"_iefix"))}if(_KWCount==0){_MouseOnList=0;RemoveAutocomplete();return }a=document.createElement("table");a.className=_Self.ResultContainerClass;a.style.position="absolute";a.style.top=eval(curTop(_Curr)+_Curr.offsetHeight)+"px";a.style.left=curLeft(_Curr)+"px";a.id=_Self.TableID;a.cellPadding="0";a.cellSpacing="0";a.style.zIndex="200";document.body.appendChild(a);var i;var first=true;var j=1;if(_Self.MouseSupport){a.onmouseout=TableBlur;a.onmouseover=TableFocus}var counter=0;for(i=0;i<_Self._Keywords.length;i++){counter++;r=a.insertRow(-1);if(first&&!_ToMake){r.className=_Self.HoverRowClass;first=false;_Pos=counter}else{if(_Pre==i){r.className=_Self.HoverRowClass;first=false;_Pos=counter}else{r.className=_Self.StandardRowClass}}r.id="tat_tr"+(j);c=r.insertCell(-1);c.innerHTML=_Self._Keywords[i];c.id="tat_td"+(j);c.setAttribute("pos",j);if(_Self.MouseSupport){c.onmousedown=MouseClick;c.onmouseover=TableHighlight}j++}_RangeU=1;_RangeD=j-1;_Display=true;if(_Pos<=0){_Pos=1}if(document.body.insertAdjacentHTML&&navigator.userAgent.indexOf("Opera")==-1){document.body.insertAdjacentHTML("beforeEnd",'<iframe id="'+a.id+'_iefix" style="position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);top:'+a.style.top+";left:"+a.style.left+";width:"+a.offsetWidth+"px;height:"+a.offsetHeight+'px;z-index:100;border:0;" src="javascript:false;" frameborder="0" scrolling="no"></iframe>')}}function GoUp(){if(!_Display){return }if(_Pos==1){return }document.getElementById("tat_tr"+_Pos).className=_Self.StandardRowClass;_Pos--;document.getElementById("tat_tr"+_Pos).className=_Self.HoverRowClass;if(_ToId){clearTimeout(_ToId)}if(_Self.TimeOut>0){_ToId=setTimeout(function(){_MouseOnList=0;RemoveAutocomplete()},_Self.TimeOut)}}function GoDown(){if(!_Display){return }if(_Pos==_Total){return }document.getElementById("tat_tr"+_Pos).className=_Self.StandardRowClass;_Pos++;document.getElementById("tat_tr"+_Pos).className=_Self.HoverRowClass;if(_ToId){clearTimeout(_ToId)}if(_Self.TimeOut>0){_ToId=setTimeout(function(){_MouseOnList=0;RemoveAutocomplete()},_Self.TimeOut)}}function MouseClick(evt){if(!evt){evt=event}if(!_Display){return }_MouseOnList=0;_Pos=this.getAttribute("pos");PressEnter()}function TableFocus(){_MouseOnList=1}function TableBlur(){_MouseOnList=0;if(_ToId){clearTimeout(_ToId)}if(_Self.TimeOut>0){_ToId=setTimeout(function(){_MouseOnList=0;RemoveAutocomplete()},_Self.TimeOut)}}function TableHighlight(){_MouseOnList=1;document.getElementById("tat_tr"+_Pos).className=_Self.StandardRowClass;_Pos=this.getAttribute("pos");document.getElementById("tat_tr"+_Pos).className=_Self.HoverRowClass;if(_ToId){clearTimeout(_ToId)}if(_Self.TimeOut>0){_ToId=setTimeout(function(){_MouseOnList=0;RemoveAutocomplete()},_Self.TimeOut)}}function InsertWord(a){if(_Self.Delimiter.length>0){str="";l=0;for(i=0;i<_DelimWords.length;i++){if(_CDelimWord==i){prespace=postspace="";gotbreak=false;for(j=0;j<_DelimWords[i].length;++j){if(_DelimWords[i].charAt(j)!=" "){gotbreak=true;break}prespace+=" "}for(j=_DelimWords[i].length-1;j>=0;--j){if(_DelimWords[i].charAt(j)!=" "){break}postspace+=" "}str+=prespace;str+=a;l=str.length;if(gotbreak){str+=postspace}}else{str+=_DelimWords[i]}if(i!=_DelimWords.length-1){str+=_DelimChar[i]}}_Curr.value=str;setCaret(_Curr,l)}else{_Curr.value=a}_MouseOnList=0;RemoveAutocomplete()}function PressEnter(){if(!_Display){return }_Display=false;var word=_Self._Keywords[_Pos-1];InsertWord(word);l=getCaretStart(_Curr);_Curr.focus()}function RemoveAutocomplete(){_Display=0;if(document.getElementById(_Self.TableID)){document.body.removeChild(document.getElementById(_Self.TableID))}if(document.getElementById(_Self.TableID+"_iefix")){document.body.removeChild(document.getElementById(_Self.TableID+"_iefix"))}if(_ToId){clearTimeout(_ToId)}}function KeyPress(e){if(_CaretMove&&_Curr.id==getTargetElement(e).id){stopEvent(e)}return !_CaretMove}function CheckKey(evt){if(!evt){evt=event}if(_Curr.id!=getTargetElement(evt).id){return }a=evt.keyCode;caret_pos_start=getCaretStart(_Curr);_CaretMove=0;switch(a){case 38:GoUp();_CaretMove=1;return false;break;case 40:GoDown();_CaretMove=1;return false;break;case 13:case 9:if(_Display){_CaretMove=1;PressEnter();return false}else{return true}break;default:setTimeout(function(){GetItems(a)},1000);break}}function GetItems(kc){if(kc==38||kc==40||kc==13||kc==9){return }var i;if(_Display){var word=0;var c=0;for(var i=0;i<=_Self._Keywords.length;i++){if(_Bool[i]){c++}if(c==_Pos){word=i;break}}_Pre=word}else{_Pre=-1}if(_Curr.value==""){_MouseOnList=0;RemoveAutocomplete();return }if(_Self.Delimiter.length>0){caret_pos_start=getCaretStart(_Curr);caret_pos_end=getCaretEnd(_Curr);delim_split="";for(i=0;i<_Self.Delimiter.length;i++){delim_split+=_Self.Delimiter[i]}if(delim_split==""){delim_split="##void##"}delim_split=delim_split.addslashes();delim_split_rx=new RegExp("("+delim_split+")");c=0;_DelimWords=new Array();_DelimWords[0]="";for(i=0,j=_Curr.value.length;i<_Curr.value.length;i++,j--){if(_Curr.value.substr(i,j).search(delim_split_rx)==0){ma=_Curr.value.substr(i,j).match(delim_split_rx);_DelimChar[c]=ma[1];c++;_DelimWords[c]=""}else{_DelimWords[c]+=_Curr.value.charAt(i)}}var l=0;_CDelimWord=-1;for(i=0;i<_DelimWords.length;i++){if(caret_pos_end>=l&&caret_pos_end<=l+_DelimWords[i].length){_CDelimWord=i}l+=_DelimWords[i].length+1}var ot=_DelimWords[_CDelimWord].trim();var t=_DelimWords[_CDelimWord].addslashes().trim()}else{var ot=_Curr.value;var t=_Curr.value.addslashes()}if(ot.length==0){_MouseOnList=0;RemoveAutocomplete()}if(ot.length<_Self.StartCharacter){return this}var dm=new DataManager();dm.RequestCompleteEvent=GenerateItems;dm.RequestFailedEvent=HandleFailure;dm.LoadData(_Self.KeywordSourceUrl+escape(t))}function HandleFailure(Request){HideResults()}function HideResults(){_MouseOnList=0;RemoveAutocomplete()}}function addEvent(E,F,D){if(E.attachEvent){E.attachEvent("on"+F,D)}else{if(E.addEventListener){E.addEventListener(F,D,true)}else{E["on"+F]=D}}}function removeEvent(E,F,D){if(E.detachEvent){E.detachEvent("on"+F,D)}else{if(E.removeEventListener){E.removeEventListener(F,D,true)}else{E["on"+F]=null}}}function stopEvent(B){B||window.event;if(B.stopPropagation){B.stopPropagation();B.preventDefault()}else{if(typeof B.cancelBubble!="undefined"){B.cancelBubble=true;B.returnValue=false}}return false}function getElement(B){if(window.event){return window.event.srcElement}else{return B.currentTarget}}function getTargetElement(B){if(window.event){return window.event.srcElement}else{return B.target}}function stopSelect(B){if(typeof B.onselectstart!="undefined"){addEvent(B,"selectstart",function(){return false})}}function getCaretEnd(H){if(typeof H.selectionEnd!="undefined"){return H.selectionEnd}else{if(document.selection&&document.selection.createRange){var G=document.selection.createRange();try{var F=G.duplicate();F.moveToElementText(H)}catch(I){var F=H.createTextRange()}F.setEndPoint("EndToEnd",G);var J=F.text.length;if(J>H.value.length){return -1}return J}}}function getCaretStart(H){if(typeof H.selectionStart!="undefined"){return H.selectionStart}else{if(document.selection&&document.selection.createRange){var G=document.selection.createRange();try{var F=G.duplicate();F.moveToElementText(H)}catch(I){var F=H.createTextRange()}F.setEndPoint("EndToStart",G);var J=F.text.length;if(J>H.value.length){return -1}return J}}}function setCaret(D,C){D.focus();if(D.setSelectionRange){D.setSelectionRange(C,C)}else{if(D.createTextRange){m=D.createTextRange();m.moveStart("character",C);m.collapse();m.select()}}}function setSelection(E,D,F){E.focus();if(E.setSelectionRange){E.setSelectionRange(D,F)}else{if(E.createTextRange){m=E.createTextRange();m.moveStart("character",D);m.moveEnd("character",F);m.select()}}}String.prototype.addslashes=function(){return this.replace(/(["\\\.\|\[\]\^\*\+\?\$\(\)])/g,"\\$1")};String.prototype.trim=function(){return this.replace(/^\s*(\S*(\s+\S+)*)\s*$/,"$1")};function curTop(B){toreturn=0;while(B){toreturn+=B.offsetTop;B=B.offsetParent}return toreturn}function curLeft(B){toreturn=0;while(B){toreturn+=B.offsetLeft;B=B.offsetParent}return toreturn}function isNumber(B){return typeof B=="number"&&isFinite(B)}function replaceHTML(C,D){while(el=C.childNodes[0]){C.removeChild(el)}C.appendChild(document.createTextNode(D))}var liveSearchReq=false;var t=null;var liveSearchLast="";var isIE=false;if(window.XMLHttpRequest){liveSearchReq=new XMLHttpRequest()}function liveSearchInit(){var A=document.getElementById("txtKeywords");if(!A){return }if(navigator.userAgent.indexOf("Safari")>0){A.addEventListener("keydown",liveSearchKeyPress,false)}else{if(navigator.product=="Gecko"){A.addEventListener("keypress",liveSearchKeyPress,false);A.addEventListener("blur",liveSearchHideDelayed,false)}else{A.attachEvent("onkeydown",liveSearchKeyPress);isIE=true}}A.setAttribute("autocomplete","off")}function liveSearchHideDelayed(){window.setTimeout("liveSearchHide()",400)}function liveSearchHide(){document.getElementById("LSResult").style.display="none";var A=document.getElementById("LSHighlight");if(A){A.removeAttribute("id")}}function liveSearchKeyPress(A){if(A.keyCode==40){highlight=document.getElementById("LSHighlight");if(!highlight){highlight=document.getElementById("LSShadow").firstChild.firstChild}else{highlight.removeAttribute("id");highlight=highlight.nextSibling}if(highlight){highlight.setAttribute("id","LSHighlight")}if(!isIE){A.preventDefault()}}else{if(A.keyCode==38){highlight=document.getElementById("LSHighlight");if(!highlight){highlight=document.getElementById("LSResult").firstChild.firstChild.lastChild}else{highlight.removeAttribute("id");highlight=highlight.previousSibling}if(highlight){highlight.setAttribute("id","LSHighlight")}if(!isIE){A.preventDefault()}}else{if(A.keyCode==27){highlight=document.getElementById("LSHighlight");if(highlight){highlight.removeAttribute("id")}document.getElementById("LSResult").style.display="none"}}}}function liveSearchStart(){if(t){window.clearTimeout(t)}t=window.setTimeout("liveSearchDoSearch()",200)}function liveSearchDoSearch(){if(typeof liveSearchRoot=="undefined"){liveSearchRoot=""}if(typeof liveSearchRootSubDir=="undefined"){liveSearchRootSubDir=""}if(typeof liveSearchParams=="undefined"){liveSearchParams2=""}else{liveSearchParams2="&"+liveSearchParams}if(liveSearchLast!=document.forms.frmLiveSearch.Keywords.value){if(liveSearchReq&&liveSearchReq.readyState<4){liveSearchReq.abort()}if(document.forms.frmLiveSearch.Keywords.value==""){liveSearchHide();return false}if(window.XMLHttpRequest){}else{if(window.ActiveXObject){liveSearchReq=new ActiveXObject("Microsoft.XMLHTTP")}}var A="";A=A+"Type="+document.forms.frmLiveSearch.Type.value;A=A+"&Keywords="+document.forms.frmLiveSearch.Keywords.value;liveSearchReq.onreadystatechange=liveSearchProcessReqChange;liveSearchReq.open("GET","extensions/LiveSearch/ajax.php?"+A+liveSearchParams2);liveSearchLast=document.forms.frmLiveSearch.Keywords.value;liveSearchReq.send(null)}}function liveSearchProcessReqChange(){if(liveSearchReq.readyState==4){var B=document.getElementById("LSResult");B.style.display="block";var A=document.getElementById("LSShadow");A.innerHTML=liveSearchReq.responseText}}function liveSearchSubmit(){var A=document.getElementById("LSHighlight");if(A&&A.firstChild){window.location=liveSearchRoot+liveSearchRootSubDir+A.firstChild.nextSibling.getAttribute("href");return false}else{return true}}function preview(C){var B=$("previewComment");if(!B){var A=$("bx_foo");var B=document.createElement("div");B.id="previewComment";B.className="post_content";B=A.parentNode.insertBefore(B,A.nextSibling)}B.innerHTML=C.responseText}function previewSubmit(F){var B=document.getElementById("name").value;var A=document.getElementById("email").value;var C=document.getElementById("openid_url").value;var E=document.forms["bx_foo"]["comments"].value;var D=document.forms["commentForm"];body="mail="+encodeURIComponent(A)+"&uri="+encodeURIComponent(C)+"&text="+encodeURIComponent(E)+"&name="+encodeURIComponent(B);new ajax(liveSearchRoot+"inc/bx/php/preview.php",{postBody:body,method:"post",onComplete:preview});return false}window.onload=liveSearchInit;function SetNotify(C,J,F,H,D,A){var B=document.getElementById("SetNotifyAll");if(B){B.className="Progress";var I=B.name==""?J:B.name;var E=I==1?0:1;B.name=E;var G=new DataManager();G.Param=(E==0?D:A);G.RequestCompleteEvent=NotifyComplete;G.RequestFailedEvent=NotifyFailed;G.LoadData(C+"?Type=Notify&Switch="+E+"&SelectID="+H+"&Method="+F)}}function NotifyComplete(A){setTimeout("ApplyNotify('SetNotifyAll', 'Complete', '"+this.Param+"');",400)}function ApplyNotify(B,C,D){var A=document.getElementById(B);if(A){A.className=C;A.innerHTML=D}}function NotifyFailed(B){var A=document.getElementById("SetNotifyAll");if(A){A.className="Complete";alert("Failed: ("+B.status+") "+B.statusText)}}function SetNotifyCategory(C,J,F,H,D,A){var B=document.getElementById("SetNotifyCategory");if(B){B.className="Progress";var I=B.name==""?J:B.name;var E=I==1?0:1;B.name=E;var G=new DataManager();G.Param=(E==0?D:A);G.RequestCompleteEvent=NotifyCompleteCategory;G.RequestFailedEvent=NotifyFailedCategory;G.LoadData(C+"?Type=Notify&Switch="+E+"&SelectID="+H+"&Method="+F)}}function NotifyCompleteCategory(A){setTimeout("ApplyNotify('SetNotifyCategory', 'Complete', '"+this.Param+"');",400)}function ApplyNotifyCategory(B,C,D){var A=document.getElementById(B);if(A){A.className=C;A.innerHTML=D}}function NotifyFailedCategory(B){var A=document.getElementById("SetNotifyCategory");if(A){A.className="Complete";alert("Failed: ("+B.status+") "+B.statusText)}}function SetNotifyDiscussion(C,J,F,H,D,A){var B=document.getElementById("SetNotifyDiscussion");if(B){B.className="Progress";var I=B.name==""?J:B.name;var E=I==1?0:1;B.name=E;var G=new DataManager();G.Param=(E==0?D:A);G.RequestCompleteEvent=NotifyCompleteDiscussion;G.RequestFailedEvent=NotifyFailedDiscussion;G.LoadData(C+"?Type=Notify&Switch="+E+"&SelectID="+H+"&Method="+F)}}function NotifyCompleteDiscussion(A){setTimeout("ApplyNotify('SetNotifyDiscussion', 'Complete', '"+this.Param+"');",400)}function ApplyNotifyDiscussion(B,C,D){var A=document.getElementById(B);if(A){A.className=C;A.innerHTML=D}}function NotifyFailedDiscussion(B){var A=document.getElementById("SetNotifyDiscussion");if(A){A.className="Complete";alert("Failed: ("+B.status+") "+B.statusText)}}function SetNotifyDelete(E,D,B){var C=document.getElementById("SetNotifyDelete");if(C){C.className="Progress";var F=C.name==""?0:C.name;var G=F==1?0:1;C.name=G;var A=new DataManager();A.Param=(G==0?D:B);A.RequestCompleteEvent=NotifyCompleteDelete;A.RequestFailedEvent=NotifyFailedDelete;A.LoadData(E+"?Type=DeleteAll")}}function NotifyCompleteDelete(A){setTimeout("ApplyNotifyDelete('SetNotifyDelete', 'Complete', '"+this.Param+"');",400)}function ApplyNotifyDelete(B,C,D){var A=document.getElementById(B);if(A){A.className=C;A.innerHTML=D}}function NotifyFailedDelete(B){var A=document.getElementById("SetNotifyDelete");if(A){A.className="Complete";alert("Failed: ("+B.status+") "+B.statusText)}}function SetNotifyAdminDelete(E,G,D,B){var C=document.getElementById("SetNotifyAdminDelete");if(C){C.className="Progress";var F=C.name==""?0:C.name;var H=F==1?0:1;C.name=H;var A=new DataManager();A.Param=(H==0?D:B);A.RequestCompleteEvent=NotifyCompleteAdminDelete;A.RequestFailedEvent=NotifyFailedAdminDelete;A.LoadData(E+"?SelectID="+G+"&Type=AdminDeleteAll")}}function NotifyCompleteAdminDelete(A){setTimeout("ApplyNotifyDelete('SetNotifyAdminDelete', 'Complete', '"+this.Param+"');",400)}function ApplyNotifyAdminDelete(B,C,D){var A=document.getElementById(B);if(A){A.className=C;A.innerHTML=D}}function NotifyFailedAdminDelete(B){var A=document.getElementById("SetNotifyAdminDelete");if(A){A.className="Complete";alert("Failed: ("+B.status+") "+B.statusText)}}function DeleteNotify(C,F,G){var B=document.getElementById("NotifyCategory"+G);if(B){B.style.display="none";B.className="Progress";var D=B.name==""?1:B.name;var E=D==1?0:1;B.name=E;var A=new DataManager();A.Param=("unset");A.RequestCompleteEvent=DeleteNotifyComplete;A.RequestFailedEvent=DeleteNotifyFailed();if(A.LoadData(C+"?Type=Delete&NotifyID="+G)){alert("1")}}}function DeleteNotifyComplete(A){setTimeout("DeleteApplyNotify('DeleteNotify', 'Complete', '"+this.Param+"');",400)}function DeleteApplyNotify(B,C,D){var A=document.getElementById(B);if(A){A.className=C;A.innerHTML=D}}function DeleteNotifyFailed(B){var A=document.getElementById("NotifyCategory");if(A){A.className="Complete";alert("Failed: ("+B.status+") "+B.statusText)}}var request;var form;function createrequest_post(B,D,C){request=false;if(window.XMLHttpRequest){request=new XMLHttpRequest()}else{if(window.ActiveXObject){try{request=new ActiveXObject("Msxml2.XMLHTTP")}catch(A){try{request=new ActiveXObject("Microsoft.XMLHTTP")}catch(A){}}}}if(!request){return false}request.onreadystatechange=C;request.open("POST",B,true);request.setRequestHeader("Content-type","application/x-www-form-urlencoded");request.setRequestHeader("Content-length",D.length);request.send(D);return true}function getform(){var A=document.getElementById("frmPostDiscussion");if(!A){A=document.getElementById("frmPostComment")}return A}function _showpreview(){if(request.readyState==4){if(request.status==200){document.getElementById("CommentBody_Preview").innerHTML=request.responseText;getform().btnPreview.value="Refresh Preview"}}}function createelements(B,A){var C,D;for(C=0;C<A.length;C++){D=document.createElement(A[C].name);if(A[C].classname){D.className=A[C].classname}if(A[C].id){D.id=A[C].id}if(A[C].href){D.href=A[C].href}if(A[C].content){D.innerHTML=A[C].content}else{if(A[C].children){createelements(D,A[C].children)}}B.appendChild(D)}return }function showpreview(F,A){var D,G,C,B,E;form=getform();if(form){if(!document.getElementById("CommentBody_Preview")){if(!document.getElementById("Comments")){obj=document.createElement("ul");obj.id="Comments";obj.className="Preview";document.getElementById("Content").appendChild(obj)}createelements(document.getElementById("Comments"),Array({name:"li",id:"Comment_Preview",children:Array({name:"div",classname:"CommentHeader",children:Array({name:"ul",children:Array({name:"li",children:Array({name:"a",href:F+"account.php?u="+A.id,content:A.name})},{name:"li",content:" right now"})},{name:"span",children:Array({name:"a",href:"javascript:getform().submit();",content:"submit comment"})})},{name:"div",id:"CommentBody_Preview",classname:"CommentBody"})}));document.getElementById("Comment_Preview").style.backgroundImage="url("+F+"extensions/PreviewPost/preview.png)"}G=(encodeURIComponent)?encodeURIComponent(form.Body.value):escape(form.Body.value.replace(/\+/g,"%2B"));if(!form.FormatType.length){C=form.FormatType.value}else{for(B=E=0;B<form.FormatType.length;B++){if(form.FormatType[B].checked){E=1;break}}if(!E){B=0}C=escape(form.FormatType[B].value)}if(!createrequest_post(F+"extensions/PreviewPost/ajax.php","Data="+G+"&Type="+C,_showpreview)){alert("An error occured while attempting to set up request")}}else{alert("Unable to find form")}return }function QuoteText(B,C){var A="";if(window.getSelection){A=window.getSelection()}else{if(document.getSelection){A=document.getSelection()}else{if(document.selection){A=document.selection.createRange().text}else{return }}}if(C!=""){B.value+="[quote="+C+"]"+A+"[/quote]"}else{B.value+="[quote]"+A+"[/quote]"}}function changeSmilies(B){var A="<ul>";for(i=0;i<arrSmilies[B].length;i++){A=A+"<li>"+arrSmilies[B][i]+"</li>"}A=A+"</ul>";document.getElementById("VanillaconsSmilies").innerHTML=A}function insertSmilie(A){var B=document.getElementById("CommentBox");insertAtCursor(B,":"+A+":");B.focus()}function insertAtCursor(D,C){if(document.selection){D.focus();sel=document.selection.createRange();sel.text=C;document.myField.focus()}else{if(D.selectionStart||D.selectionStart=="0"){var A=D.selectionStart;var B=D.selectionEnd;D.value=D.value.substring(0,A)+C+D.value.substring(B,D.value.length);D.selectionStart=A+C.length;D.selectionEnd=B+C.length;D.focus()}else{D.value+=C;D.focus()}}}var arrSmilies=new Array();arrSmilies["cool"]=new Array();arrSmilies["cool"][0]='<span onclick="insertSmilie(\'beard\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/cool/beard.gif" alt="" /></span>';arrSmilies["cool"][1]='<span onclick="insertSmilie(\'boogie\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/cool/boogie.gif" alt="" /></span>';arrSmilies["cool"][2]='<span onclick="insertSmilie(\'peace\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/cool/peace.gif" alt="" /></span>';arrSmilies["cool"][3]='<span onclick="insertSmilie(\'pirate\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/cool/pirate.gif" alt="" /></span>';arrSmilies["cool"][4]='<span onclick="insertSmilie(\'rasta\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/cool/rasta.gif" alt="" /></span>';arrSmilies["cool"][5]='<span onclick="insertSmilie(\'shades\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/cool/shades.gif" alt="" /></span>';arrSmilies["cool"][6]='<span onclick="insertSmilie(\'smoking\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/cool/smoking.gif" alt="" /></span>';arrSmilies["cool"][7]='<span onclick="insertSmilie(\'surfing\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/cool/surfing.gif" alt="" /></span>';arrSmilies["cool"][8]='<span onclick="insertSmilie(\'trompet\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/cool/trompet.gif" alt="" /></span>';arrSmilies["happy"]=new Array();arrSmilies["happy"][0]='<span onclick="insertSmilie(\'cheer\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/happy/cheer.gif" alt="" /></span>';arrSmilies["happy"][1]='<span onclick="insertSmilie(\'clap\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/happy/clap.gif" alt="" /></span>';arrSmilies["happy"][2]='<span onclick="insertSmilie(\'crazy\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/happy/crazy.gif" alt="" /></span>';arrSmilies["happy"][3]='<span onclick="insertSmilie(\'jumping\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/happy/jumping.gif" alt="" /></span>';arrSmilies["happy"][4]='<span onclick="insertSmilie(\'peace\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/happy/peace.gif" alt="" /></span>';arrSmilies["happy"][5]='<span onclick="insertSmilie(\'rolling\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/happy/rolling.gif" alt="" /></span>';arrSmilies["happy"][6]='<span onclick="insertSmilie(\'swingin\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/happy/swingin.gif" alt="" /></span>';arrSmilies["happy"][7]='<span onclick="insertSmilie(\'thumbup\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/happy/thumbup.gif" alt="" /></span>';arrSmilies["happy"][8]='<span onclick="insertSmilie(\'tooth\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/happy/tooth.gif" alt="" /></span>';arrSmilies["love"]=new Array();arrSmilies["love"][0]='<span onclick="insertSmilie(\'brokenheart\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/love/brokenheart.gif" alt="" /></span>';arrSmilies["love"][1]='<span onclick="insertSmilie(\'crush\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/love/crush.gif" alt="" /></span>';arrSmilies["love"][2]='<span onclick="insertSmilie(\'dinner\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/love/dinner.gif" alt="" /></span>';arrSmilies["love"][3]='<span onclick="insertSmilie(\'flowers\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/love/flowers.gif" alt="" /></span>';arrSmilies["love"][4]='<span onclick="insertSmilie(\'grouphug\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/love/grouphug.gif" alt="" /></span>';arrSmilies["love"][5]='<span onclick="insertSmilie(\'heart\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/love/heart.gif" alt="" /></span>';arrSmilies["love"][6]='<span onclick="insertSmilie(\'heartbounce\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/love/heartbounce.gif" alt="" /></span>';arrSmilies["love"][7]='<span onclick="insertSmilie(\'heartsabove\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/love/heartsabove.gif" alt="" /></span>';arrSmilies["love"][8]='<span onclick="insertSmilie(\'hugging\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/love/hugging.gif" alt="" /></span>';arrSmilies["love"][9]='<span onclick="insertSmilie(\'kiss\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/love/kiss.gif" alt="" /></span>';arrSmilies["love"][10]='<span onclick="insertSmilie(\'kissing\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/love/kissing.gif" alt="" /></span>';arrSmilies["love"][11]='<span onclick="insertSmilie(\'rainbow\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/love/rainbow.gif" alt="" /></span>';arrSmilies["love"][12]='<span onclick="insertSmilie(\'threesome\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/love/threesome.gif" alt="" /></span>';arrSmilies["love"][13]='<span onclick="insertSmilie(\'twosome\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/love/twosome.gif" alt="" /></span>';arrSmilies["love"][14]='<span onclick="insertSmilie(\'whorship\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/love/whorship.gif" alt="" /></span>';arrSmilies["love"][15]='<span onclick="insertSmilie(\'winkkiss\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/love/winkkiss.gif" alt="" /></span>';arrSmilies["standard"]=new Array();arrSmilies["standard"][0]='<span onclick="insertSmilie(\'angry\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/standard/angry.gif" alt="" /></span>';arrSmilies["standard"][1]='<span onclick="insertSmilie(\'bigsmile\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/standard/bigsmile.gif" alt="" /></span>';arrSmilies["standard"][2]='<span onclick="insertSmilie(\'confused\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/standard/confused.gif" alt="" /></span>';arrSmilies["standard"][3]='<span onclick="insertSmilie(\'cool\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/standard/cool.gif" alt="" /></span>';arrSmilies["standard"][4]='<span onclick="insertSmilie(\'cry\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/standard/cry.gif" alt="" /></span>';arrSmilies["standard"][5]='<span onclick="insertSmilie(\'devil\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/standard/devil.gif" alt="" /></span>';arrSmilies["standard"][6]='<span onclick="insertSmilie(\'neutral\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/standard/neutral.gif" alt="" /></span>';arrSmilies["standard"][7]='<span onclick="insertSmilie(\'sad\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/standard/sad.gif" alt="" /></span>';arrSmilies["standard"][8]='<span onclick="insertSmilie(\'shamed\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/standard/shamed.gif" alt="" /></span>';arrSmilies["standard"][9]='<span onclick="insertSmilie(\'shocked\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/standard/shocked.gif" alt="" /></span>';arrSmilies["standard"][10]='<span onclick="insertSmilie(\'smile\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/standard/smile.gif" alt="" /></span>';arrSmilies["standard"][11]='<span onclick="insertSmilie(\'surprised\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/standard/surprised.gif" alt="" /></span>';arrSmilies["standard"][12]='<span onclick="insertSmilie(\'tongue\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/standard/tongue.gif" alt="" /></span>';arrSmilies["standard"][13]='<span onclick="insertSmilie(\'wink\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/standard/wink.gif" alt="" /></span>';arrSmilies["tongue"]=new Array();arrSmilies["tongue"][0]='<span onclick="insertSmilie(\'fierce\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/tongue/fierce.gif" alt="" /></span>';arrSmilies["tongue"][1]='<span onclick="insertSmilie(\'fingersear\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/tongue/fingersear.gif" alt="" /></span>';arrSmilies["tongue"][2]='<span onclick="insertSmilie(\'hungry\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/tongue/hungry.gif" alt="" /></span>';arrSmilies["tongue"][3]='<span onclick="insertSmilie(\'middlefinger\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/tongue/middlefinger.gif" alt="" /></span>';arrSmilies["tongue"][4]='<span onclick="insertSmilie(\'sleepout\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/tongue/sleepout.gif" alt="" /></span>';arrSmilies["tongue"][5]='<span onclick="insertSmilie(\'updown\');" class="VanillaconsLink"><img src="/Vanilla/extensions/Vanillacons/smilies/tongue/updown.gif" alt="" /></span>'