// written by Tan Ling Wee on 2 Dec 2001 // last updated 23 June 2002 // email : fuushikaden@yahoo.com // http://www.geocities.com/fuushikaden/PopupCalendar/index.htm // updated by moshe: // 1. add the yy format where: // if(yearSelected < 50) yearSelected+=2000; // else if(yearSelected < 100) yearSelected+=1900; // 2. mode staff. // 3. support out of element use. // example: fixedX=100; // fixedY=100; // document.onkeypress = ""; // document.onclick = ""; // popUpCalendar("-", "-", "dd/mm/yyyy"); // // version = 0.31 on 31-7-2002 var fixedX = -1 // x position (-1 if to appear below control) var fixedY = -1 // y position (-1 if to appear below control) var startAt = 0 // 0 - sunday ; 1 - monday var startAtColor = "black"; var showWeekNumber = 0;//1 // 0 - don't show; 1 - show var showToday = 1 // 0 - don't show; 1 - show var showModes = 0; //show modes span. var imgDir = "images/calendar/" // directory for images ... e.g. var imgDir="/img/" var gotoString = "Go To Current Month" var todayString = "" var weekString = "Wk" var scrollLeftMessage = "Click to scroll to previous month. Hold mouse button to scroll automatically." var scrollRightMessage = "Click to scroll to next month. Hold mouse button to scroll automatically." var selectMonthMessage = "אנא בחר חודש" var selectYearMessage = "אנא בחר שנה" var selectDateMessage = "Select [date] as date." // do not replace [date], it will be replaced by date. var crossobj, crossMonthObj, crossYearObj, monthSelected, yearSelected, dateSelected, omonthSelected, oyearSelected, odateSelected, monthConstructed, yearConstructed, modeConstructed, intervalID1, intervalID2, timeoutID1, timeoutID2, ctlToPlaceValue, ctlNow, dateFormat, nStartingYear var bPageLoaded=false var ie=document.all var dom=document.getElementById var ns4=document.layers var today = new Date() var dateNow = today.getDate() var monthNow = today.getMonth() var yearNow = today.getYear() var imgsrc = new Array("drop1.gif","drop2.gif","left1.gif","left2.gif","right1.gif","right2.gif") var img = new Array() var bShow = false; var calpopRetMode = {0: {'action':'onclick=\'javascript:dateSelected=;closeCalendar();\'', 'name':'return value', 'function':'Nulll'} } function Nulll(y,m,d) {return ''} var calpopActiveMode = 0; /* hides and objects (for IE only) */ function showElement( elmID ) { if( ie ) { for( i = 0; i < document.all.tags( elmID ).length; i++ ) { obj = document.all.tags( elmID )[i]; if( !obj || !obj.offsetParent ) { continue; } obj.style.visibility = ""; } } } function HolidayRec (d, m, y, desc) { this.d = d this.m = m this.y = y this.desc = desc } var HolidaysCounter = 0 var Holidays = new Array() function addHoliday (d, m, y, desc) { Holidays[HolidaysCounter++] = new HolidayRec ( d, m, y, desc ) } if (dom) { for (i=0;i