Calendar._DN = new Array
("Sunday",
 "Monday",
 "Tuesday",
 "Wednesday",
 "Thursday",
 "Friday",
 "Saturday",
 "Sunday");
Calendar._MN = new Array
("January",
 "February",
 "March",
 "April",
 "May",
 "June",
 "July",
 "August",
 "September",
 "October",
 "November",
 "December");

Calendar._TT = {};
Calendar._TT["TOGGLE"] = "Toggle first day of week";
Calendar._TT["PREV_YEAR"] = "Prev. year (hold for menu)";
Calendar._TT["PREV_MONTH"] = "Prev. month (hold for menu)";
Calendar._TT["GO_TODAY"] = "Go Today";
Calendar._TT["NEXT_MONTH"] = "Next month (hold for menu)";
Calendar._TT["NEXT_YEAR"] = "Next year (hold for menu)";
Calendar._TT["SEL_DATE"] = "Select date";
Calendar._TT["DRAG_TO_MOVE"] = "Drag to move";
Calendar._TT["PART_TODAY"] = " (today)";
Calendar._TT["MON_FIRST"] = "Display Monday first";
Calendar._TT["SUN_FIRST"] = "Display Sunday first";
Calendar._TT["CLOSE"] = "Close";
Calendar._TT["TODAY"] = "Today";

Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd";
Calendar._TT["TT_DATE_FORMAT"] = "D, M d";

Calendar._TT["WK"] = "wk";



			function selected(cal, date) {
				cal.sel.value = date; 
			}

			function closeHandler(cal) {
				cal.hide();
			}

			function showCalendar(format,eid,id,isAge) {
			//alert(id);
			//var eee="<%=" & id & ".ClientID%>";
			//alert(eee);
				//var el = document.getElementById(eee);
				var el=eid;
			//	alert(el);
				if (calendar != null) {
				    calendar.id=id;
					calendar.hide();
					calendar.isShw = isAge;
	
					
				} else {
					var cal = new Calendar(false, null, selected, closeHandler,id);
					calendar = cal;
					cal.setRange(1900, 2070);
					cal.create();
					cal.isShw = isAge;
					cal.id=id;
				}
				calendar.setDateFormat(format);
				calendar.parseDate(el.value);
				calendar.sel = el;
				calendar.showAtElement(el);
				calendar=null;
				return false;
			}

			var MINUTE = 60 * 1000;
			var HOUR = 60 * MINUTE;
			var DAY = 24 * HOUR;
			var WEEK = 7 * DAY;
			function isDisabled(date) {
				var today = new Date();
				return (Math.abs(date.getTime() - today.getTime()) / DAY) > 10;
			}


