var languageCode="en";var calendar_display_time=false;var todayStringFormat="[todayString] [UCFdayString]. [day]. [monthString] [year]";var pathToImages="/resources/images/calendar/";var speedOfSelectBoxSliding=200;var intervalSelectBox_minutes=5;var calendar_offsetTop=-20;var calendar_offsetLeft=30;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}var imgs=new Array(8);imgs[0]=pathToImages+"left.gif";imgs[1]=pathToImages+"right.gif";imgs[2]=pathToImages+"down.gif";imgs[3]=pathToImages+"close.gif";imgs[4]=pathToImages+"left_over.gif";imgs[5]=pathToImages+"right_over.gif";imgs[6]=pathToImages+"down_over.gif";imgs[7]=pathToImages+"close_over.gif";function preload(){var b=null;for(var a=0;a<imgs.length;a++){b=imgs[a];imgs[a]=new Image();imgs[a].src=b}}void (preload());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="#f2f6f6";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(b,c,a){document.getElementById("calendar_month_txt").innerHTML=b.innerHTML;currentMonth=b.id.replace(/[^\d]/g,"");document.getElementById("monthDropDown").style.display="none";EIS_Hide_Frame();for(var d=0;d<monthArray.length;d++){document.getElementById("monthDiv_"+d).style.color=""}b.style.color=selectBoxHighlightColor;activeSelectBoxMonth=b;writeCalendarContent(c,a)}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(b,c,a){document.getElementById("calendar_year_txt").innerHTML=b.innerHTML;currentYear=b.innerHTML.replace(/[^\d]/g,"");document.getElementById("yearDropDown").style.display="none";EIS_Hide_Frame();if(activeSelectBoxYear){activeSelectBoxYear.style.color=""}activeSelectBoxYear=b;b.style.color=selectBoxHighlightColor;writeCalendarContent(c,a)}function switchMonthBackward(b,a){currentMonth=currentMonth-1;if(currentMonth<0){currentMonth=11;currentYear=currentYear-1}writeCalendarContent(b,a)}function switchMonthForward(b,a){currentMonth=currentMonth+1;if(currentMonth>11){currentMonth=0;currentYear=currentYear/1+1}writeCalendarContent(b,a)}function createMonthDiv(c,a){var e=document.createElement("DIV");e.className="monthYearPicker";e.id="monthPicker";for(var d=0;d<monthArray.length;d++){var b=document.createElement("DIV");b.innerHTML=monthArray[d];b.onmouseover=highlightMonthYear;b.onmouseout=highlightMonthYear;b.onclick=function(){selectMonth(this,c,a)};b.id="monthDiv_"+d;b.style.width="56px";b.onselectstart=cancelCalendarEvent;e.appendChild(b);if(currentMonth&&currentMonth==d){b.style.color=selectBoxHighlightColor;activeSelectBoxMonth=b}}return e}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 f=1;f<c.length-1;f++){c[f].innerHTML=a+f-1;c[f].id="yearDiv"+(a/1+f/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 g=b[1].innerHTML/1-1;if(g<0){g=0}if(activeSelectBoxHour){activeSelectBoxHour.style.color=""}}else{var g=b[1].innerHTML/1+1;if(g>14){g=14}if(activeSelectBoxHour){activeSelectBoxHour.style.color=""}}var c="";for(var f=1;f<b.length-1;f++){if((g/1+f/1)<11){c="0"}else{c=""}b[f].innerHTML=c+(g+f-1);b[f].id="hourDiv"+(g/1+f/1-1)}if(activeSelectBoxHour){activeSelectBoxHour.style.color="";if(document.getElementById("hourDiv"+currentHour)){activeSelectBoxHour=document.getElementById("hourDiv"+currentHour);activeSelectBoxHour.style.color=selectBoxHighlightColor}}}function updateYearDiv(){var c=document.getElementById("yearDropDown");var a=c.getElementsByTagName("DIV");for(var b=1;b<a.length-1;b++){a[b].innerHTML=currentYear/1-6+b;if(currentYear==(currentYear/1-6+b)){a[b].style.color=selectBoxHighlightColor;activeSelectBoxYear=a[b]}else{a[b].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(e,b){if(!document.getElementById("yearDropDown")){var i=document.createElement("DIV");i.className="monthYearPicker"}else{var i=document.getElementById("yearDropDown");var h=i.getElementsByTagName("DIV");for(var g=0;g<h.length;g++){h[g].parentNode.removeChild(h[g])}}var f=new Date();if(currentYear){f.setFullYear(currentYear)}var a=f.getFullYear()/1-5;var c=document.createElement("DIV");c.innerHTML="&nbsp;&nbsp;- ";c.onclick=changeSelectBoxYear;c.onmouseover=highlightMonthYear;c.onmouseout=function(){selectBoxMovementInProgress=false};c.onselectstart=cancelCalendarEvent;i.appendChild(c);for(var g=a;g<(a+10);g++){var c=document.createElement("DIV");c.innerHTML=g;c.onmouseover=highlightMonthYear;c.onmouseout=highlightMonthYear;c.onclick=function(){selectYear(this,e,b)};c.id="yearDiv"+g;c.onselectstart=cancelCalendarEvent;i.appendChild(c);if(currentYear&&currentYear==g){c.style.color=selectBoxHighlightColor;activeSelectBoxYear=c}}var c=document.createElement("DIV");c.innerHTML="&nbsp;&nbsp;+ ";c.onclick=changeSelectBoxYear;c.onmouseover=highlightMonthYear;c.onmouseout=function(){selectBoxMovementInProgress=false};c.onselectstart=cancelCalendarEvent;i.appendChild(c);return i}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=imgs[6].src}else{if(this.className=="selectBoxOver"){this.className="selectBox";this.getElementsByTagName("IMG")[0].src=imgs[2].src}}}function highlightArrow(){if(this.src.indexOf("over")>=0){if(this.src.indexOf("left")>=0){this.src=imgs[0].src}if(this.src.indexOf("right")>=0){this.src=imgs[1].src}}else{if(this.src.indexOf("left")>=0){this.src=imgs[4].src}if(this.src.indexOf("right")>=0){this.src=imgs[5].src}}}function highlightClose(){if(this.src.indexOf("over")>=0){this.src=imgs[3].src}else{this.src=imgs[7].src}}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 updateTopBar(a,e){var b=document.getElementById("leftImg");b.onclick=function(){switchMonthBackward(a,e)};var n=document.getElementById("leftDiv");n.appendChild(b);var f=document.getElementById("rightImg");f.onclick=function(){switchMonthForward(a,e)};var p=document.getElementById("rightDiv");p.appendChild(f);var l=new Date();if(currentYear){l.setFullYear(currentYear)}var j=l.getFullYear()/1-5;var c=document.getElementById("yearDropDown");if(c){for(var o=j;o<(j+10);o++){var i="yearDiv"+o;var k=document.getElementById(i);if(k){k.onclick=function(){selectYear(this,a,e)};c.appendChild(k)}}}var m=document.getElementById("monthDropDown");if(c){for(var o=0;o<monthArray.length;o++){var h="monthDiv_"+o;var g=document.getElementById(h);if(g){g.onclick=function(){selectMonth(this,a,e)};m.appendChild(g)}}}}function writeTopBar(b,e){var c=document.createElement("DIV");c.className="topBar";c.id="topBar";calendarDiv.appendChild(c);var i=document.createElement("DIV");i.id="leftDiv";i.style.marginRight="1px";var f=document.createElement("IMG");f.id="leftImg";f.src=imgs[0].src;f.onmouseover=highlightArrow;f.onclick=function(){switchMonthBackward(b,e)};f.onmouseout=highlightArrow;i.appendChild(f);c.appendChild(i);if(Opera){i.style.width="16px"}var k=document.createElement("DIV");k.id="rightDiv";k.style.marginRight="1px";var f=document.createElement("IMG");f.id="rightImg";f.src=imgs[1].src;f.onclick=function(){switchMonthForward(b,e)};f.onmouseover=highlightArrow;f.onmouseout=highlightArrow;k.appendChild(f);if(Opera){k.style.width="16px"}c.appendChild(k);var d=document.createElement("DIV");d.id="monthSelect";d.onmouseover=highlightSelect;d.onmouseout=highlightSelect;d.onclick=showMonthDropDown;var j=document.createElement("SPAN");j.innerHTML=monthArray[currentMonth];j.id="calendar_month_txt";d.appendChild(j);var f=document.createElement("IMG");f.src=imgs[2].src;f.style.position="absolute";f.style.right="0px";d.appendChild(f);d.className="selectBox";if(Opera){f.style.cssText="float:right;position:relative";f.style.position="relative";f.style.styleFloat="right"}c.appendChild(d);var a=createMonthDiv(b,e);a.style.left="37px";a.style.top=d.offsetTop+d.offsetHeight+1+"px";a.style.width="60px";a.id="monthDropDown";calendarDiv.appendChild(a);var h=document.createElement("DIV");h.onmouseover=highlightSelect;h.onmouseout=highlightSelect;h.onclick=showYearDropDown;var j=document.createElement("SPAN");j.innerHTML=currentYear;j.id="calendar_year_txt";h.appendChild(j);c.appendChild(h);var f=document.createElement("IMG");f.src=imgs[2].src;f.style.position="absolute";f.style.right="0px";h.appendChild(f);h.className="selectBox";if(Opera){h.style.width="50px";f.style.cssText="float:right";f.style.position="relative";f.style.styleFloat="right"}var g=createYearDiv(b,e);g.style.left="113px";g.style.top=d.offsetTop+d.offsetHeight+1+"px";g.style.width="35px";g.id="yearDropDown";calendarDiv.appendChild(g);var f=document.createElement("IMG");f.src=imgs[3].src;f.style.styleFloat="right";f.onmouseover=highlightClose;f.onmouseout=highlightClose;f.onclick=closeCalendar;c.appendChild(f);if(!document.all){f.style.position="absolute";f.style.right="2px"}}function writeCalendarContent(m,s){var j=true;if(!calendarContentDiv){calendarContentDiv=document.createElement("DIV");calendarDiv.appendChild(calendarContentDiv);j=false}currentMonth=currentMonth/1;var r=new Date();r.setFullYear(currentYear);r.setDate(1);r.setMonth(currentMonth);var k=r.getDay();if(k==0){k=7}k--;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 c=calendarContentDiv.getElementsByTagName("TABLE");if(c.length>0){calendarContentDiv.removeChild(c[0])}var a=document.createElement("TABLE");a.width="100%";a.cellSpacing="0";calendarContentDiv.appendChild(a);var i=document.createElement("TBODY");a.appendChild(i);var g=i.insertRow(-1);g.className="calendar_week_row";var f=g.insertCell(-1);f.innerHTML=weekString;f.className="daysWeek";f.style.backgroundColor=selectBoxRolloverBgColor;for(var e=0;e<dayArray.length;e++){var f=g.insertCell(-1);f.innerHTML=dayArray[e];f.className="daysWeek"}var g=i.insertRow(-1);var f=g.insertCell(-1);f.className="daysWeek";f.style.backgroundColor=selectBoxRolloverBgColor;var n=getWeek(currentYear,currentMonth,1);f.innerHTML=n;for(var e=0;e<k;e++){var f=g.insertCell(-1);f.innerHTML="&nbsp;";f.className="daysWeek"}var o=k;var b=daysInMonthArray[currentMonth];if(b==28){if(isLeapYear(currentYear)){b=29}}var q;var h;var l;var p;if(s){h=s.getFullYear();l=s.getMonth();p=s.getDate()}else{q=new Date();h=q.getFullYear();l=q.getMonth();p=q.getDate()}if(m=="future"){for(var e=1;e<=b;e++){r.setDate(e-1);if(o>0&&o%7==0){var g=i.insertRow(-1);var f=g.insertCell(-1);f.className="daysWeek";var n=getWeek(currentYear,currentMonth,e);f.innerHTML=n;f.style.backgroundColor=selectBoxRolloverBgColor}var f=g.insertCell(-1);if(currentYear==h&&currentMonth==l&&e==p){f.className="today";f.onclick=pickDate}else{if(currentYear==inputYear&&currentMonth==inputMonth&&e==inputDay){f.className="selectedDay";f.onclick=pickDate}else{if((currentYear<h)||(currentYear==h&&currentMonth<l)||(currentYear==h&&currentMonth==l&&e<p)){f.className="inactiveDay"}if((currentYear>h)||(currentYear==h&&currentMonth>l)||(currentYear==h&&currentMonth==l&&e>=p)){f.onmouseover=function(d){d=d||window.event;this.style.background="#ffcc66"};f.onmouseout=function(d){d=d||window.event;this.style.background="#fff"};f.className="activeDay";f.onclick=pickDate}}}f.innerHTML=e;o++}}else{for(var e=1;e<=b;e++){r.setDate(e-1);if(o>0&&o%7==0){var g=i.insertRow(-1);var f=g.insertCell(-1);f.className="daysWeek";var n=getWeek(currentYear,currentMonth,e);f.innerHTML=n;f.style.backgroundColor=selectBoxRolloverBgColor}var f=g.insertCell(-1);if(currentYear==h&&currentMonth==l&&e==p){f.className="today"}else{if(currentYear==inputYear&&currentMonth==inputMonth&&e==inputDay){f.className="selectedDay"}else{f.className="activeDay";f.onmouseover=function(d){d=d||window.event;this.style.background="#ffcc66"};f.onmouseout=function(d){d=d||window.event;this.style.background="#fff"}}}f.innerHTML=e;f.onclick=pickDate;o++}}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(!j){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{if(returnDateTo.id.indexOf("CoverStartDate")>1||returnDateTo.id.indexOf("CoverEndDate")>1){setDaysDropDown()}else{returnDateTo.onchange()}}catch(d){}}else{for(var f=0;f<returnDateToYear.options.length;f++){if(returnDateToYear.options[f].value==currentYear){returnDateToYear.selectedIndex=f;break}}for(var f=0;f<returnDateToMonth.options.length;f++){if(returnDateToMonth.options[f].value==b){returnDateToMonth.selectedIndex=f;break}}for(var f=0;f<returnDateToDay.options.length;f++){if(returnDateToDay.options[f].value==a){returnDateToDay.selectedIndex=f;break}}if(calendarDisplayTime){for(var f=0;f<returnDateToHour.options.length;f++){if(returnDateToHour.options[f].value==currentHour){returnDateToHour.selectedIndex=f;break}}for(var f=0;f<returnDateToMinute.options.length;f++){if(returnDateToMinute.options[f].value==currentMinute){returnDateToMinute.selectedIndex=f;break}}}}closeCalendar()}function getWeek(f,d,h){h=h/1;f=f/1;d=d/1+1;var i=Math.floor((14-(d))/12);var g=f+4800-i;var c=(d)+(12*i)-3;var j=h+Math.floor(((153*c)+2)/5)+(365*g)+Math.floor(g/4)-Math.floor(g/100)+Math.floor(g/400)-32045;var k=(j+31741-(j%7))%146097%36524%1461;var e=Math.floor(k/1460);var b=((k-e)%365)+e;NumberOfWeek=Math.floor(b/7)+1;return NumberOfWeek}function writeTimeBar(){var e=document.createElement("DIV");e.id="timeBar";e.className="timeBar";var c=document.createElement("DIV");c.innerHTML="Time:";var a=document.createElement("DIV");var d=document.createElement("SPAN");d.id="calendar_hour_txt";a.appendChild(d);e.appendChild(a);var b=createHourDiv();b.id="hourDropDown";calendarDiv.appendChild(b);var g=document.createElement("DIV");var d=document.createElement("SPAN");d.id="calendar_minute_txt";g.appendChild(d);e.appendChild(g);var f=createMinuteDiv();f.id="minuteDropDown";calendarDiv.appendChild(f);return e}function writeBottomBar(f){var g=new Date();var e=document.createElement("DIV");e.id="bottomBar";e.style.cursor="help";e.className="todaysDate";var c=document.createElement("DIV");c.onclick=pickTodaysDate;c.id="todaysDateString";c.style.width=(calendarDiv.offsetWidth-95)+"px";var b=g.getDay();if(b==0){b=7}b--;var a=todayStringFormat;a=a.replace("[monthString]",monthArrayShort[g.getMonth()]);a=a.replace("[day]",g.getDate());a=a.replace("[year]",g.getFullYear());a=a.replace("[dayString]",dayArray[b].toLowerCase());a=a.replace("[UCFdayString]",dayArray[b]);a=a.replace("[todayString]",todayString);c.innerHTML=todayString+": "+g.getDate()+". "+monthArrayShort[g.getMonth()]+", "+g.getFullYear();c.innerHTML=a;e.appendChild(c);var h=writeTimeBar();e.appendChild(h);calendarDiv.appendChild(e)}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(a){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";document.body.appendChild(iframeObj2);iframeObj2.src="blank.html";iframeObj.src="blank.html";document.body.appendChild(iframeObj)}calendarDiv=document.createElement("DIV");calendarDiv.id="calendarDiv";calendarDiv.style.zIndex=1000;slideCalendarSelectBox();document.body.appendChild(calendarDiv);writeBottomBar(a);writeTopBar(a);if(!currentYear){var b=new Date();currentMonth=b.getMonth();currentYear=b.getFullYear()}writeCalendarContent(a)}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(d,c){return d/1-c/1}function IsValidDate(b){var d=true;if(b){if(b.length>0){var c=b.split(/[^0-9]/gi);if(c.length==3){if(isNaN(c[0])||isNaN(c[1])||isNaN(c[2])){d=false}if((c[2].length!=4)||(c[2]<1900||c[2]>2100)){d=false}if(c[1]<1||c[1]>12){d=false}if(c[0]<1||c[0]>31){d=false}if(d){var a=new Date(c[2],c[1]-1,c[0]);return a}}}}}function displayCalendar(i,m,v,n,j,g){i=document.getElementById(i);if(j){calendarDisplayTime=true}else{calendarDisplayTime=false}var r=false;var h;if(i.value.length>0){var o=i.value.split(/[^0-9]/gi);if(o.length==3){if(isNaN(o[0])||isNaN(o[1])||isNaN(o[2])){r=false}else{r=true;if(n=="future"){h=new Date(o[2],o[1]-1,o[0]);var c=new Date();if(h<c){h=c}}else{var k=i.value.split(/[^0-9]/gi);h=new Date(k[2],k[1]-1,k[0])}}}}if(r){if(!m.match(/^[0-9]*?$/gi)){var a=new Array();a.m=m.indexOf("mm");if(a.m==-1){a.m=m.indexOf("m")}a.d=m.indexOf("dd");if(a.d==-1){a.d=m.indexOf("d")}a.y=m.indexOf("yyyy");a.h=m.indexOf("hh");a.i=m.indexOf("ii");var w=Array();w[0]=a.m;w[1]=a.d;w[2]=a.y;w[3]=a.h;w[4]=a.i;w=w.sort(calendarSortItems);var s=-1;currentHour="00";currentMinute="00";for(var b=0;b<w.length;b++){if(w[b]==-1){continue}s++;if(w[b]==a.m){currentMonth=h.getMonth();continue}if(w[b]==a.y){currentYear=h.getYear();if(currentYear<1900){if(currentYear==-1){var f=new Date();currentYear=f.getFullYear()}if(currentYear<1900){currentYear=currentYear+1900}}continue}if(w[b]==a.d){tmpDay=h.getDate();continue}if(w[b]==a.h){currentHour=h.getHour();continue}if(w[b]==a.i){currentMinute=h.getMinutes();continue}}currentMonth=currentMonth/1;tmpDay=tmpDay/1}else{var t=m.indexOf("mm");currentMonth=i.value.substr(t,2)/1-1;var u=m.indexOf("yyyy");currentYear=i.value.substr(u,4);var l=m.indexOf("dd");tmpDay=i.value.substr(l,2);var e=m.indexOf("hh");if(e>=0){tmpHour=i.value.substr(e,2);currentHour=tmpHour}else{currentHour="00"}var p=m.indexOf("ii");if(p>=0){tmpMinute=i.value.substr(p,2);currentMinute=tmpMinute}else{currentMinute="00"}}}else{var q=new Date();currentMonth=q.getMonth();currentYear=q.getFullYear();currentHour="08";currentMinute="00";tmpDay=q.getDate()}inputYear=currentYear;inputMonth=currentMonth;inputDay=tmpDay/1;if(!calendarDiv){if(n=="future"){initCalendar("future")}else{initCalendar()}}else{if(calendarDiv.style.display=="block"){closeCalendar();return false}if(n=="future"){updateTopBar("future");writeCalendarContent("future")}else{writeCalendarContent()}}returnFormat=m;returnDateTo=i;positionCalendar(v);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 displayTravelToDateCalendar(l,p,m,s){calendarDisplayTime=false;l=document.getElementById(l);p=document.getElementById(p);var j=false;var g=false;var h;var i;var f;var c=new Date();h=IsValidDate(l.value);i=IsValidDate(p.value);if(h){j=true}if(i){g=true}if(j){f=h}else{if(i<c){f=c}}if(g){if(!m.match(/^[0-9]*?$/gi)){var a=new Array();a.m=m.indexOf("mm");if(a.m==-1){a.m=m.indexOf("m")}a.d=m.indexOf("dd");if(a.d==-1){a.d=m.indexOf("d")}a.y=m.indexOf("yyyy");a.h=m.indexOf("hh");a.i=m.indexOf("ii");var t=Array();t[0]=a.m;t[1]=a.d;t[2]=a.y;t[3]=a.h;t[4]=a.i;t=t.sort(calendarSortItems);var o=-1;currentHour="00";currentMinute="00";for(var b=0;b<t.length;b++){if(t[b]==-1){continue}o++;if(t[b]==a.m){currentMonth=f.getMonth();continue}if(t[b]==a.y){currentYear=f.getYear();if(currentYear<1900){if(currentYear==-1){var e=new Date();currentYear=e.getFullYear()}if(currentYear<1900){currentYear=currentYear+1900}}continue}if(t[b]==a.d){tmpDay=f.getDate();continue}if(t[b]==a.h){currentHour=f.getHour();continue}if(t[b]==a.i){currentMinute=f.getMinutes();continue}}currentMonth=currentMonth/1;tmpDay=tmpDay/1}else{var q=m.indexOf("mm");currentMonth=i.value.substr(q,2)/1-1;var r=m.indexOf("yyyy");currentYear=i.value.substr(r,4);var k=m.indexOf("dd");tmpDay=i.value.substr(k,2)}}else{var n=new Date();currentMonth=n.getMonth();currentYear=n.getFullYear();tmpDay=n.getDate()}inputYear=currentYear;inputMonth=currentMonth;inputDay=tmpDay/1;if(!calendarDiv){if(j){initCalendar("future",h)}else{initCalendar("future")}}else{if(calendarDiv.style.display=="block"){closeCalendar();return false}if(j){updateTopBar("future",h);writeCalendarContent("future",h)}else{writeCalendarContent("future")}}returnFormat=m;returnDateTo=p;positionCalendar(s);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()};