<!--
//DO NOT edit this file - it is automatically generated.
//Changes made to this file might be overwritten in the future!!
document.write(getCalendarStyles());var disableDateUpto = new Date();disableDateUpto.setDate(disableDateUpto.getDate() - 1);var disableDateFrom = new Date();disableDateFrom.setDate(disableDateFrom.getDate() + 730);var cal01 = new CalendarPopup("cyploncal");cal01.showNavigationDropdowns();cal01.setCssPrefix("TEST");cal01.addDisabledDates(null,formatDate(disableDateUpto,"yyyy-MM-dd"));cal01.addDisabledDates("2009-11-01",null);cal01.setReturnFunction("setDropdownValues");cal01.offsetX = 28;cal01.offsetY = -12;cal01.restrictPreviousDates();cal01.setYearSelectStartOffset(2);
function setDropdownValues(y,m,d){var myCombo = LZ(m) + y;var selectedMonthYear = document.forms[0].OutMonth.options[document.forms[0].OutMonth.selectedIndex].value;var i=0;var j = document.forms[0].OutMonth.length;var monthThere = false;for(i=0;i<j;i++){if( document.forms[0].OutMonth.options[i].value == myCombo){monthThere = true;document.forms[0].OutMonth.selectedIndex = i;}}if(!monthThere){alert('ERROR setting the month!!! - please check you have entered a valid date.');}if(selectedMonthYear != myCombo){populateDates();}i=0;var j = document.forms[0].OutDay.length;var dayThere = false;for(i=0;i<j;i++){if( document.forms[0].OutDay.options[i].value == LZ(d)){dayThere = true;document.forms[0].OutDay.selectedIndex = i;}}if(!dayThere){alert('ERROR setting the day!!! - please check you have entered a valid date.');}}
function cyplonCal(theCalID,theAnchorName,theDayName,theMonthName){var theDate = new Date();theDate = LZ(theDate.getDate()) + LZ(theDate.getMonth()+1) + theDate.getFullYear();var selectedVal = eval('document.forms[0].'+theDayName+'.value + document.forms[0].'+theMonthName+'.value');var formattedSelectedVal = selectedVal.substring(selectedVal.length-4,selectedVal.length) + '-' + selectedVal.substring(2,4) + '-' + selectedVal.substring(0,2);if(theDate != selectedVal){eval(theCalID+'.showCalendar(\"'+theAnchorName+'\",\"'+formattedSelectedVal+'\")');}else{eval(theCalID+'.showCalendar(\"'+theAnchorName+'\")');}return false;}
function isLeapYear(yr){return new Date(yr,2-1,29).getDate()==29;}
function populateDates(){var startDay = 1;var endDay = 31;var theCutoff = cal01.cutoffMonth+""+cal01.baseYear;var theCutoff2 = cal01.cutoffMonth+""+(cal01.baseYear+2);var theDate = new Date().getDate();if(document.forms[0].OutDay.options.length > 0 && document.forms[0].OutDay.selectedIndex >= 0 && document.forms[0].OutDay.options[document.forms[0].OutDay.selectedIndex].value ){lastDate = document.forms[0].OutDay.options[document.forms[0].OutDay.selectedIndex].value;}if((document.forms[0].OutMonth.options[document.forms[0].OutMonth.selectedIndex].value-0) == theCutoff){startDay = theDate;}while(document.forms[0].OutDay.options.length > 0){document.forms[0].OutDay.options[0] = null;}switch((document.forms[0].OutMonth.options[document.forms[0].OutMonth.selectedIndex].value.slice(0,2)-0)){case 2: {var theYearSelected = document.forms[0].OutMonth.options[document.forms[0].OutMonth.selectedIndex].value.slice(2,6);var theLeapYear = isLeapYear(theYearSelected);if(theLeapYear){endDay = 29;}else{endDay = 28;}break;}case 9: {endDay = 30;break;}case 4: {endDay = 30;break;}case 6: {endDay = 30;break;}case 11: {endDay = 30;break;}}if((document.forms[0].OutMonth.options[document.forms[0].OutMonth.selectedIndex].value-0) == theCutoff2){startDay = 1;if((theDate-1) < endDay){endDay = theDate-1;}} if(lastDate > endDay){lastDate = endDay;}if(lastDate < startDay){lastDate = startDay;}for(var i = startDay;i <= endDay;i++){document.forms[0].OutDay.options[document.forms[0].OutDay.options.length] = new Option(i, fixDay(i),(i==lastDate),(i==lastDate));}}
function fixDay(what){if(what<10){what = "0"+what;}return what;}
//-->