function expMonth(obj,iMonth,iYear){if($(obj).hasClass("arch")){$(obj).removeClass("arch");$(obj).addClass("arch_exp");if($("#arch_"+iMonth+"_"+iYear).html().length<5){var url="ajxmenu.jsp?op=month_posts&month="+iMonth+"&year="+iYear+"&rnd="+Math.round(Math.random()*10000);$.get(url,function(data){$("#arch_"+iMonth+"_"+iYear).html(data);$("#arch_"+iMonth+"_"+iYear).show("slow");});}else{$("#arch_"+iMonth+"_"+iYear).show("slow");}}else{$(obj).removeClass("arch_exp");$(obj).addClass("arch");$("#arch_"+iMonth+"_"+iYear).hide("slow");}}function moreArch(iMonth,iYear,nres){var url="ajxmenu.jsp?op=more_months&month="+iMonth+"&year="+iYear+"&nres="+nres+"&rnd="+Math.round(Math.random()*10000);$.get(url,function(data){$("#li-more").hide("slow");$("#li-more").remove();$("#ul-archive").append(data);$("#ul-archive .archnew").show("slow");$("#ul-archive li").removeClass("archnew");});}function setCookie(c_name,value,expiredays){var exdate=new Date();exdate.setDate(exdate.getDate()+expiredays);document.cookie=c_name+"="+escape(value)+((expiredays==null)?"":";expires="+exdate.toGMTString());}function getCookie(c_name){if(document.cookie.length>0){c_start=document.cookie.indexOf(c_name+"=");if(c_start!=-1){c_start=c_start+c_name.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1){c_end=document.cookie.length;}return unescape(document.cookie.substring(c_start,c_end));}}return"";}function fetchParam(strParam){var url=window.location.toString();url.match(/\?(.+)$/);var params=RegExp.$1;var params=params.split("&");for(var i=0;i<params.length;i++){var tmp=params[i].split("=");if(tmp[0]==strParam){return tmp[1];}}return"";}var now=new Date();var toffSet=now.getTimezoneOffset()/60*(-1);var val=getCookie("t_off");if(val==null||val==""){setCookie("t_off",toffSet,365);val=getCookie("t_off");}else{if(val!=toffSet){setCookie("t_off",toffSet,365);val=getCookie("t_off");}}function fetchViewMode(prefix){var obj=document.getElementById("rad_"+prefix);if(obj==null||obj==undefined){return -1;}if(!obj.checked){return 2;}else{return 1;}}function tg(prefix,id){var img=document.getElementById("exp_"+prefix+id);var res=document.getElementById("res_"+prefix+id);var blk=document.getElementById("blk_"+prefix+id);if(img.src.match("plus.gif")=="plus.gif"){img.src="img/cont/minus.gif";img.alt="Collapse";blk.style.display="block";if(res.innerHTML.length<3){res.innerHTML='<center><img src="/img/l/loading3.gif"></center>';fetchData("ajxres.jsp?op=nav&id="+id+"&off=0"+"&pre="+prefix+"&rnd="+Math.round(Math.random()*10000));}}else{img.src="img/cont/plus.gif";img.alt="Expand";blk.style.display="none";}}function h(id){var txt=document.getElementById(id).innerHTML;tt_help(txt);}function h(id,sub){var txt=document.getElementById(id).innerHTML;txt=txt.replace("$1",sub);tt_help(txt);}function rtrim(str,chars){chars=chars||"\\s";return str.replace(new RegExp("["+chars+"]+$","g"),"");}function copy_to_clipboard(txt){if(window.clipboardData){window.clipboardData.setData("text",txt);}else{var clipboarddiv=document.getElementById("divclipboardswf");if(clipboarddiv==null){clipboarddiv=document.createElement("div");clipboarddiv.setAttribute("name","divclipboardswf");clipboarddiv.setAttribute("id","divclipboardswf");document.body.appendChild(clipboarddiv);}clipboarddiv.innerHTML='<embed src="/js/clip/clipboard.swf" FlashVars="clipboard='+encodeURIComponent(txt)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';}alert("The text has been copied to your clipboard...");return false;}function changeSelectedValue(selectID,selectValue){var selectObj=document.getElementById(selectID);for(var i=0;i<selectObj.length;i++){if(selectObj[i].value==selectValue){selectObj[i].selected=true;break;}}}function yr(){var theDate=new Date();document.write(theDate.getFullYear());}
