function positionInfo(D){var B=D;
this.getElementLeft=H;
function H(){var I=0,J;
if(typeof (B)=="object"){J=B
}else{J=document.getElementById(B)
}while(J!=null){I+=J.offsetLeft;
J=J.offsetParent
}return parseInt(I)
}this.getElementWidth=G;
function G(){var I;
if(typeof (B)=="object"){I=B
}else{I=document.getElementById(B)
}return parseInt(I.offsetWidth)
}this.getElementRight=E;
function E(){return H(B)+G(B)
}this.getElementTop=F;
function F(){var J=0,I;
if(typeof (B)=="object"){I=B
}else{I=document.getElementById(B)
}while(I!=null){J+=I.offsetTop;
I=I.offsetParent
}return parseInt(J)
}this.getElementHeight=A;
function A(){var I;
if(typeof (B)=="object"){I=B
}else{I=document.getElementById(B)
}return parseInt(I.offsetHeight)
}this.getElementBottom=C;
function C(){return F(B)+A(B)
}}function CalendarControl(){var Y="CalendarControl",Z=0,R=0,K=0,O=0,T=0,I=0,J=["January","February","March","April","May","June","July","August","September","October","November","December"],F=null;
function B(b,e,c){var a=c,d=null;
if(typeof (a)=="object"){d=a
}else{d=document.getElementById(a)
}if((d!=null)&&(d.style!=null)){d=d.style;
d[b]=e
}}function M(a,b){B(a,b,Y)
}function E(a,b){return[31,((!(a%4)&&((a%100)||!(a%400)))?29:28),31,30,31,30,31,31,30,31,30,31][b-1]
}function V(c,d,a){var b=new Date(c,d-1,a);
return b.getDay()
}this.clearDate=U;
function U(){document.getElementById("travelDate").value="";
L()
}this.setDate=D;
function D(b,c,a){if(c<10){c="0"+c
}if(a<10){a="0"+a
}document.getElementById("travelDate").value=c+"/"+a+"/"+S(b);
L();
return 
}function S(b){var a=""+b;
if(a.length>2){a=a.substr(a.length-2)
}return a
}this.changeMonth=A;
function A(a){showCalendarControl(document.getElementById("travelDate"));
R+=a;
K=0;
if(R>12){R=1;
Z++
}else{if(R<1){R=12;
Z--
}}calendar=document.getElementById(Y);
calendar.innerHTML=H()
}this.changeYear=X;
function X(a){Z+=a;
K=0;
calendar=document.getElementById(Y);
calendar.innerHTML=H()
}function Q(){var a=new Date().getYear();
if(a<1900){a+=1900
}return"20"+document.getElementById("travelDate").value.substring(6,8)
}function N(){newDate=document.getElementById("travelDate").value.substring(0,2)*1;
return newDate
}function P(){return(document.getElementById("travelDate").value.substring(3,5)*1)
}function H(){var e=1,a=0,d=V(Z,R,e),b=E(Z,R),c="<div class='CalendarControl'>";
c+="<table width='140' border='0' cellpadding='0' cellspacing='0'>";
c+="<tr align='center' class='header'>";
c+="<td><a class='header' href='javascript:changeCalendarControlMonth(-1);'><img src='images/nav/cal_arrow_left.gif' border='0px' width='11px' height='11px'></a></td>";
c+="<td colspan='5'>"+J[R-1]+" "+Z+" </td>";
c+="<td><a class='header' href='javascript:changeCalendarControlMonth(1);'><img src='images/nav/cal_arrow_right.gif' border='0px' width='11px' height='11px'></a></td>";
c+="</tr><tr><td>S</td><td>M</td><td>T</td><td>W</td><td>T</td><td>F</td><td>S</td></tr>";
for(week=0;
week<6;
week++){c=c+"<tr>";
for(dayOfWeek=0;
dayOfWeek<7;
dayOfWeek++){if(week==0&&d==dayOfWeek){a=1
}else{if(a==1&&e>b){a=0
}}if(a){if(e==I&&Z==O&&R==T){c=c+"<td width='20px' style='background-color:#ec8b40;'><a href='javascript:setCalendarControlDate("+Z+","+R+","+e+")'>"+e+"</a></td>"
}else{if(dayOfWeek==0||dayOfWeek==6){c=c+"<td width='20px' style='background-color:#ededed;'><a href='javascript:setCalendarControlDate("+Z+","+R+","+e+")'>"+e+"</a></td>"
}else{c=c+"<td width='20px'><a href='javascript:setCalendarControlDate("+Z+","+R+","+e+")'>"+e+"</a></td>"
}}e++
}else{c=c+"<td width='20px'> </td>"
}}c=c+"</tr>"
}c=c+"<tr><td align='center' colspan='7' class='header'><a class='close' href='javascript:hideCalendarControl();'>Close</a></td></tr></table>";
c=c+"</div>";
return c
}this.show=W;
function W(f){G=0;
if(F==f){return 
}else{F=f
}if(F){var c=new String(F.value);
if(!isValidDateString(c)){c=getNowDateString()
}var b=c.split("/");
if(b.length==3){T=parseInt(b[0],10);
I=parseInt(b[1],10);
O=(b[2].length<4)?"20"+parseInt(b[2],10):parseInt(b[2],10)
}}if(!(O&&T&&I)){T=N();
I=P();
O=Q()
}R=T;
K=I;
Z=O;
if(document.getElementById){calendar=document.getElementById(Y);
calendar.innerHTML=H(Z,R);
M("display","block");
var d=new positionInfo(F),e=new positionInfo(Y),a=d.getElementLeft(),g=d.getElementBottom();
M("left",a+"px");
M("top",g+"px");
if(document.all){B("display","block","CalendarControlIFrame");
B("left",a+"px","CalendarControlIFrame");
B("top",g+"px","CalendarControlIFrame");
B("width",e.getElementWidth()+"px","CalendarControlIFrame");
B("height",e.getElementHeight()+"px","CalendarControlIFrame")
}}}this.hide=L;
function L(){if(F){M("display","none");
B("display","none","CalendarControlIFrame");
F=null
}}this.visible=C;
function C(){return F
}this.can_hide=G;
var G=0
}function isValidDateString(A){if(A.length!=8||A.substr(2,1)!="/"||A.substr(5,1)!="/"){return false
}var D=A.substr(0,2),C=A.substr(3,2),B=A.substr(6,2);
if(isNaN(new Number(D))||isNaN(new Number(C))||isNaN(new Number(B))){return false
}return true
}function getNowDateString(){var A=""+(new Date().getMonth()+1);
if(A.length==1){A="0"+A
}var B=""+new Date().getDate();
if(B.length==1){B="0"+B
}var C=(""+new Date().getFullYear()).substr(2,2);
return A+"/"+B+"/"+C
}var calendarControl=new CalendarControl();
function showCalendarControl(A){document.getElementById("calendarOpen").value=true;
document.getElementById("calendarClick").value=true;
calendarControl.show(A)
}function clearCalendarControl(){calendarControl.clearDate()
}function hideCalendarControl(){if(calendarControl.visible()){calendarControl.hide()
}}function setCalendarControlDate(B,C,A){calendarControl.setDate(B,C,A)
}function changeCalendarControlYear(A){calendarControl.changeYear(A)
}function changeCalendarControlMonth(A){calendarControl.changeMonth(A)
}document.write("<iframe id='CalendarControlIFrame' name='CalendarControlIFrame' title='Calendar' src='javascript:false;' frameBorder='0' scrolling='no'> Your browser does not support inline frames or is currently configured not to display inline frames.</iframe>");
document.write("<div id='CalendarControl'></div>");