var f;var isMobile;isMobile=false;if((location.pathname.indexOf('/x_'))>-1)isMobile=true;function j(id,bid,tid,ml){var e=document.getElementById('j'+id);if(e.style.display=='block'){e.style.display='none';e=document.getElementById(fid(bid,tid,id,ml));if(e!=null)e.style.display='none';}else{var url='/rss/j.aspx?m='+id;var ajax=new AJAXInteraction(url,bid,tid,ml);ajax.send();}}function showMessage(id,content,flagger,editor,member,bid,tid,ml){e=document.getElementById('j'+id);if(e.style.display=='block'){e.style.display='none';}else{e.style.display='block';if(e.hasChildNodes());else{var t=document.createElement("div");var innerHTML='';if(content.length>0)innerHTML+='<p class="expanded" style="padding:0.75em;background-color:#f7f7f7;">'+content+'</p>';if(member!="True")innerHTML+='To view message content, please <a href="/account/login.asp">login</a> or <a href="/account/login.asp#Register">register</a>.';innerHTML+='<span class="toolbar" style="padding-bottom:0.5em;padding-top:0.5em;">';if(member=="True"){innerHTML+='<a class="u" href="JavaScript:MakeForm('+bid+','+tid+','+id+','+ml+');">Post a reply</a> | ';innerHTML+='<a class="u" href="JavaScript:MakeSnappyForm('+bid+','+tid+','+id+','+ml+');"> Quick reply</a>';}if(flagger=="True"&& editor!="True")innerHTML+=' | <a  id="f'+id+'" class="u" href="JavaScript:flag('+id+',1)">Flag</a>';if(editor=="True"){innerHTML+=' | <a  class="u" href="/board/';if(isMobile==true){innerHTML+='x_';}innerHTML+='edit.asp?id='+id+'">Edit</a>';}if(isMobile==false)innerHTML+=' | <a  class="u" href="/m_'+id+'">Permalink</a>';if(bid!=2)innerHTML+=' | <span style="display:inline; width:90%" id="af'+id+'"><a title="Add post to favorites" class="u" href="javascript:af('+id+',2)"><img src="/art/kleineherz.gif" width="13" height="12" border="0"/></a></span>';innerHTML+='</span>';t.innerHTML=innerHTML;e.appendChild(t);}}}function AJAXInteraction(url,bid,tid,ml){this.url=url;var req=AjaxInit();req.onreadystatechange=processRequest;function AjaxInit(){if(window.XMLHttpRequest){return new XMLHttpRequest();}else if(window.ActiveXObject){isIE=true;return new ActiveXObject("Microsoft.XMLHTTP");}}function processRequest(){if(req.readyState==4){if(req.status==200){postProcess(req.responseText,bid,tid,ml);}}}this.send=function(){req.open("GET",url,true);req.send(null);}}function postProcess(objResponseText,bid,tid,ml){var myString=objResponseText;var sMessageId="";var sContent="";var sFlagger="";var sEditor="";var sMember="";var mySplitResult=myString.split("(|(");for(i=0;i<mySplitResult.length;i++){if(i==0)sMessageId=mySplitResult[i];if(i==1)sFlagger=mySplitResult[i];if(i==2)sEditor=mySplitResult[i];if(i==3)sMember=mySplitResult[i];if(i==5)sContent=mySplitResult[i];}showMessage(sMessageId,sContent,sFlagger,sEditor,sMember,bid,tid,ml);}function fid(b,t,m,l){return "f."+b+"."+t+"."+m+"."+l;}function hideForm(sId){e=document.getElementById(sId);if(e!=null)e.style.display='none';}function MakeForm(b,t,m,l){var e="";var theForm='';var sMyId=fid(b,t,m,l);var strCols=100;var strRows=50;var strSubject=50;if(isMobile==true){strCols=25;var strRows=3;strSubject=30;}hideForm("s"+sMyId);e=document.getElementById(sMyId);if(e!=null){if(e.style.display!='none')e.style.display='none';elsee.style.display='block';}else{e=document.getElementById('j'+m);theForm+='<form style="display:block;" id="form'+sMyId+'" class="verticalForm" action="/board/post.asp" method="post">';if(isMobile==false)theForm+='<fieldset style="width:450px;">';elsetheForm+='<fieldset>';theForm+='<legend>Post a Reply</legend>';theForm+='<input type="hidden" name="bid" value="'+b+'"/>';theForm+='<input type="hidden" name="tid" value="'+t+'"/>';theForm+='<input type="hidden" name="mid" value="'+m+'"/>';theForm+='<input type="hidden" name="ml" value="'+l+'"/>';theForm+='<input type="hidden" name="ismobile" value="'+isMobile+'"/>';theForm+='<label for="subject'+sMyId+'">Subject: ';theForm+='<input tabindex="11" id="subject'+sMyId+'" type="text" size="'+strSubject+'" maxlength="100" name="subject" /></label>';theForm+='<label for="message'+sMyId+'">Message: ';theForm+='<textarea tabindex="12" name="message" rows="'+strRows+'" cols="'+strCols+'" id="message'+sMyId+'"></textarea></label>';theForm+='<label for="notify'+sMyId+'">Email me when a new message is posted in this topic.<input tabindex="13" id="notify'+sMyId+'" class="inline" name="notify" value="on" type="checkbox" /></label>';theForm+='<input tabindex="14" class="submit" name="submit" value="Post Message" type="submit" />';theForm+='</fieldset>';theForm+='</form>';var t=document.createElement("div");t.innerHTML=theForm;t.id=sMyId;e.appendChild(t);}}function MakeSnappyForm(b,t,m,l){var e="";var theForm='';var sMyId="s"+fid(b,t,m,l);var iFormLength,iSubjectLength;iFormLength='570px';iSubjectLength=50;if(isMobile==true){iFormLength='200px';iSubjectLength=25;}hideForm(fid(b,t,m,l));e=document.getElementById(sMyId);if(e!=null){if(e.style.display!='none')e.style.display='none';elsee.style.display='block';}else{e=document.getElementById('j'+m);theForm+='<form style="display:block;" id="form'+sMyId+'" class="horizontalForm" action="/board/post.asp" method="post"><fieldset style="width:'+iFormLength+';">';theForm+='<legend>Quick Reply</legend>';theForm+='<input type="hidden" name="bid" value="'+b+'"/>';theForm+='<input type="hidden" name="tid" value="'+t+'"/>';theForm+='<input type="hidden" name="mid" value="'+m+'"/>';theForm+='<input type="hidden" name="ml" value="'+l+'"/>';theForm+='<input type="hidden" name="ismobile" value="'+isMobile+'"/>';theForm+='<label for="subject'+sMyId+'">Subject: ';theForm+='<input tabindex="11" id="subject'+sMyId+'" type="text" size="'+iSubjectLength+' " maxlength="100" name="subject" /></label>';theForm+='<label for="submit'+sMyId+'">&nbsp;';theForm+='<input tabindex="14" id="submit'+sMyId+'"class="submit" name="submit" value="Post Message" type="submit" /></label>';theForm+='</fieldset></form>';var t=document.createElement("div");t.innerHTML=theForm;t.id=sMyId;e.appendChild(t);}}
