var turnOffYearSpan=false;var weekStartsOnSunday=false;var showWeekNumber=false;var languageCode="en";var calendar_display_time=true;var todayStringFormat="[todayString] [UCFdayString]. [day]. [monthString] [year]";var pathToImages="images/";var speedOfSelectBoxSliding=200;var intervalSelectBox_minutes=5;var calendar_offsetTop=0;var calendar_offsetLeft=0;var calendarDiv=false;var MSIE=false;var Opera=false;if(navigator.userAgent.indexOf("MSIE")>=0&&navigator.userAgent.indexOf("Opera")<0){MSIE=true}if(navigator.userAgent.indexOf("Opera")>=0){Opera=true}switch(languageCode){case"en":var monthArray=["January","February","March","April","May","June","July","August","September","October","November","December"];var monthArrayShort=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var dayArray=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];var weekString="Week";var todayString="";break;case"ge":var monthArray=["Januar","Februar","M???rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"];var monthArrayShort=["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"];var dayArray=["Mon","Die","Mit","Don","Fre","Sam","Son"];var weekString="Woche";var todayString="Heute";break;case"no":var monthArray=["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"];var monthArrayShort=["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"];var dayArray=["Man","Tir","Ons","Tor","Fre","L&oslash;r","S&oslash;n"];var weekString="Uke";var todayString="Dagen i dag er";break;case"nl":var monthArray=["Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December"];var monthArrayShort=["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Dec"];var dayArray=["Ma","Di","Wo","Do","Vr","Za","Zo"];var weekString="Week";var todayString="Vandaag";break;case"es":var monthArray=["Enero","Febrero","Marzo","April","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"];var monthArrayShort=["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"];var dayArray=["Lun","Mar","Mie","Jue","Vie","Sab","Dom"];var weekString="Semana";var todayString="Hoy es";break;case"pt-br":var monthArray=["Janeiro","Fevereiro","Mar&ccedil;o","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"];var monthArrayShort=["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"];var dayArray=["Seg","Ter","Qua","Qui","Sex","S&aacute;b","Dom"];var weekString="Sem.";var todayString="Hoje &eacute;";break;case"fr":var monthArray=["Janvier","F???vrier","Mars","Avril","Mai","Juin","Juillet","Ao???t","Septembre","Octobre","Novembre","D???cembre"];var monthArrayShort=["Jan","Fev","Mar","Avr","Mai","Jun","Jul","Aou","Sep","Oct","Nov","Dec"];var dayArray=["Lun","Mar","Mer","Jeu","Ven","Sam","Dim"];var weekString="Sem";var todayString="Aujourd'hui";break;case"da":var monthArray=["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december"];var monthArrayShort=["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec"];var dayArray=["man","tirs","ons","tors","fre","l&oslash;r","s&oslash;n"];var weekString="Uge";var todayString="I dag er den";break;case"hu":var monthArray=["Janu??r","Febru??r","M??rcius","????prilis","M??jus","J??nius","J??lius","Augusztus","Szeptember","Okt??ber","November","December"];var monthArrayShort=["Jan","Feb","M??rc","????pr","M??j","J??n","J??l","Aug","Szep","Okt","Nov","Dec"];var dayArray=["H??","Ke","Sze","Cs","P??","Szo","Vas"];var weekString="H??t";var todayString="Mai nap";break;case"it":var monthArray=["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"];var monthArrayShort=["Gen","Feb","Mar","Apr","Mag","Giu","Lugl","Ago","Set","Ott","Nov","Dic"];var dayArray=["Lun",";Mar","Mer","Gio","Ven","Sab","Dom"];var weekString="Settimana";var todayString="Oggi &egrave; il";break;case"sv":var monthArray=["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"];var monthArrayShort=["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"];var dayArray=["M&aring;n","Tis","Ons","Tor","Fre","L&ouml;r","S&ouml;n"];var weekString="Vecka";var todayString="Idag &auml;r det den";break;case"cz":var monthArray=["leden","&#250;nor","b&#345;ezen","duben","kv&#283;ten","&#269;erven","&#269;ervenec","srpen","z&#225;&#345;&#237;","&#345;&#237;jen","listopad","prosinec"];var monthArrayShort=["led","&#250;n","b&#345;","dub","kv&#283;","&#269;er","&#269;er-ec","srp","z&#225;&#345;","&#345;&#237;j","list","pros"];var dayArray=["Pon","&#218;t","St","&#268;t","P&#225;","So","Ne"];var weekString="t&#253;den";var todayString="";break}if(weekStartsOnSunday){var tempDayName=dayArray[6];for(var theIx=6;theIx>0;theIx--){dayArray[theIx]=dayArray[theIx-1]}dayArray[0]=tempDayName}var daysInMonthArray=[31,28,31,30,31,30,31,31,30,31,30,31];var currentMonth;var currentYear;var currentHour;var currentMinute;var calendarContentDiv;var returnDateTo;var returnFormat;var activeSelectBoxMonth;var activeSelectBoxYear;var activeSelectBoxHour;var activeSelectBoxMinute;var iframeObj=false;var iframeObj2=false;function EIS_FIX_EI1(A){if(!iframeObj2){return }iframeObj2.style.display="block";iframeObj2.style.height=document.getElementById(A).offsetHeight+1;iframeObj2.style.width=document.getElementById(A).offsetWidth;iframeObj2.style.left=getleftPos(document.getElementById(A))+1-calendar_offsetLeft;iframeObj2.style.top=getTopPos(document.getElementById(A))-document.getElementById(A).offsetHeight-calendar_offsetTop}function EIS_Hide_Frame(){if(iframeObj2){iframeObj2.style.display="none"}}var returnDateToYear;var returnDateToMonth;var returnDateToDay;var returnDateToHour;var returnDateToMinute;var inputYear;var inputMonth;var inputDay;var inputHour;var inputMinute;var calendarDisplayTime=false;var selectBoxHighlightColor="#D60808";var selectBoxRolloverBgColor="#E2EBED";var selectBoxMovementInProgress=false;var activeSelectBox=false;function cancelCalendarEvent(){return false}function isLeapYear(A){if(A%400==0||(A%4==0&&A%100!=0)){return true}return false}var activeSelectBoxMonth=false;var activeSelectBoxDirection=false;function highlightMonthYear(){if(activeSelectBoxMonth){activeSelectBoxMonth.className=""}activeSelectBox=this;if(this.className=="monthYearActive"){this.className=""}else{this.className="monthYearActive";activeSelectBoxMonth=this}if(this.innerHTML.indexOf("-")>=0||this.innerHTML.indexOf("+")>=0){if(this.className=="monthYearActive"){selectBoxMovementInProgress=true}else{selectBoxMovementInProgress=false}if(this.innerHTML.indexOf("-")>=0){activeSelectBoxDirection=-1}else{activeSelectBoxDirection=1}}else{selectBoxMovementInProgress=false}}function showMonthDropDown(){if(document.getElementById("monthDropDown").style.display=="block"){document.getElementById("monthDropDown").style.display="none";EIS_Hide_Frame()}else{document.getElementById("monthDropDown").style.display="block";document.getElementById("yearDropDown").style.display="none";document.getElementById("hourDropDown").style.display="none";document.getElementById("minuteDropDown").style.display="none";if(MSIE){EIS_FIX_EI1("monthDropDown")}}}function showYearDropDown(){if(document.getElementById("yearDropDown").style.display=="block"){document.getElementById("yearDropDown").style.display="none";EIS_Hide_Frame()}else{document.getElementById("yearDropDown").style.display="block";document.getElementById("monthDropDown").style.display="none";document.getElementById("hourDropDown").style.display="none";document.getElementById("minuteDropDown").style.display="none";if(MSIE){EIS_FIX_EI1("yearDropDown")}}}function showHourDropDown(){if(document.getElementById("hourDropDown").style.display=="block"){document.getElementById("hourDropDown").style.display="none";EIS_Hide_Frame()}else{document.getElementById("hourDropDown").style.display="block";document.getElementById("monthDropDown").style.display="none";document.getElementById("yearDropDown").style.display="none";document.getElementById("minuteDropDown").style.display="none";if(MSIE){EIS_FIX_EI1("hourDropDown")}}}function showMinuteDropDown(){if(document.getElementById("minuteDropDown").style.display=="block"){document.getElementById("minuteDropDown").style.display="none";EIS_Hide_Frame()}else{document.getElementById("minuteDropDown").style.display="block";document.getElementById("monthDropDown").style.display="none";document.getElementById("yearDropDown").style.display="none";document.getElementById("hourDropDown").style.display="none";if(MSIE){EIS_FIX_EI1("minuteDropDown")}}}function selectMonth(){document.getElementById("calendar_month_txt").innerHTML=this.innerHTML;currentMonth=this.id.replace(/[^\d]/g,"");document.getElementById("monthDropDown").style.display="none";EIS_Hide_Frame();for(var A=0;A<monthArray.length;A++){document.getElementById("monthDiv_"+A).style.color=""}this.style.color=selectBoxHighlightColor;activeSelectBoxMonth=this;writeCalendarContent()}function selectHour(){document.getElementById("calendar_hour_txt").innerHTML=this.innerHTML;currentHour=this.innerHTML.replace(/[^\d]/g,"");document.getElementById("hourDropDown").style.display="none";EIS_Hide_Frame();if(activeSelectBoxHour){activeSelectBoxHour.style.color=""}activeSelectBoxHour=this;this.style.color=selectBoxHighlightColor}function selectMinute(){document.getElementById("calendar_minute_txt").innerHTML=this.innerHTML;currentMinute=this.innerHTML.replace(/[^\d]/g,"");document.getElementById("minuteDropDown").style.display="none";EIS_Hide_Frame();if(activeSelectBoxMinute){activeSelectBoxMinute.style.color=""}activeSelectBoxMinute=this;this.style.color=selectBoxHighlightColor}function selectYear(){document.getElementById("calendar_year_txt").innerHTML=this.innerHTML;currentYear=this.innerHTML.replace(/[^\d]/g,"");document.getElementById("yearDropDown").style.display="none";EIS_Hide_Frame();if(activeSelectBoxYear){activeSelectBoxYear.style.color=""}activeSelectBoxYear=this;this.style.color=selectBoxHighlightColor;writeCalendarContent()}function switchMonth(){if(this.src.indexOf("left")>=0){currentMonth=currentMonth-1;if(currentMonth<0){currentMonth=11;currentYear=currentYear-1}}else{currentMonth=currentMonth+1;if(currentMonth>11){currentMonth=0;currentYear=currentYear/1+1}}writeCalendarContent()}function createMonthDiv(){var C=document.createElement("DIV");C.className="monthYearPicker";C.id="monthPicker";for(var B=0;B<monthArray.length;B++){var A=document.createElement("DIV");A.innerHTML=monthArray[B];A.onmouseover=highlightMonthYear;A.onmouseout=highlightMonthYear;A.onclick=selectMonth;A.id="monthDiv_"+B;A.style.width="56px";A.onselectstart=cancelCalendarEvent;C.appendChild(A);if(currentMonth&&currentMonth==B){A.style.color=selectBoxHighlightColor;activeSelectBoxMonth=A}}return C}function changeSelectBoxYear(D,B){if(!B){B=this}var C=B.parentNode.getElementsByTagName("DIV");if(B.innerHTML.indexOf("-")>=0){var A=C[1].innerHTML/1-1;if(activeSelectBoxYear){activeSelectBoxYear.style.color=""}}else{var A=C[1].innerHTML/1+1;if(activeSelectBoxYear){activeSelectBoxYear.style.color=""}}for(var E=1;E<C.length-1;E++){C[E].innerHTML=A+E-1;C[E].id="yearDiv"+(A/1+E/1-1)}if(activeSelectBoxYear){activeSelectBoxYear.style.color="";if(document.getElementById("yearDiv"+currentYear)){activeSelectBoxYear=document.getElementById("yearDiv"+currentYear);activeSelectBoxYear.style.color=selectBoxHighlightColor}}}function changeSelectBoxHour(D,A){if(!A){A=this}var B=A.parentNode.getElementsByTagName("DIV");if(A.innerHTML.indexOf("-")>=0){var F=B[1].innerHTML/1-1;if(!F||F<0){F=0}if(activeSelectBoxHour){activeSelectBoxHour.style.color=""}}else{var F=B[1].innerHTML/1+1;if(!F||F>14){F=14}if(activeSelectBoxHour){activeSelectBoxHour.style.color=""}}var C="";for(var E=1;E<B.length-1;E++){if((F/1+E/1)<11){C="0"}else{C=""}B[E].innerHTML=C+(F+E-1);B[E].id="hourDiv"+(F/1+E/1-1)}if(activeSelectBoxHour){activeSelectBoxHour.style.color="";if(document.getElementById("hourDiv"+currentHour)){activeSelectBoxHour=document.getElementById("hourDiv"+currentHour);activeSelectBoxHour.style.color=selectBoxHighlightColor}}}function updateYearDiv(){var B=5;if(turnOffYearSpan){B=0}var D=document.getElementById("yearDropDown");var A=D.getElementsByTagName("DIV");for(var C=1;C<A.length-1;C++){A[C].innerHTML=currentYear/1-B+C;if(currentYear==(currentYear/1-B+C)){A[C].style.color=selectBoxHighlightColor;activeSelectBoxYear=A[C]}else{A[C].style.color=""}}}function updateMonthDiv(){for(no=0;no<12;no++){document.getElementById("monthDiv_"+no).style.color=""}document.getElementById("monthDiv_"+currentMonth).style.color=selectBoxHighlightColor;activeSelectBoxMonth=document.getElementById("monthDiv_"+currentMonth)}function updateHourDiv(){var E=document.getElementById("hourDropDown");var B=E.getElementsByTagName("DIV");var A=0;if((currentHour/1-6+1)<0){A=(currentHour/1-6+1)*-1}for(var D=1;D<B.length-1;D++){var C="";if((currentHour/1-6+D+A)<10){C="0"}B[D].innerHTML=C+(currentHour/1-6+D+A);if(currentHour==(currentHour/1-6+D)){B[D].style.color=selectBoxHighlightColor;activeSelectBoxHour=B[D]}else{B[D].style.color=""}}}function updateMinuteDiv(){for(no=0;no<60;no+=intervalSelectBox_minutes){var A="";if(no<10){A="0"}document.getElementById("minuteDiv_"+A+no).style.color=""}if(document.getElementById("minuteDiv_"+currentMinute)){document.getElementById("minuteDiv_"+currentMinute).style.color=selectBoxHighlightColor;activeSelectBoxMinute=document.getElementById("minuteDiv_"+currentMinute)}}function createYearDiv(){if(!document.getElementById("yearDropDown")){var G=document.createElement("DIV");G.className="monthYearPicker"}else{var G=document.getElementById("yearDropDown");var F=G.getElementsByTagName("DIV");for(var E=0;E<F.length;E++){F[E].parentNode.removeChild(F[E])}}var D=new Date();if(currentYear){D.setFullYear(currentYear)}var A=D.getFullYear()/1-5;var C=10;if(!turnOffYearSpan){var B=document.createElement("DIV");B.innerHTML="&nbsp;&nbsp;- ";B.onclick=changeSelectBoxYear;B.onmouseover=highlightMonthYear;B.onmouseout=function(){selectBoxMovementInProgress=false};B.onselectstart=cancelCalendarEvent;G.appendChild(B)}else{A=D.getFullYear()/1-0;C=2}for(var E=A;E<(A+C);E++){var B=document.createElement("DIV");B.innerHTML=E;B.onmouseover=highlightMonthYear;B.onmouseout=highlightMonthYear;B.onclick=selectYear;B.id="yearDiv"+E;B.onselectstart=cancelCalendarEvent;G.appendChild(B);if(currentYear&&currentYear==E){B.style.color=selectBoxHighlightColor;activeSelectBoxYear=B}}if(!turnOffYearSpan){var B=document.createElement("DIV");B.innerHTML="&nbsp;&nbsp;+ ";B.onclick=changeSelectBoxYear;B.onmouseover=highlightMonthYear;B.onmouseout=function(){selectBoxMovementInProgress=false};B.onselectstart=cancelCalendarEvent;G.appendChild(B)}return G}function slideCalendarSelectBox(){if(selectBoxMovementInProgress){if(activeSelectBox.parentNode.id=="hourDropDown"){changeSelectBoxHour(false,activeSelectBox)}if(activeSelectBox.parentNode.id=="yearDropDown"){changeSelectBoxYear(false,activeSelectBox)}}setTimeout("slideCalendarSelectBox()",speedOfSelectBoxSliding)}function createHourDiv(){if(!document.getElementById("hourDropDown")){var F=document.createElement("DIV");F.className="monthYearPicker"}else{var F=document.getElementById("hourDropDown");var E=F.getElementsByTagName("DIV");for(var D=0;D<E.length;D++){E[D].parentNode.removeChild(E[D])}}if(!currentHour){currentHour=0}var C=currentHour/1;if(C>14){C=14}var A=document.createElement("DIV");A.innerHTML="&nbsp;&nbsp;- ";A.onclick=changeSelectBoxHour;A.onmouseover=highlightMonthYear;A.onmouseout=function(){selectBoxMovementInProgress=false};A.onselectstart=cancelCalendarEvent;F.appendChild(A);for(var D=C;D<C+10;D++){var B="";if(D/1<10){B="0"}var A=document.createElement("DIV");A.innerHTML=B+D;A.onmouseover=highlightMonthYear;A.onmouseout=highlightMonthYear;A.onclick=selectHour;A.id="hourDiv"+D;A.onselectstart=cancelCalendarEvent;F.appendChild(A);if(currentYear&&currentYear==D){A.style.color=selectBoxHighlightColor;activeSelectBoxYear=A}}var A=document.createElement("DIV");A.innerHTML="&nbsp;&nbsp;+ ";A.onclick=changeSelectBoxHour;A.onmouseover=highlightMonthYear;A.onmouseout=function(){selectBoxMovementInProgress=false};A.onselectstart=cancelCalendarEvent;F.appendChild(A);return F}function createMinuteDiv(){if(!document.getElementById("minuteDropDown")){var F=document.createElement("DIV");F.className="monthYearPicker"}else{var F=document.getElementById("minuteDropDown");var E=F.getElementsByTagName("DIV");for(var D=0;D<E.length;D++){E[D].parentNode.removeChild(E[D])}}var A=0;var C="";for(var D=A;D<60;D+=intervalSelectBox_minutes){if(D<10){C="0"}else{C=""}var B=document.createElement("DIV");B.innerHTML=C+D;B.onmouseover=highlightMonthYear;B.onmouseout=highlightMonthYear;B.onclick=selectMinute;B.id="minuteDiv_"+C+D;B.onselectstart=cancelCalendarEvent;F.appendChild(B);if(currentYear&&currentYear==D){B.style.color=selectBoxHighlightColor;activeSelectBoxYear=B}}return F}function highlightSelect(){if(this.className=="selectBoxTime"){this.className="selectBoxTimeOver";this.getElementsByTagName("IMG")[0].src=pathToImages+"down_time_over.gif"}else{if(this.className=="selectBoxTimeOver"){this.className="selectBoxTime";this.getElementsByTagName("IMG")[0].src=pathToImages+"down_time.gif"}}if(this.className=="selectBox"){this.className="selectBoxOver";this.getElementsByTagName("IMG")[0].src=pathToImages+"down_over.gif"}else{if(this.className=="selectBoxOver"){this.className="selectBox";this.getElementsByTagName("IMG")[0].src=pathToImages+"down.gif"}}}function highlightArrow(){if(this.src.indexOf("over")>=0){if(this.src.indexOf("left")>=0){this.src=pathToImages+"left.gif"}if(this.src.indexOf("right")>=0){this.src=pathToImages+"right.gif"}}else{if(this.src.indexOf("left")>=0){this.src=pathToImages+"left_over.gif"}if(this.src.indexOf("right")>=0){this.src=pathToImages+"right_over.gif"}}}function highlightClose(){if(this.src.indexOf("over")>=0){this.src=pathToImages+"close.gif"}else{this.src=pathToImages+"close_over.gif"}}function closeCalendar(){document.getElementById("yearDropDown").style.display="none";document.getElementById("monthDropDown").style.display="none";document.getElementById("hourDropDown").style.display="none";document.getElementById("minuteDropDown").style.display="none";calendarDiv.style.display="none";if(iframeObj){iframeObj.style.display="none";EIS_Hide_Frame()}if(activeSelectBoxMonth){activeSelectBoxMonth.className=""}if(activeSelectBoxYear){activeSelectBoxYear.className=""}}function writeTopBar(){var C=document.createElement("DIV");C.className="topBar";C.id="topBar";calendarDiv.appendChild(C);var G=document.createElement("DIV");G.style.marginRight="1px";var D=document.createElement("IMG");D.src=pathToImages+"left.gif";D.onmouseover=highlightArrow;D.onclick=switchMonth;D.onmouseout=highlightArrow;G.appendChild(D);C.appendChild(G);if(Opera){G.style.width="16px"}var I=document.createElement("DIV");I.style.marginRight="1px";var D=document.createElement("IMG");D.src=pathToImages+"right.gif";D.onclick=switchMonth;D.onmouseover=highlightArrow;D.onmouseout=highlightArrow;I.appendChild(D);if(Opera){I.style.width="16px"}C.appendChild(I);var B=document.createElement("DIV");B.id="monthSelect";B.onmouseover=highlightSelect;B.onmouseout=highlightSelect;B.onclick=showMonthDropDown;var H=document.createElement("SPAN");H.innerHTML=monthArray[currentMonth];H.id="calendar_month_txt";B.appendChild(H);var D=document.createElement("IMG");D.src=pathToImages+"down.gif";D.style.position="absolute";D.style.right="0px";B.appendChild(D);B.className="selectBox";if(Opera){D.style.cssText="float:right;position:relative";D.style.position="relative";D.style.styleFloat="right"}C.appendChild(B);var A=createMonthDiv();A.style.left="37px";A.style.top=B.offsetTop+B.offsetHeight+1+"px";A.style.width="60px";A.id="monthDropDown";calendarDiv.appendChild(A);var F=document.createElement("DIV");F.onmouseover=highlightSelect;F.onmouseout=highlightSelect;F.onclick=showYearDropDown;var H=document.createElement("SPAN");H.innerHTML=currentYear;H.id="calendar_year_txt";F.appendChild(H);C.appendChild(F);var D=document.createElement("IMG");D.src=pathToImages+"down.gif";F.appendChild(D);F.className="selectBox";if(Opera){F.style.width="50px";D.style.cssText="float:right";D.style.position="relative";D.style.styleFloat="right"}var E=createYearDiv();E.style.left="113px";E.style.top=B.offsetTop+B.offsetHeight+1+"px";E.style.width="35px";E.id="yearDropDown";calendarDiv.appendChild(E);var D=document.createElement("IMG");D.src=pathToImages+"close.gif";D.style.styleFloat="right";D.onmouseover=highlightClose;D.onmouseout=highlightClose;D.onclick=closeCalendar;C.appendChild(D);if(!document.all){D.style.position="absolute";D.style.right="2px"}}function writeCalendarContent(){var D=true;if(!calendarContentDiv){calendarContentDiv=document.createElement("DIV");calendarDiv.appendChild(calendarContentDiv);D=false}currentMonth=currentMonth/1;var H=new Date();H.setFullYear(currentYear);H.setDate(1);H.setMonth(currentMonth);var E=H.getDay();if(!weekStartsOnSunday){if(E==0){E=7}E--}document.getElementById("calendar_year_txt").innerHTML=currentYear;document.getElementById("calendar_month_txt").innerHTML=monthArray[currentMonth];document.getElementById("calendar_hour_txt").innerHTML=currentHour;document.getElementById("calendar_minute_txt").innerHTML=currentMinute;var A=calendarContentDiv.getElementsByTagName("TABLE");if(A.length>0){calendarContentDiv.removeChild(A[0])}var G=document.createElement("TABLE");G.width="100%";G.cellSpacing="0";calendarContentDiv.appendChild(G);var F=document.createElement("TBODY");G.appendChild(F);var L=F.insertRow(-1);L.className="calendar_week_row";if(showWeekNumber){var I=L.insertCell(-1);I.innerHTML=weekString;I.className="calendar_week_column";I.style.backgroundColor=selectBoxRolloverBgColor}for(var J=0;J<dayArray.length;J++){var I=L.insertCell(-1);I.innerHTML=dayArray[J]}var L=F.insertRow(-1);L.className="calendar_day_row";if(showWeekNumber){var I=L.insertCell(-1);I.className="calendar_week_column";I.style.backgroundColor=selectBoxRolloverBgColor;var C=getWeek(currentYear,currentMonth,1);I.innerHTML=C}for(var J=0;J<E;J++){var I=L.insertCell(-1);I.innerHTML="&nbsp;"}var K=E;var B=daysInMonthArray[currentMonth];if(B==28){if(isLeapYear(currentYear)){B=29}}for(var J=1;J<=B;J++){H.setDate(J-1);if(K>0&&K%7==0){var L=F.insertRow(-1);L.className="calendar_day_row";if(showWeekNumber){var I=L.insertCell(-1);I.className="calendar_week_column";var C=getWeek(currentYear,currentMonth,J);I.innerHTML=C;I.style.backgroundColor=selectBoxRolloverBgColor}}var I=L.insertCell(-1);if(currentYear==inputYear&&currentMonth==inputMonth&&J==inputDay){I.className="activeDay"}I.innerHTML=J;I.onclick=pickDate;K++}if(!document.all){if(calendarContentDiv.offsetHeight){document.getElementById("topBar").style.top=calendarContentDiv.offsetHeight+document.getElementById("timeBar").offsetHeight+document.getElementById("topBar").offsetHeight-1+"px"}else{document.getElementById("topBar").style.top="";document.getElementById("topBar").style.bottom="0px"}}if(iframeObj){if(!D){setTimeout("resizeIframe()",350)}else{setTimeout("resizeIframe()",10)}}}function resizeIframe(){iframeObj.style.width=calendarDiv.offsetWidth+"px";iframeObj.style.height=calendarDiv.offsetHeight+"px"}function pickTodaysDate(){var A=new Date();currentMonth=A.getMonth();currentYear=A.getFullYear();pickDate(false,A.getDate())}function pickDate(D,C){var B=currentMonth/1+1;if(B<10){B="0"+B}var A;if(!C&&this){A=this.innerHTML}else{A=C}if(A/1<10){A="0"+A}if(returnFormat){returnFormat=returnFormat.replace("dd",A);returnFormat=returnFormat.replace("mm",B);returnFormat=returnFormat.replace("yyyy",currentYear);returnFormat=returnFormat.replace("hh",currentHour);returnFormat=returnFormat.replace("ii",currentMinute);returnFormat=returnFormat.replace("d",A/1);returnFormat=returnFormat.replace("m",B/1);returnDateTo.value=returnFormat;try{returnDateTo.onchange()}catch(D){}}else{for(var E=0;E<returnDateToYear.options.length;E++){if(returnDateToYear.options[E].value==currentYear){returnDateToYear.selectedIndex=E;break}}for(var E=0;E<returnDateToMonth.options.length;E++){if(returnDateToMonth.options[E].value==parseInt(B)){returnDateToMonth.selectedIndex=E;break}}for(var E=0;E<returnDateToDay.options.length;E++){if(returnDateToDay.options[E].value==parseInt(A)){returnDateToDay.selectedIndex=E;break}}if(calendarDisplayTime){for(var E=0;E<returnDateToHour.options.length;E++){if(returnDateToHour.options[E].value==parseInt(currentHour)){returnDateToHour.selectedIndex=E;break}}for(var E=0;E<returnDateToMinute.options.length;E++){if(returnDateToMinute.options[E].value==parseInt(currentMinute)){returnDateToMinute.selectedIndex=E;break}}}}closeCalendar()}function getWeek(E,C,G){if(!weekStartsOnSunday){G=(G/1)}else{G=(G/1)+1}E=E/1;C=C/1+1;var H=Math.floor((14-(C))/12);var F=E+4800-H;var B=(C)+(12*H)-3;var I=G+Math.floor(((153*B)+2)/5)+(365*F)+Math.floor(F/4)-Math.floor(F/100)+Math.floor(F/400)-32045;var J=(I+31741-(I%7))%146097%36524%1461;var D=Math.floor(J/1460);var A=((J-D)%365)+D;NumberOfWeek=Math.floor(A/7)+1;return NumberOfWeek}function writeTimeBar(){var F=document.createElement("DIV");F.id="timeBar";F.className="timeBar";var D=document.createElement("DIV");D.innerHTML="Time:";var A=document.createElement("DIV");A.onmouseover=highlightSelect;A.onmouseout=highlightSelect;A.onclick=showHourDropDown;A.style.width="30px";var E=document.createElement("SPAN");if(!currentHour){currentHour=0}E.innerHTML=currentHour;E.id="calendar_hour_txt";A.appendChild(E);F.appendChild(A);var B=document.createElement("IMG");B.src=pathToImages+"down_time.gif";A.appendChild(B);A.className="selectBoxTime";if(Opera){A.style.width="30px";B.style.cssText="float:right";B.style.position="relative";B.style.styleFloat="right"}var C=createHourDiv();C.style.left="130px";C.style.width="35px";C.id="hourDropDown";calendarDiv.appendChild(C);var H=document.createElement("DIV");H.onmouseover=highlightSelect;H.onmouseout=highlightSelect;H.onclick=showMinuteDropDown;H.style.width="30px";var E=document.createElement("SPAN");E.innerHTML=currentMinute;E.id="calendar_minute_txt";H.appendChild(E);F.appendChild(H);var B=document.createElement("IMG");B.src=pathToImages+"down_time.gif";H.appendChild(B);H.className="selectBoxTime";if(Opera){H.style.width="30px";B.style.cssText="float:right";B.style.position="relative";B.style.styleFloat="right"}var G=createMinuteDiv();G.style.left="167px";G.style.width="35px";G.id="minuteDropDown";calendarDiv.appendChild(G);return F}function writeBottomBar(){var E=new Date();var D=document.createElement("DIV");D.id="bottomBar";D.style.cursor="pointer";D.className="todaysDate";var C=document.createElement("DIV");C.onclick=pickTodaysDate;C.id="todaysDateString";C.style.width=(calendarDiv.offsetWidth-95)+"px";var B=E.getDay();if(!weekStartsOnSunday){if(B==0){B=7}B--}var A=todayStringFormat;A=A.replace("[monthString]",monthArrayShort[E.getMonth()]);A=A.replace("[day]",E.getDate());A=A.replace("[year]",E.getFullYear());A=A.replace("[dayString]",dayArray[B].toLowerCase());A=A.replace("[UCFdayString]",dayArray[B]);A=A.replace("[todayString]",todayString);C.innerHTML=todayString+": "+E.getDate()+". "+monthArrayShort[E.getMonth()]+", "+E.getFullYear();C.innerHTML=A;D.appendChild(C);var F=writeTimeBar();D.appendChild(F);calendarDiv.appendChild(D)}function getTopPos(A){var B=A.offsetTop+A.offsetHeight;while((A=A.offsetParent)!=null){B+=A.offsetTop}return B+calendar_offsetTop}function getleftPos(A){var B=A.offsetLeft;while((A=A.offsetParent)!=null){B+=A.offsetLeft}return B+calendar_offsetLeft}function positionCalendar(A){calendarDiv.style.left=getleftPos(A)+"px";calendarDiv.style.top=getTopPos(A)+"px";if(iframeObj){iframeObj.style.left=calendarDiv.style.left;iframeObj.style.top=calendarDiv.style.top;iframeObj2.style.left=calendarDiv.style.left;iframeObj2.style.top=calendarDiv.style.top}}function initCalendar(){if(MSIE){iframeObj=document.createElement("IFRAME");iframeObj.style.filter="alpha(opacity=0)";iframeObj.style.position="absolute";iframeObj.border="0px";iframeObj.style.border="0px";iframeObj.style.backgroundColor="#FF0000";iframeObj2=document.createElement("IFRAME");iframeObj2.style.position="absolute";iframeObj2.border="0px";iframeObj2.style.border="0px";iframeObj2.style.height="1px";iframeObj2.style.width="1px";iframeObj2.src="blank.html";iframeObj.src="blank.html";document.body.appendChild(iframeObj2);document.body.appendChild(iframeObj)}calendarDiv=document.createElement("DIV");calendarDiv.id="calendarDiv";calendarDiv.style.zIndex=1000;slideCalendarSelectBox();document.body.appendChild(calendarDiv);writeBottomBar();writeTopBar();if(!currentYear){var A=new Date();currentMonth=A.getMonth();currentYear=A.getFullYear()}writeCalendarContent()}function setTimeProperties(){if(!calendarDisplayTime){document.getElementById("timeBar").style.display="none";document.getElementById("timeBar").style.visibility="hidden";document.getElementById("todaysDateString").style.width="100%"}else{document.getElementById("timeBar").style.display="block";document.getElementById("timeBar").style.visibility="visible";document.getElementById("hourDropDown").style.top=document.getElementById("calendar_minute_txt").parentNode.offsetHeight+calendarContentDiv.offsetHeight+document.getElementById("topBar").offsetHeight+"px";document.getElementById("minuteDropDown").style.top=document.getElementById("calendar_minute_txt").parentNode.offsetHeight+calendarContentDiv.offsetHeight+document.getElementById("topBar").offsetHeight+"px";document.getElementById("minuteDropDown").style.right="50px";document.getElementById("hourDropDown").style.right="50px";document.getElementById("todaysDateString").style.width="115px"}}function calendarSortItems(B,A){return B/1-A/1}function displayCalendar(E,O,C,Q,B){if(B){pathToImages=B}if(Q){calendarDisplayTime=true}else{calendarDisplayTime=false}if(E.value.length>6){if(!E.value.match(/^[0-9]*?$/gi)){var N=E.value.split(/[^0-9]/gi);var K=new Object();K.m=O.indexOf("mm");if(K.m==-1){K.m=O.indexOf("m")}K.d=O.indexOf("dd");if(K.d==-1){K.d=O.indexOf("d")}K.y=O.indexOf("yyyy");K.h=O.indexOf("hh");K.i=O.indexOf("ii");this.initialHour="00";this.initialMinute="00";var A=["y","m","d","h","i"];var M=["currentYear","currentMonth","inputDay","currentHour","currentMinute"];var G=[4,2,2,2,2];for(var I=0;I<A.length;I++){if(K[A[I]]>=0){window[M[I]]=E.value.substr(K[A[I]],G[I])/1}}currentMonth--}else{var P=O.indexOf("mm");currentMonth=E.value.substr(P,2)/1-1;var F=O.indexOf("yyyy");currentYear=E.value.substr(F,4);var J=O.indexOf("dd");tmpDay=E.value.substr(J,2);var H=O.indexOf("hh");if(H>=0){tmpHour=E.value.substr(H,2);currentHour=tmpHour}else{currentHour="00"}var D=O.indexOf("ii");if(D>=0){tmpMinute=E.value.substr(D,2);currentMinute=tmpMinute}else{currentMinute="00"}}}else{var L=new Date();currentMonth=L.getMonth();currentYear=L.getFullYear();currentHour="08";currentMinute="00";inputDay=L.getDate()/1}if(currentMonth<0||currentYear<0){var L=new Date();currentMonth=L.getMonth();currentYear=L.getFullYear()}inputYear=currentYear;inputMonth=currentMonth;if(!calendarDiv){initCalendar()}else{if(calendarDiv.style.display=="block"){closeCalendar();return false}writeCalendarContent()}returnFormat=O;returnDateTo=E;positionCalendar(C);calendarDiv.style.visibility="visible";calendarDiv.style.display="block";if(iframeObj){iframeObj.style.display="";iframeObj.style.height="140px";iframeObj.style.width="195px";iframeObj2.style.display="";iframeObj2.style.height="140px";iframeObj2.style.width="195px"}setTimeProperties();updateYearDiv();updateMonthDiv();updateMinuteDiv();updateHourDiv()}function displayCalendarSelectBox(E,F,D,C,B,A){if(!C){calendarDisplayTime=false}else{calendarDisplayTime=true}currentMonth=F.options[F.selectedIndex].value/1-1;currentYear=E.options[E.selectedIndex].value;if(C){currentHour=C.options[C.selectedIndex].value;inputHour=currentHour/1}if(B){currentMinute=B.options[B.selectedIndex].value;inputMinute=currentMinute/1}inputYear=E.options[E.selectedIndex].value;inputMonth=F.options[F.selectedIndex].value/1-1;inputDay=D.options[D.selectedIndex].value/1;if(!calendarDiv){initCalendar()}else{writeCalendarContent()}returnDateToYear=E;returnDateToMonth=F;returnDateToDay=D;returnDateToHour=C;returnDateToMinute=B;returnFormat=false;returnDateTo=false;positionCalendar(A);calendarDiv.style.visibility="visible";calendarDiv.style.display="block";if(iframeObj){iframeObj.style.display="";iframeObj.style.height=calendarDiv.offsetHeight+"px";iframeObj.style.width=calendarDiv.offsetWidth+"px";iframeObj2.style.display="";iframeObj2.style.height=calendarDiv.offsetHeight+"px";iframeObj2.style.width=calendarDiv.offsetWidth+"px"}setTimeProperties();updateYearDiv();updateMonthDiv();updateHourDiv();updateMinuteDiv()};