var languageCode = 'en';var calendar_display_time = true;var todayStringFormat = '[todayString] [UCFdayString]. [day]. [monthString] [year]';var pathToImages = '../../metaforce/images/components/calendar/';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;}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 dateoffset = 5;var form;var formAction;var iframeObj = false;var iframeObj2 =false;function EIS_FIX_EI1(where2fixit){if(!iframeObj2)return;iframeObj2.style.display = 'block';iframeObj2.style.height =document.getElementById(where2fixit).offsetHeight+1;iframeObj2.style.width=document.getElementById(where2fixit).offsetWidth;iframeObj2.style.left=getleftPos(document.getElementById(where2fixit))+1-calendar_offsetLeft;iframeObj2.style.top=getTopPos(document.getElementById(where2fixit))-document.getElementById(where2fixit).offsetHeight-calendar_offsetTop;}function EIS_Hide_Frame(){if(iframeObj2)iframeObj2.style.display = 'none';}var returnDateToYear;var returnDateToMonth;var returnDateToDay;var returnDateToHour;var returnDateToMinute;var endDateToYear;var endDateToMonth;var endDateToDay;var endDateToHour;var endDateToMinute;var inputYear;var inputMonth;var inputDay;var inputHour;var inputMinute;var calendarDisplayTime = false;var dayOffset = 0;var selectBoxHighlightColor = '#D60808';var selectBoxRolloverBgColor = '#E2EBED';var selectBoxMovementInProgress = false;var activeSelectBox = false;var shiftType = null;function cancelCalendarEvent(){return false;}function isLeapYear(inputYear){if(inputYear%400==0||(inputYear%4==0&&inputYear%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;elseselectBoxMovementInProgress = 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 no=0;no<monthArray.length;no++){document.getElementById('monthDiv_'+no).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 div = document.createElement('DIV');div.className='monthYearPicker';div.id = 'monthPicker';for(var no=0;no<monthArray.length;no++){var subDiv = document.createElement('DIV');subDiv.innerHTML = monthArray[no];subDiv.onmouseover = highlightMonthYear;subDiv.onmouseout = highlightMonthYear;subDiv.onclick = selectMonth;subDiv.id = 'monthDiv_' + no;subDiv.style.width = '56px';subDiv.onselectstart = cancelCalendarEvent;div.appendChild(subDiv);if(currentMonth && currentMonth==no){subDiv.style.color = selectBoxHighlightColor;activeSelectBoxMonth = subDiv;}}return div;}function changeSelectBoxYear(e,inputObj){if(!inputObj)inputObj =this;var yearItems = inputObj.parentNode.getElementsByTagName('DIV');if(inputObj.innerHTML.indexOf('-')>=0){var startYear = yearItems[1].innerHTML/1 -1;if(activeSelectBoxYear){activeSelectBoxYear.style.color='';}}else{var startYear = yearItems[1].innerHTML/1 +1;if(activeSelectBoxYear){activeSelectBoxYear.style.color='';}}for(var no=1;no<yearItems.length-1;no++){yearItems[no].innerHTML = startYear+no-1;yearItems[no].id = 'yearDiv' + (startYear/1+no/1-1);}if(activeSelectBoxYear){activeSelectBoxYear.style.color='';if(document.getElementById('yearDiv'+currentYear)){activeSelectBoxYear = document.getElementById('yearDiv'+currentYear);activeSelectBoxYear.style.color=selectBoxHighlightColor;;}}}function changeSelectBoxHour(e,inputObj){if(!inputObj)inputObj = this;var hourItems = inputObj.parentNode.getElementsByTagName('DIV');if(inputObj.innerHTML.indexOf('-')>=0){var startHour = hourItems[1].innerHTML/1 -1;if(startHour<0)startHour=0;if(activeSelectBoxHour){activeSelectBoxHour.style.color='';}}else{var startHour = hourItems[1].innerHTML/1 +1;if(startHour>14)startHour = 14;if(activeSelectBoxHour){activeSelectBoxHour.style.color='';}}var prefix = '';for(var no=1;no<hourItems.length-1;no++){if((startHour/1 + no/1) < 11)prefix = '0'; else prefix = '';hourItems[no].innerHTML = prefix + (startHour+no-1);hourItems[no].id = 'hourDiv' + (startHour/1+no/1-1);}if(activeSelectBoxHour){activeSelectBoxHour.style.color='';if(document.getElementById('hourDiv'+currentHour)){activeSelectBoxHour = document.getElementById('hourDiv'+currentHour);activeSelectBoxHour.style.color=selectBoxHighlightColor;;}}}function updateYearDiv(){var div = document.getElementById('yearDropDown');var yearItems = div.getElementsByTagName('DIV');for(var no=1;no<yearItems.length-1;no++){yearItems[no].innerHTML = currentYear/1 -6 + no;if(currentYear==(currentYear/1 -6 + no)){yearItems[no].style.color = selectBoxHighlightColor;activeSelectBoxYear = yearItems[no];}else{yearItems[no].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 div = document.getElementById('hourDropDown');var hourItems = div.getElementsByTagName('DIV');var addHours = 0;if((currentHour/1 -6 + 1)<0){addHours = (currentHour/1 -6 + 1)*-1;}for(var no=1;no<hourItems.length-1;no++){var prefix='';if((currentHour/1 -6 + no + addHours) < 10)prefix='0';hourItems[no].innerHTML = prefix +  (currentHour/1 -6 + no + addHours);if(currentHour==(currentHour/1 -6 + no)){hourItems[no].style.color = selectBoxHighlightColor;activeSelectBoxHour = hourItems[no];}else{hourItems[no].style.color = '';}}}function updateMinuteDiv(){for(no=0;no<60;no+=intervalSelectBox_minutes){var prefix = '';if(no<10)prefix = '0';document.getElementById('minuteDiv_' + prefix + 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 div = document.createElement('DIV');div.className='monthYearPicker';}else{var div = document.getElementById('yearDropDown');var subDivs = div.getElementsByTagName('DIV');for(var no=0;no<subDivs.length;no++){subDivs[no].parentNode.removeChild(subDivs[no]);}}var d = new Date();if(currentYear){d.setFullYear(currentYear);}var startYear = d.getFullYear()/1 - 5;var subDiv = document.createElement('DIV');subDiv.innerHTML = '&nbsp;&nbsp;- ';subDiv.onclick = changeSelectBoxYear;subDiv.onmouseover = highlightMonthYear;subDiv.onmouseout = function(){ selectBoxMovementInProgress = false;};subDiv.onselectstart = cancelCalendarEvent;div.appendChild(subDiv);for(var no=startYear;no<(startYear+10);no++){var subDiv = document.createElement('DIV');subDiv.innerHTML = no;subDiv.onmouseover = highlightMonthYear;subDiv.onmouseout = highlightMonthYear;subDiv.onclick = selectYear;subDiv.id = 'yearDiv' + no;subDiv.onselectstart = cancelCalendarEvent;div.appendChild(subDiv);if(currentYear && currentYear==no){subDiv.style.color = selectBoxHighlightColor;activeSelectBoxYear = subDiv;}}var subDiv = document.createElement('DIV');subDiv.innerHTML = '&nbsp;&nbsp;+ ';subDiv.onclick = changeSelectBoxYear;subDiv.onmouseover = highlightMonthYear;subDiv.onmouseout = function(){ selectBoxMovementInProgress = false;};subDiv.onselectstart = cancelCalendarEvent;div.appendChild(subDiv);return div;}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 div = document.createElement('DIV');div.className='monthYearPicker';}else{var div = document.getElementById('hourDropDown');var subDivs = div.getElementsByTagName('DIV');for(var no=0;no<subDivs.length;no++){subDivs[no].parentNode.removeChild(subDivs[no]);}}if(!currentHour)currentHour=0;var startHour = currentHour/1;if(startHour>14)startHour=14;var subDiv = document.createElement('DIV');subDiv.innerHTML = '&nbsp;&nbsp;- ';subDiv.onclick = changeSelectBoxHour;subDiv.onmouseover = highlightMonthYear;subDiv.onmouseout = function(){ selectBoxMovementInProgress = false;};subDiv.onselectstart = cancelCalendarEvent;div.appendChild(subDiv);for(var no=startHour;no<startHour+10;no++){var prefix = '';if(no/1<10)prefix='0';var subDiv = document.createElement('DIV');subDiv.innerHTML = prefix + no;subDiv.onmouseover = highlightMonthYear;subDiv.onmouseout = highlightMonthYear;subDiv.onclick = selectHour;subDiv.id = 'hourDiv' + no;subDiv.onselectstart = cancelCalendarEvent;div.appendChild(subDiv);if(currentYear && currentYear==no){subDiv.style.color = selectBoxHighlightColor;activeSelectBoxYear = subDiv;}}var subDiv = document.createElement('DIV');subDiv.innerHTML = '&nbsp;&nbsp;+ ';subDiv.onclick = changeSelectBoxHour;subDiv.onmouseover = highlightMonthYear;subDiv.onmouseout = function(){ selectBoxMovementInProgress = false;};subDiv.onselectstart = cancelCalendarEvent;div.appendChild(subDiv);return div;}function createMinuteDiv(){if(!document.getElementById('minuteDropDown')){var div = document.createElement('DIV');div.className='monthYearPicker';}else{var div = document.getElementById('minuteDropDown');var subDivs = div.getElementsByTagName('DIV');for(var no=0;no<subDivs.length;no++){subDivs[no].parentNode.removeChild(subDivs[no]);}}var startMinute = 0;var prefix = '';for(var no=startMinute;no<60;no+=intervalSelectBox_minutes){if(no<10)prefix='0'; else prefix = '';var subDiv = document.createElement('DIV');subDiv.innerHTML = prefix + no;subDiv.onmouseover = highlightMonthYear;subDiv.onmouseout = highlightMonthYear;subDiv.onclick = selectMinute;subDiv.id = 'minuteDiv_' + prefix +  no;subDiv.onselectstart = cancelCalendarEvent;div.appendChild(subDiv);if(currentYear && currentYear==no){subDiv.style.color = selectBoxHighlightColor;activeSelectBoxYear = subDiv;}}return div;}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 topBar = document.createElement('DIV');topBar.className = 'topBar';topBar.id = 'topBar';calendarDiv.appendChild(topBar);var leftDiv = document.createElement('DIV');leftDiv.style.marginRight = '1px';var img = document.createElement('IMG');img.src = pathToImages + 'left.gif';img.onmouseover = highlightArrow;img.onclick = switchMonth;img.onmouseout = highlightArrow;leftDiv.appendChild(img);topBar.appendChild(leftDiv);if(Opera)leftDiv.style.width = '16px';var rightDiv = document.createElement('DIV');rightDiv.style.marginRight = '1px';var img = document.createElement('IMG');img.src = pathToImages + 'right.gif';img.onclick = switchMonth;img.onmouseover = highlightArrow;img.onmouseout = highlightArrow;rightDiv.appendChild(img);if(Opera)rightDiv.style.width = '16px';topBar.appendChild(rightDiv);var monthDiv = document.createElement('DIV');monthDiv.id = 'monthSelect';monthDiv.onmouseover = highlightSelect;monthDiv.onmouseout = highlightSelect;monthDiv.onclick = showMonthDropDown;var span = document.createElement('SPAN');span.innerHTML = monthArray[currentMonth];span.id = 'calendar_month_txt';monthDiv.appendChild(span);var img = document.createElement('IMG');img.src = pathToImages + 'down.gif';img.style.position = 'absolute';img.style.right = '0px';monthDiv.appendChild(img);monthDiv.className = 'selectBox';if(Opera){img.style.cssText = 'float:right;position:relative';img.style.position = 'relative';img.style.styleFloat = 'right';}topBar.appendChild(monthDiv);var monthPicker = createMonthDiv();monthPicker.style.left = '37px';monthPicker.style.top = monthDiv.offsetTop + monthDiv.offsetHeight + 1 + 'px';monthPicker.style.width ='60px';monthPicker.id = 'monthDropDown';calendarDiv.appendChild(monthPicker);var yearDiv = document.createElement('DIV');yearDiv.onmouseover = highlightSelect;yearDiv.onmouseout = highlightSelect;yearDiv.onclick = showYearDropDown;var span = document.createElement('SPAN');span.innerHTML = currentYear;span.id = 'calendar_year_txt';yearDiv.appendChild(span);topBar.appendChild(yearDiv);var img = document.createElement('IMG');img.src = pathToImages + 'down.gif';yearDiv.appendChild(img);yearDiv.className = 'selectBox';if(Opera){yearDiv.style.width = '50px';img.style.cssText = 'float:right';img.style.position = 'relative';img.style.styleFloat = 'right';}var yearPicker = createYearDiv();yearPicker.style.left = '113px';yearPicker.style.top = monthDiv.offsetTop + monthDiv.offsetHeight + 1 + 'px';yearPicker.style.width = '35px';yearPicker.id = 'yearDropDown';calendarDiv.appendChild(yearPicker);var img = document.createElement('IMG');img.src = pathToImages + 'close.gif';img.style.styleFloat = 'right';img.onmouseover = highlightClose;img.onmouseout = highlightClose;img.onclick = closeCalendar;topBar.appendChild(img);if(!document.all){img.style.position = 'absolute';img.style.right = '2px';}}function writeCalendarContent(){var calendarContentDivExists = true;if(!calendarContentDiv){calendarContentDiv = document.createElement('DIV');calendarDiv.appendChild(calendarContentDiv);calendarContentDivExists = false;}currentMonth = currentMonth/1;var d = new Date();d.setFullYear(currentYear);d.setDate(1);d.setMonth(currentMonth);var dayStartOfMonth = d.getDay();if(dayStartOfMonth==0)dayStartOfMonth=7;dayStartOfMonth--;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 existingTable = calendarContentDiv.getElementsByTagName('TABLE');if(existingTable.length>0){calendarContentDiv.removeChild(existingTable[0]);}var calTable = document.createElement('TABLE');calTable.width = '100%';calTable.cellSpacing = '0';calendarContentDiv.appendChild(calTable);var calTBody = document.createElement('TBODY');calTable.appendChild(calTBody);var row = calTBody.insertRow(-1);row.className = 'calendar_week_row';var cell = row.insertCell(-1);cell.innerHTML = weekString;cell.className = 'calendar_week_column';cell.style.backgroundColor = selectBoxRolloverBgColor;for(var no=0;no<dayArray.length;no++){var cell = row.insertCell(-1);cell.innerHTML = dayArray[no];}var row = calTBody.insertRow(-1);var cell = row.insertCell(-1);cell.className = 'calendar_week_column';cell.style.backgroundColor = selectBoxRolloverBgColor;var week = getWeek(currentYear,currentMonth,1);cell.innerHTML = week;for(var no=0;no<dayStartOfMonth;no++){var cell = row.insertCell(-1);cell.innerHTML = '&nbsp;';}var colCounter = dayStartOfMonth;var daysInMonth = daysInMonthArray[currentMonth];if(daysInMonth==28){if(isLeapYear(currentYear))daysInMonth=29;}for(var no=1;no<=daysInMonth;no++){d.setDate(no-1);if(colCounter>0 && colCounter%7==0){var row = calTBody.insertRow(-1);var cell = row.insertCell(-1);cell.className = 'calendar_week_column';var week = getWeek(currentYear,currentMonth,no);cell.innerHTML = week;cell.style.backgroundColor = selectBoxRolloverBgColor;}var cell = row.insertCell(-1);if(currentYear==inputYear && currentMonth == inputMonth && no==inputDay){cell.className='activeDay';}cell.innerHTML = no;cell.onclick = pickDate;colCounter++;}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(!calendarContentDivExists)setTimeout('resizeIframe()',350);else setTimeout('resizeIframe()',10);}}function resizeIframe(){iframeObj.style.width = calendarDiv.offsetWidth + 'px';iframeObj.style.height = calendarDiv.offsetHeight + 'px' ;}function pickTodaysDate(){var d = new Date();currentMonth = d.getMonth();currentYear = d.getFullYear();pickDate(false,d.getDate());}function pickDate(e,inputDay){var month = currentMonth/1 +1;if(month<10)month = '0' + month;var day;if(!inputDay && this)day = this.innerHTML; else day = inputDay;if(day/1<10)day = '0' + day;if(returnFormat){returnFormat = returnFormat.replace('dd',day);returnFormat = returnFormat.replace('mm',month);returnFormat = returnFormat.replace('yyyy',currentYear);returnFormat = returnFormat.replace('hh',currentHour);returnFormat = returnFormat.replace('ii',currentMinute);returnFormat = returnFormat.replace('d',day/1);returnFormat = returnFormat.replace('m',month/1);returnDateTo.value = returnFormat;returnDateTo.onchange();}else{for(var no=0;no<returnDateToYear.options.length;no++){if(returnDateToYear.options[no].value==currentYear){returnDateToYear.selectedIndex=no;break;}}for(var no=0;no<returnDateToMonth.options.length;no++){if(returnDateToMonth.options[no].value==month){returnDateToMonth.selectedIndex=no;break;}}for(var no=0;no<returnDateToDay.options.length;no++){if(returnDateToDay.options[no].value==day){returnDateToDay.selectedIndex=no;break;}}if(calendarDisplayTime){for(var no=0;no<returnDateToHour.options.length;no++){if(returnDateToHour.options[no].value==currentHour){returnDateToHour.selectedIndex=no;break;}}for(var no=0;no<returnDateToMinute.options.length;no++){if(returnDateToMinute.options[no].value==currentMinute){returnDateToMinute.selectedIndex=no;break;}}}if (endDateToYear != null){var endDate = new Date();endDate.setYear(currentYear);if (shiftType == 'M'){endDate.setMonth(month,day);endDate.setDate(endDate.getDate() - 1);}else if (shiftType == 'W'){endDate.setMonth(month-1,day);endDate.setDate(endDate.getDate() + 6);}else{endDate.setMonth(month-1,day);endDate.setDate(endDate.getDate() + 6);}var endYear = endDate.getFullYear();var endMonth = endDate.getMonth();var endDay = endDate.getDate();endMonth = endMonth+1;for(var no=0;no<endDateToYear.options.length;no++){if(endDateToYear.options[no].value==endYear){endDateToYear.selectedIndex=no;break;}}for(var no=0;no<endDateToMonth.options.length;no++){if(endDateToMonth.options[no].value==endMonth){endDateToMonth.selectedIndex=no;break;}}for(var no=0;no<endDateToDay.options.length;no++){if(endDateToDay.options[no].value==endDay){endDateToDay.selectedIndex=no;break;}}}}closeCalendar();if (form){form.actionType.value = formAction;form.submit();}}function getWeek(year,month,day){day = day/1;year = year /1;month = month/1 + 1;var a = Math.floor((14-(month))/12);var y = year+4800-a;var m = (month)+(12*a)-3;var jd = day + Math.floor(((153*m)+2)/5) +(365*y) + Math.floor(y/4) - Math.floor(y/100) +Math.floor(y/400) - 32045;var d4 = (jd+31741-(jd%7))%146097%36524%1461;var L = Math.floor(d4/1460);var d1 = ((d4-L)%365)+L;NumberOfWeek = Math.floor(d1/7) + 1;return NumberOfWeek;}function writeTimeBar(){var timeBar = document.createElement('DIV');timeBar.id = 'timeBar';timeBar.className = 'timeBar';var subDiv = document.createElement('DIV');subDiv.innerHTML = 'Time:';var hourDiv = document.createElement('DIV');hourDiv.onmouseover = highlightSelect;hourDiv.onmouseout = highlightSelect;hourDiv.onclick = showHourDropDown;hourDiv.style.width = '30px';var span = document.createElement('SPAN');span.innerHTML = currentHour;span.id = 'calendar_hour_txt';hourDiv.appendChild(span);timeBar.appendChild(hourDiv);var img = document.createElement('IMG');img.src = pathToImages + 'down_time.gif';hourDiv.appendChild(img);hourDiv.className = 'selectBoxTime';if(Opera){hourDiv.style.width = '30px';img.style.cssText = 'float:right';img.style.position = 'relative';img.style.styleFloat = 'right';}var hourPicker = createHourDiv();hourPicker.style.left = '130px';hourPicker.style.width = '35px';hourPicker.id = 'hourDropDown';calendarDiv.appendChild(hourPicker);var minuteDiv = document.createElement('DIV');minuteDiv.onmouseover = highlightSelect;minuteDiv.onmouseout = highlightSelect;minuteDiv.onclick = showMinuteDropDown;minuteDiv.style.width = '30px';var span = document.createElement('SPAN');span.innerHTML = currentMinute;span.id = 'calendar_minute_txt';minuteDiv.appendChild(span);timeBar.appendChild(minuteDiv);var img = document.createElement('IMG');img.src = pathToImages + 'down_time.gif';minuteDiv.appendChild(img);minuteDiv.className = 'selectBoxTime';if(Opera){minuteDiv.style.width = '30px';img.style.cssText = 'float:right';img.style.position = 'relative';img.style.styleFloat = 'right';}var minutePicker = createMinuteDiv();minutePicker.style.left = '167px';minutePicker.style.width = '35px';minutePicker.id = 'minuteDropDown';calendarDiv.appendChild(minutePicker);return timeBar;}function writeBottomBar(){var d = new Date();var bottomBar = document.createElement('DIV');bottomBar.id = 'bottomBar';bottomBar.style.cursor = 'pointer';bottomBar.className = 'todaysDate';var subDiv = document.createElement('DIV');subDiv.onclick = pickTodaysDate;subDiv.id = 'todaysDateString';subDiv.style.width = (calendarDiv.offsetWidth - 95) + 'px';var day = d.getDay();if(day==0)day = 7;day--;var bottomString = todayStringFormat;bottomString = bottomString.replace('[monthString]',monthArrayShort[d.getMonth()]);bottomString = bottomString.replace('[day]',d.getDate());bottomString = bottomString.replace('[year]',d.getFullYear());bottomString = bottomString.replace('[dayString]',dayArray[day].toLowerCase());bottomString = bottomString.replace('[UCFdayString]',dayArray[day]);bottomString = bottomString.replace('[todayString]',todayString);subDiv.innerHTML = todayString + ': ' + d.getDate() + '. ' + monthArrayShort[d.getMonth()] + ', ' +  d.getFullYear() ;subDiv.innerHTML = bottomString ;bottomBar.appendChild(subDiv);var timeDiv = writeTimeBar();bottomBar.appendChild(timeDiv);calendarDiv.appendChild(bottomBar);}function getTopPos(inputObj){var returnValue = inputObj.offsetTop + inputObj.offsetHeight;while((inputObj = inputObj.offsetParent) != null)returnValue += inputObj.offsetTop;return returnValue + calendar_offsetTop;}function getleftPos(inputObj){var returnValue = inputObj.offsetLeft;while((inputObj = inputObj.offsetParent) != null)returnValue += inputObj.offsetLeft;return returnValue + calendar_offsetLeft;}function positionCalendar(inputObj){calendarDiv.style.left = getleftPos(inputObj) + 'px';calendarDiv.style.top = getTopPos(inputObj) + '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(alignment){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;calendarDiv.style.marginTop = alignment;slideCalendarSelectBox();document.body.appendChild(calendarDiv);writeBottomBar();writeTopBar();if(!currentYear){var d = new Date();currentMonth = d.getMonth();currentYear = d.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(a,b){return a/1 - b/1;}function displayCalendar(inputField,format,buttonObj,displayTime,timeInput,alignment){if(displayTime)calendarDisplayTime=true; else calendarDisplayTime = false;if(inputField.value.length>0){if(!format.match(/^[0-9]*?$/gi)){var items = inputField.value.split(/[^0-9]/gi);var positionArray = new Array();positionArray['m'] = format.indexOf('mm');if(positionArray['m']==-1)positionArray['m'] = format.indexOf('m');positionArray['d'] = format.indexOf('dd');if(positionArray['d']==-1)positionArray['d'] = format.indexOf('d');positionArray['y'] = format.indexOf('yyyy');positionArray['h'] = format.indexOf('hh');positionArray['i'] = format.indexOf('ii');var positionArrayNumeric = Array();positionArrayNumeric[0] = positionArray['m'];positionArrayNumeric[1] = positionArray['d'];positionArrayNumeric[2] = positionArray['y'];positionArrayNumeric[3] = positionArray['h'];positionArrayNumeric[4] = positionArray['i'];positionArrayNumeric = positionArrayNumeric.sort(calendarSortItems);var itemIndex = -1;currentHour = '00';currentMinute = '00';for(var no=0;no<positionArrayNumeric.length;no++){if(positionArrayNumeric[no]==-1)continue;itemIndex++;if(positionArrayNumeric[no]==positionArray['m']){currentMonth = items[itemIndex]-1;continue;}if(positionArrayNumeric[no]==positionArray['y']){currentYear = items[itemIndex];continue;}if(positionArrayNumeric[no]==positionArray['d']){tmpDay = items[itemIndex];continue;}if(positionArrayNumeric[no]==positionArray['h']){currentHour = items[itemIndex];continue;}if(positionArrayNumeric[no]==positionArray['i']){currentMinute = items[itemIndex];continue;}}currentMonth = currentMonth / 1;tmpDay = tmpDay / 1;}else{var monthPos = format.indexOf('mm');currentMonth = inputField.value.substr(monthPos,2)/1 -1;var yearPos = format.indexOf('yyyy');currentYear = inputField.value.substr(yearPos,4);var dayPos = format.indexOf('dd');tmpDay = inputField.value.substr(dayPos,2);var hourPos = format.indexOf('hh');if(hourPos>=0){tmpHour = inputField.value.substr(hourPos,2);currentHour = tmpHour;}else{currentHour = '00';}var minutePos = format.indexOf('ii');if(minutePos>=0){tmpMinute = inputField.value.substr(minutePos,2);currentMinute = tmpMinute;}else{currentMinute = '00';}}}else{var d = new Date();currentMonth = d.getMonth();currentYear = d.getFullYear();currentHour = '08';currentMinute = '00';tmpDay = d.getDate();}inputYear = currentYear;inputMonth = currentMonth;inputDay = tmpDay/1;if(!calendarDiv){initCalendar(alignment);}else{if(calendarDiv.style.display=='block'){closeCalendar();return false;}writeCalendarContent();}returnFormat = format;returnDateTo = inputField;positionCalendar(buttonObj);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(yearInput,monthInput,dayInput,hourInput,minuteInput,buttonObj,alignment){if(!hourInput)calendarDisplayTime=false; else calendarDisplayTime = true;currentMonth = monthInput.options[monthInput.selectedIndex].value/1-1;currentYear = yearInput.options[yearInput.selectedIndex].value;if(hourInput){currentHour = hourInput.options[hourInput.selectedIndex].value;inputHour = currentHour/1;}if(minuteInput){currentMinute = minuteInput.options[minuteInput.selectedIndex].value;inputMinute = currentMinute/1;}inputYear = yearInput.options[yearInput.selectedIndex].value;inputMonth = monthInput.options[monthInput.selectedIndex].value/1 - 1;inputDay = dayInput.options[dayInput.selectedIndex].value/1;if(!calendarDiv){initCalendar(alignment);}else{writeCalendarContent();}returnDateToYear = yearInput;returnDateToMonth = monthInput;returnDateToDay = dayInput;returnDateToHour = hourInput;returnDateToMinute = minuteInput;returnFormat = false;returnDateTo = false;positionCalendar(buttonObj);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();}function displayCalendarSelectBoxById(yearControlId,monthControlId,dayControlId,buttonObj,submitForm,submitFormAction,alignment){var yearControl = document.getElementById(yearControlId);var monthControl = document.getElementById(monthControlId);var dayControl = document.getElementById(dayControlId);form = submitForm;formAction = submitFormAction;shiftType = null;endDateToYear = null;endDateToMonth = null;endDateToDay = null;displayCalendarSelectBox(yearControl,monthControl,dayControl,false,false,buttonObj,alignment);}function displayCalendarSelectBoxById_DateRange(startYearControlId,startMonthControlId,startDayControlId,endYearControlId,endMonthControlId,endDayControlId,buttonObj,submitForm,submitFormAction,alignment){var startYearControl = document.getElementById(startYearControlId);var startMonthControl = document.getElementById(startMonthControlId);var startDayControl = document.getElementById(startDayControlId);form = submitForm;formAction = submitFormAction;shiftType = null;displayCalendarSelectBox(startYearControl,startMonthControl,startDayControl,false,false,buttonObj,alignment);if (endYearControlId != null){endDateToYear = document.getElementById(endYearControlId);;endDateToMonth = document.getElementById(endMonthControlId);;endDateToDay = document.getElementById(endDayControlId);;}}function createControl(selectControlParent,element,arrayControlList,defaultValue){var currentElement = document.getElementById('DYNAM_CONT_1');if (currentElement != null){var parent = currentElement.parentNode;parent.removeChild(currentElement);}var box = document.getElementById(selectControlParent);var number = box.options[box.selectedIndex].value;var list = arrayControlList[number];var type = list[0];var name = 'value(' + list[1] + ')';if (type == 'textbox'){var newElement = document.createElement('input');newElement.setAttribute('type',type);newElement.setAttribute('name',name);newElement.setAttribute('id','DYNAM_CONT_1');newElement.setAttribute('size',list[2]);newElement.setAttribute('maxlength',list[3]);newElement.setAttribute('className','InputControl');document.getElementById(element).appendChild(newElement);}else if (type == 'select'){var newElement = document.createElement('select');newElement.setAttribute('name',name);newElement.setAttribute('id','DYNAM_CONT_1');newElement.setAttribute('className','InputControl');for(i=2;i<list.length;i+=2){newElement.options[(i/2) -1] = new Option(list[i],list[i+1]);}document.getElementById(element).appendChild(newElement);}else if (type == 'file'){var newElement = document.createElement('input');newElement.setAttribute('type',type);newElement.setAttribute('name',name);newElement.setAttribute('id','DYNAM_CONT_1');newElement.setAttribute('className','InputControl');document.getElementById(element).appendChild(newElement);}else if (type == 'textarea'){var newElement = document.createElement('textarea');newElement.setAttribute('name',name);newElement.setAttribute('id','DYNAM_CONT_1');newElement.setAttribute('cols',list[2]);newElement.setAttribute('rows',list[3]);if (defaultValue != null){newElement.value = defaultValue;}document.getElementById(element).appendChild(newElement);}else if (type == 'text'){var newElement = document.createElement('text');newElement.setAttribute('name',name);newElement.setAttribute('id','DYNAM_CONT_1');document.getElementById(element).appendChild(newElement);}}function createSelectionControl(selectControlParent,element,arrayControlList){var currentElement = document.getElementById('DYNAM_CONT_1');if (currentElement != null){var parent = currentElement.parentNode;parent.removeChild(currentElement);}var box = document.getElementById(selectControlParent);var number = box.options[box.selectedIndex].value;var list = arrayControlList[number];var type = list[0];var defaultIndex = list[2];var name = 'value(' + list[1] + ')';var newElement = document.createElement('select');newElement.setAttribute('name',name);newElement.setAttribute('id','DYNAM_CONT_1');newElement.setAttribute('className','InputControl');for(i=4;i<list.length;i+=2){newElement.options[(i/2) -2] = new Option(list[i],list[i+1]);}if (defaultIndex != null && defaultIndex != ''){newElement.selectedIndex = defaultIndex;}document.getElementById(element).appendChild(newElement);}function createControlBooking(selectControlParent,element,arrayControlList){if (element == null || element.length == 0 || arrayControlList == null){return;}var currentElement = document.getElementById('DYNAM_CONT_1');var box = document.getElementById(selectControlParent);var number = '' + box.options[box.selectedIndex].value;if (number.substr(0,1) == '0'){number = number.substr(1,1);}else{number = number.substr(0,2);}var list = arrayControlList[number];var type = list[0];var name = 'value(' + list[1] + ')';var defaultIndex = list[2];var newElement = document.createElement('select');newElement.setAttribute('name',name);newElement.setAttribute('id','DYNAM_CONT_1');newElement.setAttribute('className','InputControl');for(i=4;i<list.length;i+=2){newElement.options[(i/2) -2] = new Option(list[i],list[i+1]);}if (defaultIndex != null && defaultIndex != ''){newElement.selectedIndex = defaultIndex;}document.getElementById(element).appendChild(newElement);if (currentElement != null){var parent = currentElement.parentNode;parent.removeChild(currentElement);}}function populate(selectControlParent,selectControlChild,selectionArray){var box = document.getElementById(selectControlParent);var number = box.options[box.selectedIndex].value;if (!number) return;var list = selectionArray[number];var box2 = document.getElementById(selectControlChild);box2.options.length = 0;for(i=0;i<list.length;i+=2){box2.options[i/2] = new Option(list[i+1],list[i]);}}function populateCurrent(selectControlParent,selectControlChild,selectionArray){var box = document.getElementById(selectControlParent);var number = box.options[box.selectedIndex].value;if (!number) return;var list = selectionArray[number];var box2 = document.getElementById(selectControlChild);box2.options.length = 0;for(i=0;i<list.length;i+=2){box2.options[i/2] = new Option(list[i+1],list[i]);}}function setBackgroundColor(parentNode,color){if (parentNode.id == 'EXCLUDE'){parentNode.style.backgroundColor = '#CCCCFF';}for (var x = 0; x < parentNode.childNodes.length; x++){setBackgroundColor(parentNode.childNodes[x],color);}return;}function setSelectionCallback(setId,backgroundClass,selectionClass){var backgroundColor = '#CCCCFF';if (backgroundClass == 'Display'){backgroundColor = '#FFFFCC';}if (backgroundClass == 'Selection'){backgroundColor = '#FFCC66';}var selectionColor = '#CCCCFF';if (selectionClass == 'Display'){selectionColor = '#FFFFCC';}if (selectionClass == 'Selection'){selectionColor = '#FFCC66';}var color;var subsetNode = document.getElementById('SUBSET_' + setId);if (subsetNode.style.display != 'none'){subsetNode.style.display = 'none';color=backgroundColor;}else{subsetNode.style.display = '';color=selectionColor;}var setNode = document.getElementById('SET_1_' + setId);setBackgroundColor(setNode,color);if (subsetNode.style.display != 'none'){setNode.className = 'BorderedAreaHighlight';}else{setNode.className = '';}}function htR(tableRow,highLight,tableClass){if (highLight){tableRow.style.backgroundColor = 'pink';}else{tableRow.style.backgroundColor = '';}}function htI(tableRow){var rowCells = tableRow.getElementsByTagName("td");for (var i=1; i<rowCells.length; i++){rowCells[i].style.className = rowCells[i].style.backgroundColor;rowCells[i].style.backgroundColor = 'pink';}}function htO(tableRow){var rowCells = tableRow.getElementsByTagName("td");for (var i=1; i<rowCells.length; i++){rowCells[i].style.backgroundColor = rowCells[i].style.className;}}function hI(tableRow,time){tableRow.style.backgroundColor = 'pink';var timeCell = tableRow.childNodes[0];if (timeCell.id != 't'){timeCell = tableRow.childNodes[1];}timeCell.innerHTML = time;}function hO(tableRow){tableRow.style.backgroundColor = '';var timeCell = tableRow.childNodes[0];if (timeCell.id != 't'){timeCell = tableRow.childNodes[1];}timeCell.innerHTML = '';}function hIF(tableRow,time){var rowCells = tableRow.getElementsByTagName("td");for (var i=1; i<rowCells.length; i++){rowCells[i].style.className = rowCells[i].style.backgroundColor;rowCells[i].style.backgroundColor = 'pink';}var timeCell = document.getElementById(time);if (timeCell == null){window.alert('no element found');}timeCell.innerHTML = time;timeCell.height = '12px';}function hOF(tableRow,time){var rowCells = tableRow.getElementsByTagName("td");for (var i=1; i<rowCells.length; i++){rowCells[i].style.backgroundColor = rowCells[i].style.className;}var timeCell = tableRow.childNodes[0];var timeCell = document.getElementById( time);if (timeCell == null){window.alert('no element found');}timeCell.innerHTML = '';}function debug(message){var i = 1;}function IEHoverPseudo(){var navElement = document.getElementById('lsproduct-nav');if (navElement != null){var navItems = navElement.getElementsByTagName('li');for (var i=0; i<navItems.length; i++) {if(navItems[i].className == 'menuparent') {navItems[i].onmouseover=function() { this.className += ' over'; };navItems[i].onmouseout=function() { this.className = 'menuparent'; };}}}var navElement = document.getElementById('primary-nav');if (navElement != null){var navItems = navElement.getElementsByTagName('li');for (var i=0; i<navItems.length; i++) {if(navItems[i].className == 'menuparent') {navItems[i].onmouseover=function() { this.className += ' over'; };navItems[i].onmouseout=function() { this.className = 'menuparent'; };}}}HideLayer();}window.onload = IEHoverPseudo;function doSubmission(form,action,actionPath){form.actionType.value = action;if (actionPath != null && actionPath != ''){form.action = '../../metaforce/' + actionPath + '.do';}form.enctype = 'multipart/form-data';form.submit();}function doSubBS(form,action,actionPath,selectionKey){form.actionType.value = action;form.action = '../../metaforce/' + actionPath + '.do' + '?SelectionKey=' + selectionKey;form.submit();}function b(selectionKey){document.forms[0].actionType.value = 'NKB';document.forms[0].action = '../../metaforce/CustomerTransactionBookingRequest.do' + '?SelectionKey=' + selectionKey;document.forms[0].submit();}function o(selectionKey){document.forms[0].actionType.value = 'NKB';document.forms[0].action = '../../metaforce/CustomerTransactionBookingRequest.do' + '?SelectionKey=QASO,' + selectionKey;document.forms[0].submit();}function bt(selectionKey){document.forms[0].actionType.value = 'NKB';document.forms[0].action = '../../metaforce/ActorTransactionTransferRequest.do' + '?SelectionKey=' + selectionKey;document.forms[0].submit();}function abs(selectionKey){document.forms[0].actionType.value = 'BS';document.forms[0].action = '../../metaforce/ActorHomeRequest.do' + '?SelectionKey=' + selectionKey;document.forms[0].submit();}function abm(selectionKey){document.forms[0].actionType.value = 'BM';document.forms[0].action = '../../metaforce/ActorHomeRequest.do' + '?SelectionKey=' + selectionKey;document.forms[0].submit();}function abc(selectionKey){document.forms[0].actionType.value = 'BC';document.forms[0].action = '../../metaforce/ActorHomeRequest.do' + '?SelectionKey=' + selectionKey;document.forms[0].submit();}function nb(selectionKey){document.forms[0].actionType.value = 'NKB';document.forms[0].action = '../../metaforce/TDCR.do' + '?SelectionKey=' + selectionKey;document.forms[0].submit();}function nbrd(selectionKey,resourceDomainId){document.forms[0].actionType.value = 'NKB';document.forms[0].action = '../../metaforce/TDCR.do' + '?SelectionKey=' + selectionKey + '&resourceDomainId=' + resourceDomainId;document.forms[0].submit();}function no(selectionKey){document.forms[0].actionType.value = 'NKB';document.forms[0].action = '../../metaforce/TDCR.do' + '?SelectionKey=QASO,' + selectionKey;document.forms[0].submit();}function nord(selectionKey,resourceDomainId){document.forms[0].actionType.value = 'NKB';document.forms[0].action = '../../metaforce/TDCR.do' + '?SelectionKey=QASO,' + selectionKey + '&resourceDomainId=' + resourceDomainId;document.forms[0].submit();}function cb(selectionKey){document.forms[0].actionType.value = 'BC';document.forms[0].action = '../../metaforce/TDCR.do' + '?SelectionKey=' + selectionKey;document.forms[0].submit();}function mb(selectionKey){document.forms[0].actionType.value = 'BM';document.forms[0].action = '../../metaforce/TDCR.do' + '?SelectionKey=' + selectionKey;document.forms[0].submit();}function mbc(selectionKey){document.forms[0].actionType.value = 'BCM';document.forms[0].action = '../../metaforce/TDCR.do' + '?SelectionKey=' + selectionKey;document.forms[0].submit();}function bs(selectionKey){document.forms[0].actionType.value = 'BS';document.forms[0].action = '../../metaforce/TDCR.do' + '?SelectionKey=' + selectionKey;document.forms[0].submit();}function doSubmissionCustomerSelection(form,action,actionPath,selectionKey){form.actionType.value = action;form.action = '../../metaforce/' + actionPath + '.do' + '?SelectionKey=' + selectionKey;form.submit();}function productDomainSelection(form,valueid,currentPage){form.actionType.value = 'productDomain';form.action = '../../metaforce/ProductDomainStructureQuery.do' + '?ChildProductDomainId=' + valueid+ '&actionType=productDomain'+ '&CurrentPage=' + currentPage;form.submit();}function browserSelection(form,actionValue,actionParameter){form.actionType.value = actionValue;form.action = '../../metaforce/BrowserRequest.do';if (actionParameter != null){form.action = form.action + '?selectionId=' + actionParameter;}form.submit();}function checkEnter(e,form,submitValue,submitPath){var characterCode;if(e && e.which){e = e;characterCode = e.which;}else{e = event;characterCode = e.keyCode;}if(characterCode == 13){doSubmission(form,submitValue,submitPath);return false;}else{return true;}}var map = null;var startscan = 0;var endscan = 3;function showGoogleMap(line1,line2,line3,line4,postCode, elementId){var i = startscan;var searchAddress = '';var addressArray = new Array(5);addressArray[0] = line1;addressArray[1] = line2;addressArray[2] = line3;do{searchAddress += addressArray[i]+',';i++;}while (i < endscan)searchAddress+= line4+','+postCode;displayAddress = "<div style='position:relative;left:30%;font-size:10px;font-family:Verdana,arial'><b>"+line1+"</b><br>"+line2+"<br>"+line3+"<br>"+line4+"<br>"+postCode+"</div>";geocoder = new GClientGeocoder();geocoder.getLatLng( searchAddress, function(point){if (!point){if (startscan == 4){document.getElementById('map').style.cssText = 'height:0px;';}else{startscan++;showGoogleMap(line1,line2,line3,line4,postCode, elementId);}}else{map = new GMap2(document.getElementById(elementId,{size:new GSize(250,250)}));map.setCenter(point,15);var marker = new GMarker(point,searchAddress);map.addOverlay(marker);GEvent.addListener(marker, 'click', function() {marker.openInfoWindowHtml(displayAddress)});}});}function boxchk(obj,max) {var box = obj.name.substr(0,obj.name.lastIndexOf('_')+1);var cnt=0,i=1;while(obj.form[box+i]) {cnt += obj.form[box+i].checked;i++;}if (cnt > max) {obj.checked = false;alert('Only choose ' + max + ' '+box.substr(0,box.length-1) +' checkboxes.\nTo pick this option unselect one of the others.');}}function ShowLayer() {var layer = document.getElementById('layer');if (layer != null){layer.style.display = 'block';}var iframe = document.getElementById('iframe');if (iframe != null){iframe.style.display = 'block';}}function HideLayer() {var iframe = document.getElementById('iframe');if (iframe != null){iframe.style.display = 'none';}var layer = document.getElementById('layer');if (layer != null){layer.style.display = 'none';}}function stopPropagation(event){var element = event.srcElement;if (typeof event.stopProgagation != 'undefined'){event.stopPropagation();}else{event.cancelBubble = true;}}function displayCalendarSelectBoxById_VariableDateRange(startYearControlId,startMonthControlId,startDayControlId,endYearControlId,endMonthControlId,endDayControlId,buttonObj,submitForm,submitFormAction,alignment,shiftTypeId){var startYearControl = document.getElementById(startYearControlId);var startMonthControl = document.getElementById(startMonthControlId);var startDayControl = document.getElementById(startDayControlId);form = submitForm;formAction = submitFormAction;shiftType = shiftTypeId;displayCalendarSelectBox(startYearControl,startMonthControl,startDayControl,false,false,buttonObj,alignment);if (endYearControlId != null){endDateToYear = document.getElementById(endYearControlId);endDateToMonth = document.getElementById(endMonthControlId);endDateToDay = document.getElementById(endDayControlId);}}var superTable = function (tableId, options) {options = options || {};this.cssSkin = options.cssSkin || "";this.headerRows = parseInt(options.headerRows || "1");this.fixedCols = parseInt(options.fixedCols || "0");this.colWidths = options.colWidths || [];this.initFunc = options.onStart || null;this.callbackFunc = options.onFinish || null;this.initFunc && this.initFunc();this.sBase = document.createElement("DIV");this.sFHeader = this.sBase.cloneNode(false);this.sHeader = this.sBase.cloneNode(false);this.sHeaderInner = this.sBase.cloneNode(false);this.sFData = this.sBase.cloneNode(false);this.sFDataInner = this.sBase.cloneNode(false);this.sData = this.sBase.cloneNode(false);this.sColGroup = document.createElement("COLGROUP");this.sDataTable = document.getElementById(tableId);this.sDataTable.style.margin = "0px"; /* Otherwise looks bad */if (this.cssSkin !== "") {this.sDataTable.className += " " + this.cssSkin;}if (this.sDataTable.getElementsByTagName("COLGROUP").length > 0) {this.sDataTable.removeChild(this.sDataTable.getElementsByTagName("COLGROUP")[0]); /* Making our own */}this.sParent = this.sDataTable.parentNode;this.sParentHeight = this.sParent.offsetHeight;this.sParentWidth = this.sParent.offsetWidth;this.sBase.className = "sBase";this.sFHeader.className = "sFHeader";this.sHeader.className = "sHeader";this.sHeaderInner.className = "sHeaderInner";this.sFData.className = "sFData";this.sFDataInner.className = "sFDataInner";this.sData.className = "sData";var alpha, beta, touched, clean, cleanRow, i, j, k, m, n, p;this.sHeaderTable = this.sDataTable.cloneNode(false);if (this.sDataTable.tHead) {alpha = this.sDataTable.tHead;this.sHeaderTable.appendChild(alpha.cloneNode(false));beta = this.sHeaderTable.tHead;} else {alpha = this.sDataTable.tBodies[0];this.sHeaderTable.appendChild(alpha.cloneNode(false));beta = this.sHeaderTable.tBodies[0];}alpha = alpha.rows;for (i=0; i<this.headerRows; i++) {beta.appendChild(alpha[i].cloneNode(true));}this.sHeaderInner.appendChild(this.sHeaderTable);if (this.fixedCols > 0) {this.sFHeaderTable = this.sHeaderTable.cloneNode(true);this.sFHeader.appendChild(this.sFHeaderTable);this.sFDataTable = this.sDataTable.cloneNode(true);this.sFDataInner.appendChild(this.sFDataTable);}alpha = this.sDataTable.tBodies[0].rows;for (i=0, j=alpha.length; i<j; i++) {clean = true;for (k=0, m=alpha[i].cells.length; k<m; k++) {if (alpha[i].cells[k].colSpan !== 1 || alpha[i].cells[k].rowSpan !== 1) {i += alpha[i].cells[k].rowSpan - 1;clean = false;break;}}if (clean === true) break; /* A row with no cells of colSpan > 1 || rowSpan > 1 has been found */}cleanRow = (clean === true) ? i : 0; /* Use this row index to calculate the column widths */for (i=0, j=alpha[cleanRow].cells.length; i<j; i++) {if (i === this.colWidths.length || this.colWidths[i] === -1) {this.colWidths[i] = alpha[cleanRow].cells[i].offsetWidth;}}for (i=0, j=this.colWidths.length; i<j; i++) {var newElement = document.createElement("COL");this.sColGroup.appendChild(newElement);this.sColGroup.lastChild.setAttribute("width", this.colWidths[i]);}this.sDataTable.insertBefore(this.sColGroup.cloneNode(true), this.sDataTable.firstChild);this.sHeaderTable.insertBefore(this.sColGroup.cloneNode(true), this.sHeaderTable.firstChild);if (this.fixedCols > 0) {this.sFDataTable.insertBefore(this.sColGroup.cloneNode(true), this.sFDataTable.firstChild);this.sFHeaderTable.insertBefore(this.sColGroup.cloneNode(true), this.sFHeaderTable.firstChild);}if (this.cssSkin !== "") {this.sDataTable.className += " " + this.cssSkin + "-Main";this.sHeaderTable.className += " " + this.cssSkin + "-Headers";if (this.fixedCols > 0) {this.sFDataTable.className += " " + this.cssSkin + "-Fixed";this.sFHeaderTable.className += " " + this.cssSkin + "-FixedHeaders";}}if (this.fixedCols > 0) {this.sBase.appendChild(this.sFHeader);}this.sHeader.appendChild(this.sHeaderInner);this.sBase.appendChild(this.sHeader);if (this.fixedCols > 0) {this.sFData.appendChild(this.sFDataInner);this.sBase.appendChild(this.sFData);}this.sBase.appendChild(this.sData);this.sParent.insertBefore(this.sBase, this.sDataTable);this.sData.appendChild(this.sDataTable);var sDataStyles, sDataTableStyles;this.sHeaderHeight = this.sDataTable.tBodies[0].rows[(this.sDataTable.tHead) ? 0 : this.headerRows].offsetTop;sDataTableStyles = "margin-top: " + (this.sHeaderHeight * -1) + "px;";sDataStyles = "margin-top: " + this.sHeaderHeight + "px;";sDataStyles += "height: " + (this.sParentHeight - this.sHeaderHeight) + "px;";if (this.fixedCols > 0) {this.sFHeaderWidth = this.sDataTable.tBodies[0].rows[cleanRow].cells[this.fixedCols].offsetLeft;if (window.getComputedStyle) {alpha = document.defaultView;beta = this.sDataTable.tBodies[0].rows[0].cells[0];if (navigator.taintEnabled) { /* If not Safari */this.sFHeaderWidth += Math.ceil(parseInt(alpha.getComputedStyle(beta, null).getPropertyValue("border-right-width")) / 2);} else {this.sFHeaderWidth += parseInt(alpha.getComputedStyle(beta, null).getPropertyValue("border-right-width"));}} else if (/*@cc_on!@*/0) { /* Internet Explorer */alpha = this.sDataTable.tBodies[0].rows[0].cells[0];beta = [alpha.currentStyle["borderRightWidth"], alpha.currentStyle["borderLeftWidth"]];if(/px/i.test(beta[0]) && /px/i.test(beta[1])) {beta = [parseInt(beta[0]), parseInt(beta[1])].sort();this.sFHeaderWidth += Math.ceil(parseInt(beta[1]) / 2);}}if (window.opera) {this.sFData.style.height = this.sParentHeight + "px";}this.sFHeader.style.width = this.sFHeaderWidth + "px";sDataTableStyles += "margin-left: " + (this.sFHeaderWidth * -1) + "px;";sDataStyles += "margin-left: " + this.sFHeaderWidth + "px;";sDataStyles += "width: " + (this.sParentWidth - this.sFHeaderWidth) + "px;";} else {sDataStyles += "width: " + this.sParentWidth + "px;";}this.sData.style.cssText = sDataStyles;this.sDataTable.style.cssText = sDataTableStyles;(function (st) {if (st.fixedCols > 0) {st.sData.onscroll = function () {st.sHeaderInner.style.right = st.sData.scrollLeft + "px";st.sFDataInner.style.top = (st.sData.scrollTop * -1) + "px";};} else {st.sData.onscroll = function () {st.sHeaderInner.style.right = st.sData.scrollLeft + "px";};}if (/*@cc_on!@*/0) { /* Internet Explorer */window.attachEvent("onunload", function () {st.sData.onscroll = null;st = null;});}})(this);this.callbackFunc && this.callbackFunc();};