var oldLink=null;function setActiveStyleSheet(e,f){var d,c,b;for(d=0;(c=document.getElementsByTagName("link")[d]);d++){if(c.getAttribute("rel").indexOf("style")!=-1&&c.getAttribute("title")){c.disabled=true;if(c.getAttribute("title")==f){c.disabled=false}}}if(oldLink){oldLink.style.fontWeight="normal"}oldLink=e;e.style.fontWeight="bold";return false}function selected(b,a){b.sel.value=a;if(b.dateClicked&&(b.sel.id=="sel1"||b.sel.id=="sel3")){b.callCloseHandler()}}function closeHandler(a){a.hide()}function showCalendar(g,e){var b=document.getElementById(g);var f=1;f=1;window.external.setVarCalendar(f);if(calendar!=null){calendar.hide()}else{var d=new Calendar(false,null,selected,closeHandler);calendar=d;d.setRange(1900,2200);d.create()}calendar.setDateFormat(e);calendar.sel=b;calendar.parseDate(b.value);calendar.showAtElement(b,"Br");var a=$("#TitleYear").text();var c=$("#TitleMonth").text();return false}var MINUTE=60*1000;var HOUR=60*MINUTE;var DAY=24*HOUR;var WEEK=7*DAY;function isDisabled(b){var a=new Date();return(Math.abs(b.getTime()-a.getTime())/DAY)>10}function flatSelected(c,a){var b=document.getElementById("preview");b.innerHTML=a}function showFlatCalendar(){var a=document.getElementById("display");var b=new Calendar(false,null,flatSelected);b.weekNumbers=false;b.setDisabledHandler(isDisabled);b.setDateFormat("DD, M d");b.create(a);b.show()};