﻿$(document).ready(function(){var a=$("#subNav ul  > li ");if(a.length<1){$("#subNav").css({display:"none"})}});var IEPNGFix=window.IEPNGFix||{};IEPNGFix.tileBG=function(j,r,v){var i=this.data[j.uniqueID],l=Math.max(j.clientWidth,j.scrollWidth),k=Math.max(j.clientHeight,j.scrollHeight),b=j.currentStyle.backgroundPositionX,c=j.currentStyle.backgroundPositionY,a=j.currentStyle.backgroundRepeat;if(!i.tiles){i.tiles={elm:j,src:"",cache:[],img:new Image(),old:{}}}var B=i.tiles,t=B.img.width,q=B.img.height;if(r){if(!v&&r!=B.src){B.img.onload=function(){this.onload=null;IEPNGFix.tileBG(j,r,1)};return B.img.src=r}}else{if(B.src){v=1}t=q=0}B.src=r;if(!v&&l==B.old.w&&k==B.old.h&&b==B.old.x&&c==B.old.y&&a==B.old.r){return}var u={top:"0%",left:"0%",center:"50%",bottom:"100%",right:"100%"},C,E,p;C=u[b]||b;E=u[c]||c;if(p=C.match(/(\d+)%/)){C=Math.round((l-t)*(parseInt(p[1])/100))}if(p=E.match(/(\d+)%/)){E=Math.round((k-q)*(parseInt(p[1])/100))}C=parseInt(C);E=parseInt(E);var w={repeat:1,"repeat-x":1}[a],z={repeat:1,"repeat-y":1}[a];if(w){C%=t;if(C>0){C-=t}}if(z){E%=q;if(E>0){E-=q}}this.hook.enabled=0;if(!({relative:1,absolute:1}[j.currentStyle.position])){j.style.position="relative"}var g=0,D,n=w?l:C+0.1,F,o=z?k:E+0.1,h,A,m;if(t&&q){for(D=C;D<n;D+=t){for(F=E;F<o;F+=q){m=0;if(!B.cache[g]){B.cache[g]=document.createElement("div");m=1}var f=(D+t>l?l-D:t),e=(F+q>k?k-F:q);h=B.cache[g];A=h.style;A.behavior="none";A.left=D+"px";A.top=F+"px";A.width=f+"px";A.height=e+"px";A.clip="rect("+(F<0?0-F:0)+"px,"+f+"px,"+e+"px,"+(D<0?0-D:0)+"px)";A.display="block";if(m){A.position="absolute";A.zIndex=-999;if(j.firstChild){j.insertBefore(h,j.firstChild)}else{j.appendChild(h)}}this.fix(h,r,0);g++}}}while(g<B.cache.length){this.fix(B.cache[g],"",0);B.cache[g++].style.display="none"}this.hook.enabled=1;B.old={w:l,h:k,x:b,y:c,r:a}};IEPNGFix.update=function(){for(var a in IEPNGFix.data){var b=IEPNGFix.data[a].tiles;if(b&&b.elm&&b.src){IEPNGFix.tileBG(b.elm,b.src)}}};IEPNGFix.update.timer=0;if(window.attachEvent&&!window.opera){window.attachEvent("onresize",function(){clearTimeout(IEPNGFix.update.timer);IEPNGFix.update.timer=setTimeout(IEPNGFix.update,100)})}var MONTH_NAMES=new Array("January","February","March","April","May","June","July","August","September","October","November","December","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");var DAY_NAMES=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sun","Mon","Tue","Wed","Thu","Fri","Sat");function LZ(b){return(b<0||b>9?"":"0")+b}function isDate(f,e){var d=getDateFromFormat(f,e);if(d==0){return false}return true}function compareDates(i,k,j,l){var e=getDateFromFormat(i,k);var h=getDateFromFormat(j,l);if(e==0||h==0){return -1}else{if(e>h){return 1}}return 0}function formatDate(E,R){R=R+"";var m="";var Z=0;var e="";var M="";var S=E.getYear()+"";var af=E.getMonth()+1;var s=E.getDate();var P=E.getDay();var V=E.getHours();var ae=E.getMinutes();var y=E.getSeconds();var W,U,k,h,K,X,T,d,H,c,Y,V,ad,ab,ac,aa;var Q=new Object();if(S.length<4){S=""+(S-0+1900)}Q.y=""+S;Q.yyyy=S;Q.yy=S.substring(2,4);Q.M=af;Q.MM=LZ(af);Q.MMM=MONTH_NAMES[af-1];Q.NNN=MONTH_NAMES[af+11];Q.d=s;Q.dd=LZ(s);Q.E=DAY_NAMES[P+7];Q.EE=DAY_NAMES[P];Q.H=V;Q.HH=LZ(V);if(V==0){Q.h=12}else{if(V>12){Q.h=V-12}else{Q.h=V}}Q.hh=LZ(Q.h);if(V>11){Q.K=V-12}else{Q.K=V}Q.k=V+1;Q.KK=LZ(Q.K);Q.kk=LZ(Q.k);if(V>11){Q.a="PM"}else{Q.a="AM"}Q.m=ae;Q.mm=LZ(ae);Q.s=y;Q.ss=LZ(y);while(Z<R.length){e=R.charAt(Z);M="";while((R.charAt(Z)==e)&&(Z<R.length)){M+=R.charAt(Z++)}if(Q[M]!=null){m=m+Q[M]}else{m=m+M}}return m}function _isInteger(f){var d="1234567890";for(var e=0;e<f.length;e++){if(d.indexOf(f.charAt(e))==-1){return false}}return true}function _getInt(j,e,i,h){for(var l=h;l>=i;l--){var k=j.substring(e,e+l);if(k.length<i){return null}if(_isInteger(k)){return k}}return null}function getDateFromFormat(M,y){M=M+"";y=y+"";var D=0;var C=0;var e="";var K="";var L="";var N,O;var I=new Date();var P=I.getYear();var F=I.getMonth()+1;var i=1;var A=I.getHours();var E=I.getMinutes();var J=I.getSeconds();var c="";while(C<y.length){e=y.charAt(C);K="";while((y.charAt(C)==e)&&(C<y.length)){K+=y.charAt(C++)}if(K=="yyyy"||K=="yy"||K=="y"){if(K=="yyyy"){N=4;O=4}if(K=="yy"){N=2;O=2}if(K=="y"){N=2;O=4}P=_getInt(M,D,N,O);if(P==null){return 0}D+=P.length;if(P.length==2){if(P>70){P=1900+(P-0)}else{P=2000+(P-0)}}}else{if(K=="MMM"||K=="NNN"){F=0;for(var B=0;B<MONTH_NAMES.length;B++){var G=MONTH_NAMES[B];if(M.substring(D,D+G.length).toLowerCase()==G.toLowerCase()){if(K=="MMM"||(K=="NNN"&&B>11)){F=B+1;if(F>12){F-=12}D+=G.length;break}}}if((F<1)||(F>12)){return 0}}else{if(K=="EE"||K=="E"){for(var B=0;B<DAY_NAMES.length;B++){var x=DAY_NAMES[B];if(M.substring(D,D+x.length).toLowerCase()==x.toLowerCase()){D+=x.length;break}}}else{if(K=="MM"||K=="M"){F=_getInt(M,D,K.length,2);if(F==null||(F<1)||(F>12)){return 0}D+=F.length}else{if(K=="dd"||K=="d"){i=_getInt(M,D,K.length,2);if(i==null||(i<1)||(i>31)){return 0}D+=i.length}else{if(K=="hh"||K=="h"){A=_getInt(M,D,K.length,2);if(A==null||(A<1)||(A>12)){return 0}D+=A.length}else{if(K=="HH"||K=="H"){A=_getInt(M,D,K.length,2);if(A==null||(A<0)||(A>23)){return 0}D+=A.length}else{if(K=="KK"||K=="K"){A=_getInt(M,D,K.length,2);if(A==null||(A<0)||(A>11)){return 0}D+=A.length}else{if(K=="kk"||K=="k"){A=_getInt(M,D,K.length,2);if(A==null||(A<1)||(A>24)){return 0}D+=A.length;A--}else{if(K=="mm"||K=="m"){E=_getInt(M,D,K.length,2);if(E==null||(E<0)||(E>59)){return 0}D+=E.length}else{if(K=="ss"||K=="s"){J=_getInt(M,D,K.length,2);if(J==null||(J<0)||(J>59)){return 0}D+=J.length}else{if(K=="a"){if(M.substring(D,D+2).toLowerCase()=="am"){c="AM"}else{if(M.substring(D,D+2).toLowerCase()=="pm"){c="PM"}else{return 0}}D+=2}else{if(M.substring(D,D+K.length)!=K){return 0}else{D+=K.length}}}}}}}}}}}}}}if(D!=M.length){return 0}if(F==2){if(((P%4==0)&&(P%100!=0))||(P%400==0)){if(i>29){return 0}}else{if(i>28){return 0}}}if((F==4)||(F==6)||(F==9)||(F==11)){if(i>30){return 0}}if(A<12&&c=="PM"){A=A-0+12}else{if(A>11&&c=="AM"){A-=12}}var H=new Date(P,F-1,i,A,E,J);return H.getTime()}function parseDate(n){var m=(arguments.length==2)?arguments[1]:false;generalFormats=new Array("y-M-d","MMM d, y","MMM d,y","y-MMM-d","d-MMM-y","MMM d");monthFirst=new Array("M/d/y","M-d-y","M.d.y","MMM-d","M/d","M-d");dateFirst=new Array("d/M/y","d-M-y","d.M.y","d-MMM","d/M","d-M");var d=new Array("generalFormats",m?"dateFirst":"monthFirst",m?"monthFirst":"dateFirst");var e=null;for(var i=0;i<d.length;i++){var l=window[d[i]];for(var j=0;j<l.length;j++){e=getDateFromFormat(n,l[j]);if(e!=0){return new Date(e)}}}return null}function getAnchorPosition(e){var t=false;var i=new Object();var u=0,v=0;var r=false,q=false,s=false;if(document.getElementById){r=true}else{if(document.all){q=true}else{if(document.layers){s=true}}}if(r&&document.all){u=AnchorPosition_getPageOffsetLeft(document.all[e]);v=AnchorPosition_getPageOffsetTop(document.all[e])}else{if(r){var p=document.getElementById(e);u=AnchorPosition_getPageOffsetLeft(p);v=AnchorPosition_getPageOffsetTop(p)}else{if(q){u=AnchorPosition_getPageOffsetLeft(document.all[e]);v=AnchorPosition_getPageOffsetTop(document.all[e])}else{if(s){var n=0;for(var o=0;o<document.anchors.length;o++){if(document.anchors[o].name==e){n=1;break}}if(n==0){i.x=0;i.y=0;return i}u=document.anchors[o].x;v=document.anchors[o].y}else{i.x=0;i.y=0;return i}}}}i.x=u;i.y=v;return i}function getAnchorWindowPosition(e){var f=getAnchorPosition(e);var g=0;var h=0;if(document.getElementById){if(isNaN(window.screenX)){g=f.x-document.body.scrollLeft+window.screenLeft;h=f.y-document.body.scrollTop+window.screenTop}else{g=f.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;h=f.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset}}else{if(document.all){g=f.x-document.body.scrollLeft+window.screenLeft;h=f.y-document.body.scrollTop+window.screenTop}else{if(document.layers){g=f.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;h=f.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset}}}f.x=g;f.y=h;return f}function AnchorPosition_getPageOffsetLeft(c){var d=c.offsetLeft;while((c=c.offsetParent)!=null){d+=c.offsetLeft}return d}function AnchorPosition_getWindowOffsetLeft(b){return AnchorPosition_getPageOffsetLeft(b)-document.body.scrollLeft}function AnchorPosition_getPageOffsetTop(c){var d=c.offsetTop;while((c=c.offsetParent)!=null){d+=c.offsetTop}return d}function AnchorPosition_getWindowOffsetTop(b){return AnchorPosition_getPageOffsetTop(b)-document.body.scrollTop}function PopupWindow_getXYPosition(c){var d;if(this.type=="WINDOW"){d=getAnchorWindowPosition(c)}else{d=getAnchorPosition(c)}this.x=d.x;this.y=d.y}function PopupWindow_setSize(d,c){this.width=d;this.height=c}function PopupWindow_populate(b){this.contents=b;this.populated=false}function PopupWindow_setUrl(b){this.url=b}function PopupWindow_setWindowProperties(b){this.windowProperties=b}function PopupWindow_refresh(){if(this.divName!=null){if(this.use_gebi){document.getElementById(this.divName).innerHTML=this.contents}else{if(this.use_css){document.all[this.divName].innerHTML=this.contents}else{if(this.use_layers){var b=document.layers[this.divName];b.document.open();b.document.writeln(this.contents);b.document.close()}}}}else{if(this.popupWindow!=null&&!this.popupWindow.closed){if(this.url!=""){this.popupWindow.location.href=this.url}else{this.popupWindow.document.open();this.popupWindow.document.writeln(this.contents);this.popupWindow.document.close()}this.popupWindow.focus()}}}function PopupWindow_showPopup(b){this.getXYPosition(b);this.x+=this.offsetX;this.y+=this.offsetY;if(!this.populated&&(this.contents!="")){this.populated=true;this.refresh()}if(this.divName!=null){if(this.use_gebi){document.getElementById(this.divName).style.left=this.x;document.getElementById(this.divName).style.top=this.y;document.getElementById(this.divName).style.visibility="visible"}else{if(this.use_css){document.all[this.divName].style.left=this.x;document.all[this.divName].style.top=this.y;document.all[this.divName].style.visibility="visible"}else{if(this.use_layers){document.layers[this.divName].left=this.x;document.layers[this.divName].top=this.y;document.layers[this.divName].visibility="visible"}}}}else{if(this.popupWindow==null||this.popupWindow.closed){if(this.x<0){this.x=0}if(this.y<0){this.y=0}if(screen&&screen.availHeight){if((this.y+this.height)>screen.availHeight){this.y=screen.availHeight-this.height}}if(screen&&screen.availWidth){if((this.x+this.width)>screen.availWidth){this.x=screen.availWidth-this.width}}this.popupWindow=window.open("about:blank","window_"+b,this.windowProperties+",width="+this.width+",height="+this.height+",screenX="+this.x+",left="+this.x+",screenY="+this.y+",top="+this.y+"")}this.refresh()}}function PopupWindow_hidePopup(){if(this.divName!=null){if(this.use_gebi){document.getElementById(this.divName).style.visibility="hidden"}else{if(this.use_css){document.all[this.divName].style.visibility="hidden"}else{if(this.use_layers){document.layers[this.divName].visibility="hidden"}}}}else{if(this.popupWindow&&!this.popupWindow.closed){this.popupWindow.close();this.popupWindow=null}}}function PopupWindow_isClicked(g){if(this.divName!=null){if(this.use_layers){var e=g.pageX;var f=g.pageY;var h=document.layers[this.divName];if((e>h.left)&&(e<h.left+h.clip.width)&&(f>h.top)&&(f<h.top+h.clip.height)){return true}else{return false}}else{if(document.all){var h=window.event.srcElement;while(h.parentElement!=null){if(h.id==this.divName){return true}h=h.parentElement}return false}else{if(this.use_gebi){var h=g.originalTarget;while(h.parentNode!=null){if(h.id==this.divName){return true}h=h.parentNode}return false}}}return false}return false}function PopupWindow_hideIfNotClicked(b){if(this.autoHideEnabled&&!this.isClicked(b)){this.hidePopup()}}function PopupWindow_autoHide(){this.autoHideEnabled=true}function PopupWindow_hidePopupWindows(d){for(var e=0;e<popupWindowObjects.length;e++){if(popupWindowObjects[e]!=null){var f=popupWindowObjects[e];f.hideIfNotClicked(d)}}}function PopupWindow_attachListener(){if(document.layers){document.captureEvents(Event.MOUSEUP)}window.popupWindowOldEventListener=document.onmouseup;if(window.popupWindowOldEventListener!=null){document.onmouseup=new Function("window.popupWindowOldEventListener();PopupWindow_hidePopupWindows();")}else{document.onmouseup=PopupWindow_hidePopupWindows}}function PopupWindow(){if(!window.popupWindowIndex){window.popupWindowIndex=0}if(!window.popupWindowObjects){window.popupWindowObjects=new Array()}if(!window.listenerAttached){window.listenerAttached=true;PopupWindow_attachListener()}this.index=popupWindowIndex++;popupWindowObjects[this.index]=this;this.divName=null;this.popupWindow=null;this.width=0;this.height=0;this.populated=false;this.visible=false;this.autoHideEnabled=false;this.contents="";this.url="";this.windowProperties="toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable,alwaysRaised,dependent,titlebar=no";if(arguments.length>0){this.type="DIV";this.divName=arguments[0]}else{this.type="WINDOW"}this.use_gebi=false;this.use_css=false;this.use_layers=false;if(document.getElementById){this.use_gebi=true}else{if(document.all){this.use_css=true}else{if(document.layers){this.use_layers=true}else{this.type="WINDOW"}}}this.offsetX=0;this.offsetY=0;this.getXYPosition=PopupWindow_getXYPosition;this.populate=PopupWindow_populate;this.setUrl=PopupWindow_setUrl;this.setWindowProperties=PopupWindow_setWindowProperties;this.refresh=PopupWindow_refresh;this.showPopup=PopupWindow_showPopup;this.hidePopup=PopupWindow_hidePopup;this.setSize=PopupWindow_setSize;this.isClicked=PopupWindow_isClicked;this.autoHide=PopupWindow_autoHide;this.hideIfNotClicked=PopupWindow_hideIfNotClicked}function CalendarPopup(){var b;if(arguments.length>0){b=new PopupWindow(arguments[0])}else{b=new PopupWindow();b.setSize(150,175)}b.offsetX=-152;b.offsetY=25;b.autoHide();b.monthNames=new Array("January","February","March","April","May","June","July","August","September","October","November","December");b.monthAbbreviations=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");b.dayHeaders=new Array("S","M","T","W","T","F","S");b.returnFunction="CalendarPopup_tmpReturnFunction";b.returnMonthFunction="CalendarPopup_tmpReturnMonthFunction";b.returnQuarterFunction="CalendarPopup_tmpReturnQuarterFunction";b.returnYearFunction="CalendarPopup_tmpReturnYearFunction";b.weekStartDay=0;b.isShowYearNavigation=false;b.displayType="date";b.disabledWeekDays=new Object();b.disabledDatesExpression="";b.yearSelectStartOffset=2;b.currentDate=null;b.todayText="Today";window.CalendarPopup_targetInput=null;window.CalendarPopup_dateFormat="mm/dd/yyyy";b.setReturnFunction=CalendarPopup_setReturnFunction;b.setReturnMonthFunction=CalendarPopup_setReturnMonthFunction;b.setReturnQuarterFunction=CalendarPopup_setReturnQuarterFunction;b.setReturnYearFunction=CalendarPopup_setReturnYearFunction;b.setMonthNames=CalendarPopup_setMonthNames;b.setMonthAbbreviations=CalendarPopup_setMonthAbbreviations;b.setDayHeaders=CalendarPopup_setDayHeaders;b.setWeekStartDay=CalendarPopup_setWeekStartDay;b.setDisplayType=CalendarPopup_setDisplayType;b.setDisabledWeekDays=CalendarPopup_setDisabledWeekDays;b.addDisabledDates=CalendarPopup_addDisabledDates;b.setYearSelectStartOffset=CalendarPopup_setYearSelectStartOffset;b.setTodayText=CalendarPopup_setTodayText;b.showYearNavigation=CalendarPopup_showYearNavigation;b.showCalendar=CalendarPopup_showCalendar;b.hideCalendar=CalendarPopup_hideCalendar;b.getStyles=CalendarPopup_getStyles;b.refreshCalendar=CalendarPopup_refreshCalendar;b.getCalendar=CalendarPopup_getCalendar;b.select=CalendarPopup_select;return b}function CalendarPopup_tmpReturnFunction(h,g,d){if(window.CalendarPopup_targetInput!=null){var e=new Date(h,g-1,d,0,0,0);window.CalendarPopup_targetInput.value=formatDate(e,window.CalendarPopup_dateFormat)}else{alert("Use setReturnFunction() to define which function will get the clicked results!")}}function CalendarPopup_tmpReturnMonthFunction(d,c){alert("Use setReturnMonthFunction() to define which function will get the clicked results!\nYou clicked: year="+d+" , month="+c)}function CalendarPopup_tmpReturnQuarterFunction(d,c){alert("Use setReturnQuarterFunction() to define which function will get the clicked results!\nYou clicked: year="+d+" , quarter="+c)}function CalendarPopup_tmpReturnYearFunction(b){alert("Use setReturnYearFunction() to define which function will get the clicked results!\nYou clicked: year="+b)}function CalendarPopup_setReturnFunction(b){this.returnFunction=b}function CalendarPopup_setReturnMonthFunction(b){this.returnMonthFunction=b}function CalendarPopup_setReturnQuarterFunction(b){this.returnQuarterFunction=b}function CalendarPopup_setReturnYearFunction(b){this.returnYearFunction=b}function CalendarPopup_setMonthNames(){for(var b=0;b<arguments.length;b++){this.monthNames[b]=arguments[b]}}function CalendarPopup_setMonthAbbreviations(){for(var b=0;b<arguments.length;b++){this.monthAbbreviations[b]=arguments[b]}}function CalendarPopup_setDayHeaders(){for(var b=0;b<arguments.length;b++){this.dayHeaders[b]=arguments[b]}}function CalendarPopup_setWeekStartDay(b){this.weekStartDay=b}function CalendarPopup_showYearNavigation(){this.isShowYearNavigation=true}function CalendarPopup_setDisplayType(b){if(b!="date"&&b!="week-end"&&b!="month"&&b!="quarter"&&b!="year"){alert("Invalid display type! Must be one of: date,week-end,month,quarter,year");return false}this.displayType=b}function CalendarPopup_setYearSelectStartOffset(b){this.yearSelectStartOffset=b}function CalendarPopup_setDisabledWeekDays(){this.disabledWeekDays=new Object();for(var b=0;b<arguments.length;b++){this.disabledWeekDays[arguments[b]]=true}}function CalendarPopup_addDisabledDates(d,c){if(arguments.length==1){c=d}if(d==null&&c==null){return}if(this.disabledDatesExpression!=""){this.disabledDatesExpression+="||"}if(d!=null){d=parseDate(d);d=""+d.getFullYear()+LZ(d.getMonth()+1)+LZ(d.getDate())}if(c!=null){c=parseDate(c);c=""+c.getFullYear()+LZ(c.getMonth()+1)+LZ(c.getDate())}if(d==null){this.disabledDatesExpression+="(ds<="+c+")"}else{if(c==null){this.disabledDatesExpression+="(ds>="+d+")"}else{this.disabledDatesExpression+="(ds>="+d+"&&ds<="+c+")"}}}function CalendarPopup_setTodayText(b){this.todayText=b}function CalendarPopup_hideCalendar(){if(arguments.length>0){window.popupWindowObjects[arguments[0]].hidePopup()}else{this.hidePopup()}}function CalendarPopup_refreshCalendar(d){var c=window.popupWindowObjects[d];if(arguments.length>1){c.populate(c.getCalendar(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]))}else{c.populate(c.getCalendar())}c.refresh()}function CalendarPopup_showCalendar(b){if(arguments.length>1){if(arguments[1]==null||arguments[1]==""){this.currentDate=new Date()}else{this.currentDate=new Date(parseDate(arguments[1]))}}this.populate(this.getCalendar());this.showPopup(b)}function CalendarPopup_select(g,h,e){var i=(arguments.length>3)?arguments[3]:null;if(!window.getDateFromFormat){alert("calendar.select: To use this method you must also include 'date.js' for date formatting");return}if(this.displayType!="date"&&this.displayType!="week-end"){alert("calendar.select: This function can only be used with displayType 'date' or 'week-end'");return}if(g.type!="text"&&g.type!="hidden"&&g.type!="textarea"){alert("calendar.select: Input object passed is not a valid form input object");window.CalendarPopup_targetInput=null;return}window.CalendarPopup_targetInput=g;this.currentDate=null;var j=0;if(i!=null){j=getDateFromFormat(i,e)}else{if(g.value!=""){j=getDateFromFormat(g.value,e)}}if(i!=null||g.value!=""){if(j==0){this.currentDate=null}else{this.currentDate=new Date(j)}}window.CalendarPopup_dateFormat=e;this.showCalendar(h)}function CalendarPopup_getStyles(){var b="";b+="<STYLE>\n";b+="TD.cal,TD.calday,TD.calmonth,TD.caltoday,A.textlink,.disabledtextlink{font-family:arial;font-size: 8pt;}\n";b+="TD.calday{border:solid thin #C0C0C0;border-width:0 0 1 0;}\n";b+="TD.calmonth{text-align:right;}\n";b+="TD.caltoday{text-align:right;color:white;background-color:#C0C0C0;border-width:1;border:solid thing #800000;}\n";b+="TD.textlink{border:solid thin #C0C0C0;border-width:1 0 0 0;}\n";b+="A.textlink{height:20px;color:black;}\n";b+=".disabledtextlink{height:20px;color:#808080;}\n";b+="A.cal{text-decoration:none;color:#000000;}\n";b+="A.calthismonth{text-decoration:none;color:#000000;}\n";b+="A.calothermonth{text-decoration:none;color:#808080;}\n";b+=".calnotclickable{color:#808080;}\n";b+=".disabled{color:#D0D0D0;text-decoration:line-through;}\n";b+="</STYLE>\n";return b}function CalendarPopup_getCalendar(){var now=new Date();if(this.type=="WINDOW"){var windowref="window.opener."}else{var windowref=""}var result="";if(this.type=="WINDOW"){result+="<HTML><HEAD><TITLE>Calendar</TITLE>"+this.getStyles()+"</HEAD><BODY MARGINWIDTH=0 MARGINHEIGHT=0 TOPMARGIN=0 RIGHTMARGIN=0 LEFTMARGIN=0>\n";result+="<CENTER><TABLE WIDTH=100% BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>\n"}else{result+='<TABLE WIDTH=144 BORDER=1 BORDERWIDTH=1 BORDERCOLOR="#808080" CELLSPACING=0 CELLPADDING=1>\n';result+="<TR><TD ALIGN=CENTER>\n";result+="<CENTER>\n"}var t144="<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";if(this.displayType=="date"||this.displayType=="week-end"){if(this.currentDate==null){this.currentDate=now}if(arguments.length>0){var month=arguments[0]}else{var month=this.currentDate.getMonth()+1}if(arguments.length>1){var year=arguments[1]}else{var year=this.currentDate.getFullYear()}var daysinmonth=new Array(0,31,28,31,30,31,30,31,31,30,31,30,31);if(((year%4==0)&&(year%100!=0))||(year%400==0)){daysinmonth[2]=29}var current_month=new Date(year,month-1,1);var display_year=year;var display_month=month;var display_date=1;var weekday=current_month.getDay();var offset=0;if(weekday>=this.weekStartDay){offset=weekday-this.weekStartDay}else{offset=7-this.weekStartDay+weekday}if(offset>0){display_month--;if(display_month<1){display_month=12;display_year--}display_date=daysinmonth[display_month]-offset+1}var next_month=month+1;var next_month_year=year;if(next_month>12){next_month=1;next_month_year++}var last_month=month-1;var last_month_year=year;if(last_month<1){last_month=12;last_month_year--}var date_class;if(this.type!="WINDOW"){result+=t144}result+='<TR BGCOLOR="#C0C0C0">\n';var refresh="javascript:"+windowref+"CalendarPopup_refreshCalendar";var td='<TD BGCOLOR="#C0C0C0" CLASS="cal" ALIGN=CENTER VALIGN=MIDDLE WIDTH=';if(this.isShowYearNavigation){result+=td+'10><B><A CLASS="cal" HREF="'+refresh+"("+this.index+","+last_month+","+last_month_year+');">&lt;</A></B></TD>';result+=td+"58>"+this.monthNames[month-1]+"</TD>";result+=td+'10><B><A CLASS="cal" HREF="'+refresh+"("+this.index+","+next_month+","+next_month_year+');">&gt;</A></B></TD>';result+=td+"10>&nbsp;</TD>";result+=td+'10><B><A CLASS="cal" HREF="'+refresh+"("+this.index+","+month+","+(year-1)+');">&lt;</A></B></TD>';result+=td+"36>"+year+"</TD>";result+=td+'10><B><A CLASS="cal" HREF="'+refresh+"("+this.index+","+month+","+(year+1)+');">&gt;</A></B></TD>'}else{result+=td+'22><B><A CLASS="cal" HREF="'+refresh+"("+this.index+","+last_month+","+last_month_year+');">&lt;&lt;</A></B></TD>\n';result+=td+"100>"+this.monthNames[month-1]+" "+year+"</TD>\n";result+=td+'22><B><A CLASS="cal" HREF="'+refresh+"("+this.index+","+next_month+","+next_month_year+');">&gt;&gt;</A></B></TD>\n'}result+="</TR></TABLE>\n";result+="<TABLE WIDTH=120 BORDER=0 CELLSPACING=0 CELLPADDING=1 ALIGN=CENTER>\n";result+="<TR>\n";var td='     <TD CLASS="calday" ALIGN=RIGHT WIDTH=14%>';for(var j=0;j<7;j++){result+=td+this.dayHeaders[(this.weekStartDay+j)%7]+"</TD>\n"}result+="</TR>\n";for(var row=1;row<=6;row++){result+="<TR>\n";for(var col=1;col<=7;col++){if(display_month==month){date_class="calthismonth"}else{date_class="calothermonth"}if((display_month==this.currentDate.getMonth()+1)&&(display_date==this.currentDate.getDate())&&(display_year==this.currentDate.getFullYear())){td_class="caltoday"}else{td_class="calmonth"}var disabled=false;if(this.disabledDatesExpression!=""){var ds=""+display_year+LZ(display_month)+LZ(display_date);eval("disabled=("+this.disabledDatesExpression+")")}if(disabled||this.disabledWeekDays[col-1]){date_class=(disabled)?"disabled":"calnotclickable";result+='  <TD CLASS="'+td_class+'"><SPAN CLASS="'+date_class+'">'+display_date+"</SPAN></TD>\n"}else{var selected_date=display_date;var selected_month=display_month;var selected_year=display_year;if(this.displayType=="week-end"){var d=new Date(selected_year,selected_month-1,selected_date,0,0,0,0);d.setDate(d.getDate()+(7-col));selected_year=d.getYear();if(selected_year<1000){selected_year+=1900}selected_month=d.getMonth()+1;selected_date=d.getDate()}result+='   <TD CLASS="'+td_class+'"><A HREF="javascript:'+windowref+this.returnFunction+"("+selected_year+","+selected_month+","+selected_date+");"+windowref+"CalendarPopup_hideCalendar('"+this.index+'\');" CLASS="'+date_class+'">'+display_date+"</A></TD>\n"}display_date++;if(display_date>daysinmonth[display_month]){display_date=1;display_month++}if(display_month>12){display_month=1;display_year++}}result+="</TR>"}var current_weekday=now.getDay()-this.weekStartDay;if(current_weekday<0){current_weekday+=7}result+="<TR>\n";result+=' <TD COLSPAN=7 ALIGN=CENTER CLASS="textlink">\n';if(this.disabledWeekDays[current_weekday+1]){result+='      <SPAN CLASS="disabledtextlink">'+this.todayText+"</SPAN>\n"}else{result+='        <A CLASS="textlink" HREF="javascript:'+windowref+this.returnFunction+"('"+now.getFullYear()+"','"+(now.getMonth()+1)+"','"+now.getDate()+"');"+windowref+"CalendarPopup_hideCalendar('"+this.index+"');\">"+this.todayText+"</A>\n"}result+="        <BR>\n";result+=" </TD></TR></TABLE></CENTER></TD></TR></TABLE>\n"}if(this.displayType=="month"||this.displayType=="quarter"||this.displayType=="year"){if(arguments.length>0){var year=arguments[0]}else{if(this.displayType=="year"){var year=now.getFullYear()-this.yearSelectStartOffset}else{var year=now.getFullYear()}}if(this.displayType!="year"&&this.isShowYearNavigation){result+=t144;result+='<TR BGCOLOR="#C0C0C0">\n';result+='   <TD BGCOLOR="#C0C0C0" CLASS="cal" WIDTH=22 ALIGN=CENTER VALIGN=MIDDLE><B><A CLASS="cal" HREF="javascript:'+windowref+"CalendarPopup_refreshCalendar("+this.index+","+(year-1)+');">&lt;&lt;</A></B></TD>\n';result+='     <TD BGCOLOR="#C0C0C0" CLASS="cal" WIDTH=100 ALIGN=CENTER>'+year+"</TD>\n";result+='     <TD BGCOLOR="#C0C0C0" CLASS="cal" WIDTH=22 ALIGN=CENTER VALIGN=MIDDLE><B><A CLASS="cal" HREF="javascript:'+windowref+"CalendarPopup_refreshCalendar("+this.index+","+(year+1)+');">&gt;&gt;</A></B></TD>\n';result+="</TR></TABLE>\n"}}if(this.displayType=="month"){result+="<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n";for(var i=0;i<4;i++){result+="<TR>";for(var j=0;j<3;j++){var monthindex=((i*3)+j);result+='<TD WIDTH=33% ALIGN=CENTER><A CLASS="textlink" HREF="javascript:'+windowref+this.returnMonthFunction+"("+year+","+(monthindex+1)+");"+windowref+"CalendarPopup_hideCalendar('"+this.index+'\');" CLASS="'+date_class+'">'+this.monthAbbreviations[monthindex]+"</A></TD>"}result+="</TR>"}result+="</TABLE></CENTER></TD></TR></TABLE>\n"}if(this.displayType=="quarter"){result+="<BR><TABLE WIDTH=120 BORDER=1 CELLSPACING=0 CELLPADDING=0 ALIGN=CENTER>\n";for(var i=0;i<2;i++){result+="<TR>";for(var j=0;j<2;j++){var quarter=((i*2)+j+1);result+='<TD WIDTH=50% ALIGN=CENTER><BR><A CLASS="textlink" HREF="javascript:'+windowref+this.returnQuarterFunction+"("+year+","+quarter+");"+windowref+"CalendarPopup_hideCalendar('"+this.index+'\');" CLASS="'+date_class+'">Q'+quarter+"</A><BR><BR></TD>"}result+="</TR>"}result+="</TABLE></CENTER></TD></TR></TABLE>\n"}if(this.displayType=="year"){var yearColumnSize=4;result+=t144;result+='<TR BGCOLOR="#C0C0C0">\n';result+='    <TD BGCOLOR="#C0C0C0" CLASS="cal" WIDTH=50% ALIGN=CENTER VALIGN=MIDDLE><B><A CLASS="cal" HREF="javascript:'+windowref+"CalendarPopup_refreshCalendar("+this.index+","+(year-(yearColumnSize*2))+');">&lt;&lt;</A></B></TD>\n';result+='  <TD BGCOLOR="#C0C0C0" CLASS="cal" WIDTH=50% ALIGN=CENTER VALIGN=MIDDLE><B><A CLASS="cal" HREF="javascript:'+windowref+"CalendarPopup_refreshCalendar("+this.index+","+(year+(yearColumnSize*2))+');">&gt;&gt;</A></B></TD>\n';result+="</TR></TABLE>\n";result+="<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n";for(var i=0;i<yearColumnSize;i++){for(var j=0;j<2;j++){var currentyear=year+(j*yearColumnSize)+i;result+='<TD WIDTH=50% ALIGN=CENTER><A CLASS="textlink" HREF="javascript:'+windowref+this.returnYearFunction+"("+currentyear+");"+windowref+"CalendarPopup_hideCalendar('"+this.index+'\');" CLASS="'+date_class+'">'+currentyear+"</A></TD>"}result+="</TR>"}result+="</TABLE></CENTER></TD></TR></TABLE>\n"}if(this.type=="WINDOW"){result+="</BODY></HTML>\n"}return result}document.write(CalendarPopup_getStyles());var cal=new CalendarPopup();var cal2=new CalendarPopup();cal.showYearNavigation();cal.setTodayText("");cal2.showYearNavigation();cal2.setTodayText("");cal.setReturnFunction("setD");cal2.setReturnFunction("setD2");function setD2(h,g,d){document.ibeform.departureYear.value=h;document.ibeform.departureMonth.selectedIndex=--g;for(var e=0;e<document.ibeform.departureDay.options.length;e++){if(document.ibeform.departureDay.options[e].value==d){document.ibeform.departureDay.selectedIndex=e}}}function setD(h,g,d){document.ibeform.arrivalYear.value=h;document.ibeform.arrivalMonth.selectedIndex=--g;for(var e=0;e<document.ibeform.arrivalDay.options.length;e++){if(document.ibeform.arrivalDay.options[e].value==d){document.ibeform.arrivalDay.selectedIndex=e}}}function getDateString(l,j,e){var k=l.options[l.selectedIndex].value;var i=j.options[j.selectedIndex].value;var d=e.options[e.selectedIndex].value;if(k==""||i==""){return null}if(d==""){d=1}return str=k+"-"+i+"-"+d}var advancedDay=0;var advancedDay2=1;function isLeapYear(f){var d=false;var e=parseInt(f,10);if(e%4==0){d=true}return d}function getDaysInMonth(e,f){var d=31;if(e==1){if(isLeapYear(f)){d=29}else{d=28}}if(e==3||e==5||e==8||e==10){d=30}return d}function init(){var p=new Date();var s=p.getFullYear();var t=p.getFullYear();var e=p.getFullYear();var l=p.getFullYear();var q=p.getMonth();var r=p.getMonth();var m=p.getDate();var n=p.getDate();var o=getDaysInMonth(q,s);if(m+advancedDay>o){m=((m+advancedDay)%o);if(q==11){q=0;s++}else{q++}}else{m=m+advancedDay}m--;s-=e;if(n+advancedDay2>o){n=((n+advancedDay2)%o);if(r==11){r=0;t++}else{r++}}else{n=n+advancedDay2}n--;t-=l;document.ibeform.arrivalMonth.selectedIndex=q;document.ibeform.arrivalDay.selectedIndex=m;document.ibeform.arrivalYear.selectedIndex=s;document.ibeform.departureMonth.selectedIndex=r;document.ibeform.departureDay.selectedIndex=n;document.ibeform.departureYear.selectedIndex=t;return}var wmonths=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function do_opt(e,g,f){if(!g&&g!=0){g=1}if(e=="mo"){for(var h=0;h<wmonths.length;h++){document.write("<option value="+(h+1)+">"+(wmonths[h]))}}else{for(var h=g;h<=e;h++){sel=(f==h)?" selected ":"";document.write("<option value="+(h)+sel+">"+(h))}}}function do_year(){var f=new Date();var d=f.getFullYear();for(var e=0;e<3;e++){document.write("<option value="+(d+e)+">"+(d+e)+"</option>")}};
