function checkEditorStatus(){if(document.getElementById("editorStatus").value!=""&&document.getElementById("editorStatus").value=="open"){document.getElementById("threadEditor").style.display="block";document.getElementById("floatRight").style.display="none";document.getElementById("createThread").innerHTML="";}}function showEditor(){document.getElementById("editorStatus").value="open";document.getElementById("threadEditor").style.display="block";document.getElementById("floatRight").style.display="none";document.getElementById("createThread").innerHTML="";document.getElementById("paginationTD").className="toolPadB20LR25";document.getElementById("threadTitle").focus();}function getElement(elementId){if(document.getElementById){return document.getElementById(elementId);}else{if(document.all){return document.all[elementId];}else{if(document.layers){return document.layers[elementId];}else{return false;}}}}var dtCh="/";var minYear=8;var maxYear=99;function isInteger(s){for(var i=0;i<s.length;i++){var c=s.charAt(i);if(((c<"0")||(c>"9"))){return false;}}return true;}function stripCharsInBag(s,bag){var i;var returnString="";for(i=0;i<s.length;i++){var c=s.charAt(i);if(bag.indexOf(c)==-1){returnString+=c;}}return returnString;}function daysInFebruary(year){return(((year%4==0)&&((!(year%100==0))||(year%400==0)))?29:28);}function DaysArray(n){for(var i=1;i<=n;i++){this[i]=31;if(i==4||i==6||i==9||i==11){this[i]=30;}if(i==2){this[i]=29;}}return this;}function isDate(dtStr){var daysInMonth=DaysArray(12);var pos1=dtStr.indexOf(dtCh);var pos2=dtStr.indexOf(dtCh,pos1+1);var strDay=dtStr.substring(0,pos1);var strMonth=dtStr.substring(pos1+1,pos2);var strYear=dtStr.substring(pos2+1);strYr=strYear;if(strDay.charAt(0)=="0"&&strDay.length>1){strDay=strDay.substring(1);}if(strMonth.charAt(0)=="0"&&strMonth.length>1){strMonth=strMonth.substring(1);}for(var i=1;i<=2;i++){if(strYr.charAt(0)=="0"&&strYr.length>1){strYr=strYr.substring(1);}}month=parseInt(strMonth);day=parseInt(strDay);year=parseInt(strYr);if(pos1==-1||pos2==-1){return false;}if(strMonth.length<1||month<1||month>12){return false;}if(strDay.length<1||day<1||day>31||(month==2&&day>daysInFebruary(year))||day>daysInMonth[month]){return false;}if(strYear.length!=2||year==0||year<minYear||year>maxYear){return false;}if(dtStr.indexOf(dtCh,pos2+1)!=-1||isInteger(stripCharsInBag(dtStr,dtCh))==false){return false;}if(year==minYear&&month<6){return false;}return true;}function isEmpty(mytext){var re=/^\s{1,}$/g;if((mytext.length==0)||(mytext==null)||((mytext.search(re))>-1)){return true;}else{return false;}}function enableTextBox(value){if(value){document.getElementById("durationDate").disabled=false;if(document.getElementById("durationDate").value=="dd/mm/yy"||document.getElementById("durationDate").value==""){document.getElementById("durationDate").value="dd/mm/yy";}}else{document.getElementById("durationDate").disabled=true;document.getElementById("durationDate").value="";}}function newXMLHttpRequest(){var xmlreq=false;if(window.XMLHttpRequest){xmlreq=new XMLHttpRequest();}else{if(window.ActiveXObject){try{xmlreq=new ActiveXObject("Msxml2.XMLHTTP");}catch(e1){try{xmlreq=new ActiveXObject("Microsoft.XMLHTTP");}catch(e2){}}}}return xmlreq;}function getReadyStateHandler(req,responseXmlHandler){return function(){if(req.readyState==4){if(req.status==200){responseXmlHandler(req.responseXML);}else{alert("HTTP error: "+req.status);}}};}function showPollPopup(type){var windowEdit;var windowCreate;var windowDelete;if(type=="edit"){windowEdit=window.open("/es_AR/savePoll/mode/edit","","height=400,width=568,status=0,scrollbars=1");windowEdit.moveTo(250,150);}else{if(type=="delete"){windowDelete=window.open("/es_AR/tools/forum/includes/popup_poll_delete.jsp","","height=128,width=285");windowDelete.moveTo(250,150);}else{if(type=="create"){windowCreate=window.open("/es_AR/createPoll","CreatePoll","height=400,width=568,status=0,scrollbars=1");windowCreate.moveTo(250,150);}}}}function hidePollpopUp(){window.top.hidePopWin();}function getnewPollData(){var req=newXMLHttpRequest();req.open("GET","/es_AR/savePoll/mode/get",true);req.send(null);req.onreadystatechange=function(){if(req.readyState==4){if(req.status==200){if(window.parent.document.getElementById("changedData")!=null){window.parent.document.getElementById("changedData").innerHTML=req.responseText;}}}};}function deletePost(postId){windowDelete=window.open("/es_AR/tools/forum/includes/popup_post_delete.jsp?postId="+postId,"","height=128,width=285");windowDelete.moveTo(250,150);}function deleteAndHidePost(postId){var req=newXMLHttpRequest();req.open("GET","/es_AR/postsUpdate/mode/deletePost/postId/"+postId,true);req.send(null);req.onreadystatechange=function(){if(req.readyState==4){if(req.status==200){document.getElementById(postId).innerHTML="";}}};}function reportAbusePost(postId,locale){var req=newXMLHttpRequest();req.open("GET","/"+locale+"/postsUpdate/mode/abusePost/postId/"+postId,true);req.send(null);req.onreadystatechange=function(){if(req.readyState==4){if(req.status==200){document.getElementById(postId).innerHTML="";}}};}function changeRadioButtonValues(){document.getElementById("durationDate").disabled=false;}function setDurationDate(){document.getElementById("durationDate").value="";}