PageSourceSearch

https://www.aura.ge/js/calendar/calendar.js

js aura.ge collected 2026-10-02 12:54:38 UTC 42,377 bytes, 1,438 lines download raw bytes

1var turnOffYearSpan = false;     // true = Only show This Year and Next, false = show +/- 5 years
2var weekStartsOnSunday = false;  // true = Start the week on Sunday, false = start the week on Monday
3var showWeekNumber = false;  // true = show week number,  false = do not show week number
4
5var languageCode = 'ka-ge';	// Possible values: 	en,ge,no,nl,es,pt-br,fr
6							// en = english, ge = german, no = norwegian,nl = dutch, es = spanish, pt-br = portuguese, fr = french, da = danish, hu = hungarian(Use UTF-8 doctype for hungarian)
7
8var calendar_display_time = false;
9
10// Format of current day at the bottom of the calendar
11// [todayString] = the value of todayString
12// [dayString] = day of week (examle: mon, tue, wed...)
13// [UCFdayString] = day of week (examle: Mon, Tue, Wed...) ( First letter in uppercase)
14// [day] = Day of month, 1..31
15// [monthString] = Name of current month
16// [year] = Current year
17var todayStringFormat = '[todayString] [UCFdayString]. [day]. [monthString] [year]';
18var pathToImages = 'js/calendar/Images/CalendarImages/';	// Relative to your HTML file
19
20var speedOfSelectBoxSliding = 200;	// Milliseconds between changing year and hour when holding mouse over "-" and "+" - lower value = faster
21var intervalSelectBox_minutes = 5;	// Minute select box - interval between each option (5 = default)
22
23var calendar_offsetTop = 0;		// Offset - calendar placement - You probably have to modify this value if you're not using a strict doctype
24var calendar_offsetLeft = 0;	// Offset - calendar placement - You probably have to modify this value if you're not using a strict doctype
25var calendarDiv = false;
26
27var MSIE = false;
28var Opera = false;
29if(navigator.userAgent.indexOf('MSIE')>=0 && navigator.userAgent.indexOf('Opera')<0)MSIE=true;
30if(navigator.userAgent.indexOf('Opera')>=0)Opera=true;
31
32
33switch(languageCode){
34	case "en":	/* English */
35		var monthArray = ['January','February','March','April','May','June','July','August','September','October','November','December'];
36		var monthArrayShort = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];
37		var dayArray = ['Mon','Tue','Wed','Thu','Fri','Sat','Sun'];
38		var weekString = 'Week';
39		var todayString = '';
40		break;
41	case "ka-ge":	/* Georgian */
42		var monthArray = ['იანვარი','თებერვალი','მარტი','აპრილი','მაისი','ივნისი','ივლისი','აგვისტო','სექტემბერი','ოქტომბერი','ნოემბერი','დეკემბერი'];
43		var monthArrayShort = ['იან','თებ','მარ','აპრ','მაი','ივნ','ივლ','აგვ','სექტ','ოქტ','ნოემ','დეკ'];
44		var dayArray = ['ორ','სამ','ოთხ','ხუთ','პარ','შაბ','კვ'];
45		var weekString = '';
46		var todayString = '';
47		break;	
48	default: /* Default English */
49	    var monthArray = ['January','February','March','April','May','June','July','August','September','October','November','December'];
50		var monthArrayShort = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];
51		var dayArray = ['Mon','Tue','Wed','Thu','Fri','Sat','Sun'];
52		var weekString = 'Week';
53		var todayString = '';
54		break;
55}
56
57if (weekStartsOnSunday) {
58   var tempDayName = dayArray[6];
59   for(var theIx = 6; theIx > 0; theIx--) {
60      dayArray[theIx] = dayArray[theIx-1];
61   }
62   dayArray[0] = tempDayName;
63}
64
65
66
67var daysInMonthArray = [31,28,31,30,31,30,31,31,30,31,30,31];
68var currentMonth;
69var currentYear;
70var currentHour;
71var currentMinute;
72var calendarContentDiv;
73var returnDateTo;
74var returnFormat;
75var activeSelectBoxMonth;
76var activeSelectBoxYear;
77var activeSelectBoxHour;
78var activeSelectBoxMinute;
79
80var iframeObj = false;
81//// fix for EI frame problem on time dropdowns 09/30/2006
82var iframeObj2 =false;
83
84function EIS_FIX_EI1(where2fixit)
85{
86
87		if(!iframeObj2)return;
88		iframeObj2.style.display = 'block';
89		iframeObj2.style.height =document.getElementById(where2fixit).offsetHeight+1;
90		iframeObj2.style.width=document.getElementById(where2fixit).offsetWidth;
91		iframeObj2.style.left=getleftPos(document.getElementById(where2fixit))+1-calendar_offsetLeft;
92		iframeObj2.style.top=getTopPos(document.getElementById(where2fixit))-document.getElementById(where2fixit).offsetHeight-calendar_offsetTop;
93}
94
95function EIS_Hide_Frame()
96{		if(iframeObj2)iframeObj2.style.display = 'none';}
97//// fix for EI frame problem on time dropdowns 09/30/2006
98var returnDateToYear;
99var returnDateToMonth;
100var returnDateToDay;
101var returnDateToHour;
102var returnDateToMinute;
103
104var inputYear;
105var inputMonth;
106var inputDay;
107var inputHour;
108var inputMinute;
109var calendarDisplayTime = false;
110
111var selectBoxHighlightColor = '#D60808'; // Highlight color of select boxes
112var selectBoxRolloverBgColor = '#E2EBED'; // Background color on drop down lists(rollover)
113
114var selectBoxMovementInProgress = false;
115var activeSelectBox = false;
116
117function cancelCalendarEvent()
118{
119	return false;
120}
121function isLeapYear(inputYear)
122{
123	if(inputYear%400==0||(inputYear%4==0&&inputYear%100!=0)) return true;
124	return false;
125
126}
127var activeSelectBoxMonth = false;
128var activeSelectBoxDirection = false;
129
130function highlightMonthYear()
131{
132	if(activeSelectBoxMonth)activeSelectBoxMonth.className='';
133	activeSelectBox = this;
134
135
136	if(this.className=='monthYearActive'){
137		this.className='';
138	}else{
139		this.className = 'monthYearActive';
140		activeSelectBoxMonth = this;
141	}
142
143	if(this.innerHTML.indexOf('-')>=0 || this.innerHTML.indexOf('+')>=0){
144		if(this.className=='monthYearActive')
145			selectBoxMovementInProgress = true;
146		else
147			selectBoxMovementInProgress = false;
148		if(this.innerHTML.indexOf('-')>=0)activeSelectBoxDirection = -1; else activeSelectBoxDirection = 1;
149
150	}else selectBoxMovementInProgress = false;
151
152}
153
154function showMonthDropDown()
155{
156	if(document.getElementById('monthDropDown').style.display=='block'){
157		document.getElementById('monthDropDown').style.display='none';
158		//// fix for EI frame problem on time dropdowns 09/30/2006
159				EIS_Hide_Frame();
160	}else{
161		document.getElementById('monthDropDown').style.display='block';
162		document.getElementById('yearDropDown').style.display='none';
163		document.getElementById('hourDropDown').style.display='none';
164		document.getElementById('minuteDropDown').style.display='none';
165			if (MSIE)
166		{ EIS_FIX_EI1('monthDropDown')}
167		//// fix for EI frame problem on time dropdowns 09/30/2006
168
169	}
170}
171
172function showYearDropDown()
173{
174	if(document.getElementById('yearDropDown').style.display=='block'){
175		document.getElementById('yearDropDown').style.display='none';
176		//// fix for EI frame problem on time dropdowns 09/30/2006
177				EIS_Hide_Frame();
178	}else{
179		document.getElementById('yearDropDown').style.display='block';
180		document.getElementById('monthDropDown').style.display='none';
181		document.getElementById('hourDropDown').style.display='none';
182		document.getElementById('minuteDropDown').style.display='none';
183			if (MSIE)
184		{ EIS_FIX_EI1('yearDropDown')}
185		//// fix for EI frame problem on time dropdowns 09/30/2006
186
187	}
188
189}
190function showHourDropDown()
191{
192	if(document.getElementById('hourDropDown').style.display=='block'){
193		document.getElementById('hourDropDown').style.display='none';
194		//// fix for EI frame problem on time dropdowns 09/30/2006
195				EIS_Hide_Frame();
196	}else{
197		document.getElementById('hourDropDown').style.display='block';
198		document.getElementById('monthDropDown').style.display='none';
199		document.getElementById('yearDropDown').style.display='none';
200		document.getElementById('minuteDropDown').style.display='none';
201				if (MSIE)
202		{ EIS_FIX_EI1('hourDropDown')}
203		//// fix for EI frame problem on time dropdowns 09/30/2006
204	}
205
206}
207function showMinuteDropDown()
208{
209	if(document.getElementById('minuteDropDown').style.display=='block'){
210		document.getElementById('minuteDropDown').style.display='none';
211		//// fix for EI frame problem on time dropdowns 09/30/2006
212				EIS_Hide_Frame();
213	}else{
214		document.getElementById('minuteDropDown').style.display='block';
215		document.getElementById('monthDropDown').style.display='none';
216		document.getElementById('yearDropDown').style.display='none';
217		document.getElementById('hourDropDown').style.display='none';
218				if (MSIE)
219		{ EIS_FIX_EI1('minuteDropDown')}
220		//// fix for EI frame problem on time dropdowns 09/30/2006
221	}
222
223}
224
225function selectMonth()
226{
227	document.getElementById('calendar_month_txt').innerHTML = this.innerHTML
228	currentMonth = this.id.replace(/[^\d]/g,'');
229
230	document.getElementById('monthDropDown').style.display='none';
231	//// fix for EI frame problem on time dropdowns 09/30/2006
232				EIS_Hide_Frame();
233	for(var no=0;no<monthArray.length;no++){
234		document.getElementById('monthDiv_'+no).style.color='';
235	}
236	this.style.color = selectBoxHighlightColor;
237	activeSelectBoxMonth = this;
238	writeCalendarContent();
239
240}
241
242function selectHour()
243{
244	document.getElementById('calendar_hour_txt').innerHTML = this.innerHTML
245	currentHour = this.innerHTML.replace(/[^\d]/g,'');
246	document.getElementById('hourDropDown').style.display='none';
247	//// fix for EI frame problem on time dropdowns 09/30/2006
248				EIS_Hide_Frame();
249	if(activeSelectBoxHour){
250		activeSelectBoxHour.style.color='';
251	}
252	activeSelectBoxHour=this;
253	this.style.color = selectBoxHighlightColor;
254}
255
256function selectMinute()
257{
258	document.getElementById('calendar_minute_txt').innerHTML = this.innerHTML
259	currentMinute = this.innerHTML.replace(/[^\d]/g,'');
260	document.getElementById('minuteDropDown').style.display='none';
261	//// fix for EI frame problem on time dropdowns 09/30/2006
262				EIS_Hide_Frame();
263	if(activeSelectBoxMinute){
264		activeSelectBoxMinute.style.color='';
265	}
266	activeSelectBoxMinute=this;
267	this.style.color = selectBoxHighlightColor;
268}
269
270
271function selectYear()
272{
273	document.getElementById('calendar_year_txt').innerHTML = this.innerHTML
274	currentYear = this.innerHTML.replace(/[^\d]/g,'');
275	document.getElementById('yearDropDown').style.display='none';
276	//// fix for EI frame problem on time dropdowns 09/30/2006
277				EIS_Hide_Frame();
278	if(activeSelectBoxYear){
279		activeSelectBoxYear.style.color='';
280	}
281	activeSelectBoxYear=this;
282	this.style.color = selectBoxHighlightColor;
283	writeCalendarContent();
284
285}
286
287function switchMonth()
288{
289	if(this.src.indexOf('left')>=0){
290		currentMonth=currentMonth-1;;
291		if(currentMonth<0){
292			currentMonth=11;
293			currentYear=currentYear-1;
294		}
295	}else{
296		currentMonth=currentMonth+1;;
297		if(currentMonth>11){
298			currentMonth=0;
299			currentYear=currentYear/1+1;
300		}
301	}
302
303	writeCalendarContent();
304
305
306}
307
308function createMonthDiv(){
309	var div = document.createElement('DIV');
310	div.className='monthYearPicker';
311	div.id = 'monthPicker';
312
313	for(var no=0;no<monthArray.length;no++){
314		var subDiv = document.createElement('DIV');
315		subDiv.innerHTML = monthArray[no];
316		subDiv.onmouseover = highlightMonthYear;
317		subDiv.onmouseout = highlightMonthYear;
318		subDiv.onclick = selectMonth;
319		subDiv.id = 'monthDiv_' + no;
320		subDiv.style.width = '56px';
321		subDiv.onselectstart = cancelCalendarEvent;
322		div.appendChild(subDiv);
323		if(currentMonth && currentMonth==no){
324			subDiv.style.color = selectBoxHighlightColor;
325			activeSelectBoxMonth = subDiv;
326		}
327
328	}
329	return div;
330
331}
332
333function changeSelectBoxYear(e,inputObj)
334{
335	if(!inputObj)inputObj =this;
336	var yearItems = inputObj.parentNode.getElementsByTagName('DIV');
337	if(inputObj.innerHTML.indexOf('-')>=0){
338		var startYear = yearItems[1].innerHTML/1 -1;
339		if(activeSelectBoxYear){
340			activeSelectBoxYear.style.color='';
341		}
342	}else{
343		var startYear = yearItems[1].innerHTML/1 +1;
344		if(activeSelectBoxYear){
345			activeSelectBoxYear.style.color='';
346
347		}
348	}
349
350	for(var no=1;no<yearItems.length-1;no++){
351		yearItems[no].innerHTML = startYear+no-1;
352		yearItems[no].id = 'yearDiv' + (startYear/1+no/1-1);
353
354	}
355	if(activeSelectBoxYear){
356		activeSelectBoxYear.style.color='';
357		if(document.getElementById('yearDiv'+currentYear)){
358			activeSelectBoxYear = document.getElementById('yearDiv'+currentYear);
359			activeSelectBoxYear.style.color=selectBoxHighlightColor;;
360		}
361	}
362}
363function changeSelectBoxHour(e,inputObj)
364{
365	if(!inputObj)inputObj = this;
366
367	var hourItems = inputObj.parentNode.getElementsByTagName('DIV');
368	if(inputObj.innerHTML.indexOf('-')>=0){
369		var startHour = hourItems[1].innerHTML/1 -1;
370		if(startHour<0)startHour=0;
371		if(activeSelectBoxHour){
372			activeSelectBoxHour.style.color='';
373		}
374	}else{
375		var startHour = hourItems[1].innerHTML/1 +1;
376		if(startHour>14)startHour = 14;
377		if(activeSelectBoxHour){
378			activeSelectBoxHour.style.color='';
379
380		}
381	}
382	var prefix = '';
383	for(var no=1;no<hourItems.length-1;no++){
384		if((startHour/1 + no/1) < 11)prefix = '0'; else prefix = '';
385		hourItems[no].innerHTML = prefix + (startHour+no-1);
386
387		hourItems[no].id = 'hourDiv' + (startHour/1+no/1-1);
388
389	}
390	if(activeSelectBoxHour){
391		activeSelectBoxHour.style.color='';
392		if(document.getElementById('hourDiv'+currentHour)){
393			activeSelectBoxHour = document.getElementById('hourDiv'+currentHour);
394			activeSelectBoxHour.style.color=selectBoxHighlightColor;;
395		}
396	}
397}
398
399function updateYearDiv()
400{
401    var yearSpan = 5;
402    if (turnOffYearSpan) {
403       yearSpan = 0;
404    }
405	var div = document.getElementById('yearDropDown');
406	var yearItems = div.getElementsByTagName('DIV');
407	for(var no=1;no<yearItems.length-1;no++){
408		yearItems[no].innerHTML = currentYear/1 -yearSpan + no;
409		if(currentYear==(currentYear/1 -yearSpan + no)){
410			yearItems[no].style.color = selectBoxHighlightColor;
411			activeSelectBoxYear = yearItems[no];
412		}else{
413			yearItems[no].style.color = '';
414		}
415	}
416}
417
418function updateMonthDiv()
419{
420	for(no=0;no<12;no++){
421		document.getElementById('monthDiv_' + no).style.color = '';
422	}
423	document.getElementById('monthDiv_' + currentMonth).style.color = selectBoxHighlightColor;
424	activeSelectBoxMonth = 	document.getElementById('monthDiv_' + currentMonth);
425}
426
427
428function updateHourDiv()
429{
430	var div = document.getElementById('hourDropDown');
431	var hourItems = div.getElementsByTagName('DIV');
432
433	var addHours = 0;
434	if((currentHour/1 -6 + 1)<0){
435		addHours = 	(currentHour/1 -6 + 1)*-1;
436	}
437	for(var no=1;no<hourItems.length-1;no++){
438		var prefix='';
439		if((currentHour/1 -6 + no + addHours) < 10)prefix='0';
440		hourItems[no].innerHTML = prefix +  (currentHour/1 -6 + no + addHours);
441		if(currentHour==(currentHour/1 -6 + no)){
442			hourItems[no].style.color = selectBoxHighlightColor;
443			activeSelectBoxHour = hourItems[no];
444		}else{
445			hourItems[no].style.color = '';
446		}
447	}
448}
449
450function updateMinuteDiv()
451{
452	for(no=0;no<60;no+=intervalSelectBox_minutes){
453		var prefix = '';
454		if(no<10)prefix = '0';
455
456		document.getElementById('minuteDiv_' + prefix + no).style.color = '';
457	}
458	if(document.getElementById('minuteDiv_' + currentMinute)){
459		document.getElementById('minuteDiv_' + currentMinute).style.color = selectBoxHighlightColor;
460		activeSelectBoxMinute = document.getElementById('minuteDiv_' + currentMinute);
461	}
462}
463
464
465
466function createYearDiv()
467{
468
469	if(!document.getElementById('yearDropDown')){
470		var div = document.createElement('DIV');
471		div.className='monthYearPicker';
472	}else{
473		var div = document.getElementById('yearDropDown');
474		var subDivs = div.getElementsByTagName('DIV');
475		for(var no=0;no<subDivs.length;no++){
476			subDivs[no].parentNode.removeChild(subDivs[no]);
477		}
478	}
479
480
481	var d = new Date();
482	if(currentYear){
483		d.setFullYear(currentYear);
484	}
485
486	var startYear = d.getFullYear()/1 - 5;
487
488    var yearSpan = 10;
489	if (! turnOffYearSpan) {
490    	var subDiv = document.createElement('DIV');
491    	subDiv.innerHTML = '&nbsp;&nbsp;- ';
492    	subDiv.onclick = changeSelectBoxYear;
493    	subDiv.onmouseover = highlightMonthYear;
494    	subDiv.onmouseout = function(){ selectBoxMovementInProgress = false;};
495    	subDiv.onselectstart = cancelCalendarEvent;
496    	div.appendChild(subDiv);
497    } else {
498       startYear = d.getFullYear()/1 - 0;
499       yearSpan = 2;
500    }
501
502	for(var no=startYear;no<(startYear+yearSpan);no++){
503		var subDiv = document.createElement('DIV');
504		subDiv.innerHTML = no;
505		subDiv.onmouseover = highlightMonthYear;
506		subDiv.onmouseout = highlightMonthYear;
507		subDiv.onclick = selectYear;
508		subDiv.id = 'yearDiv' + no;
509		subDiv.onselectstart = cancelCalendarEvent;
510		div.appendChild(subDiv);
511		if(currentYear && currentYear==no){
512			subDiv.style.color = selectBoxHighlightColor;
513			activeSelectBoxYear = subDiv;
514		}
515	}
516	if (! turnOffYearSpan) {
517    	var subDiv = document.createElement('DIV');
518    	subDiv.innerHTML = '&nbsp;&nbsp;+ ';
519    	subDiv.onclick = changeSelectBoxYear;
520    	subDiv.onmouseover = highlightMonthYear;
521    	subDiv.onmouseout = function(){ selectBoxMovementInProgress = false;};
522    	subDiv.onselectstart = cancelCalendarEvent;
523    	div.appendChild(subDiv);
524	}
525	return div;
526}
527
528/* This function creates the hour div at the bottom bar */
529
530function slideCalendarSelectBox()
531{
532	if(selectBoxMovementInProgress){
533		if(activeSelectBox.parentNode.id=='hourDropDown'){
534			changeSelectBoxHour(false,activeSelectBox);
535		}
536		if(activeSelectBox.parentNode.id=='yearDropDown'){
537			changeSelectBoxYear(false,activeSelectBox);
538		}
539
540	}
541	setTimeout('slideCalendarSelectBox()',speedOfSelectBoxSliding);
542
543}
544
545function createHourDiv()
546{
547	if(!document.getElementById('hourDropDown')){
548		var div = document.createElement('DIV');
549		div.className='monthYearPicker';
550	}else{
551		var div = document.getElementById('hourDropDown');
552		var subDivs = div.getElementsByTagName('DIV');
553		for(var no=0;no<subDivs.length;no++){
554			subDivs[no].parentNode.removeChild(subDivs[no]);
555		}
556	}
557
558	if(!currentHour)currentHour=0;
559	var startHour = currentHour/1;
560	if(startHour>14)startHour=14;
561
562	var subDiv = document.createElement('DIV');
563	subDiv.innerHTML = '&nbsp;&nbsp;- ';
564	subDiv.onclick = changeSelectBoxHour;
565	subDiv.onmouseover = highlightMonthYear;
566	subDiv.onmouseout = function(){ selectBoxMovementInProgress = false;};
567	subDiv.onselectstart = cancelCalendarEvent;
568	div.appendChild(subDiv);
569
570	for(var no=startHour;no<startHour+10;no++){
571		var prefix = '';
572		if(no/1<10)prefix='0';
573		var subDiv = document.createElement('DIV');
574		subDiv.innerHTML = prefix + no;
575		subDiv.onmouseover = highlightMonthYear;
576		subDiv.onmouseout = highlightMonthYear;
577		subDiv.onclick = selectHour;
578		subDiv.id = 'hourDiv' + no;
579		subDiv.onselectstart = cancelCalendarEvent;
580		div.appendChild(subDiv);
581		if(currentYear && currentYear==no){
582			subDiv.style.color = selectBoxHighlightColor;
583			activeSelectBoxYear = subDiv;
584		}
585	}
586	var subDiv = document.createElement('DIV');
587	subDiv.innerHTML = '&nbsp;&nbsp;+ ';
588	subDiv.onclick = changeSelectBoxHour;
589	subDiv.onmouseover = highlightMonthYear;
590	subDiv.onmouseout = function(){ selectBoxMovementInProgress = false;};
591	subDiv.onselectstart = cancelCalendarEvent;
592	div.appendChild(subDiv);
593
594	return div;
595}
596/* This function creates the minute div at the bottom bar */
597
598function createMinuteDiv()
599{
600	if(!document.getElementById('minuteDropDown')){
601		var div = document.createElement('DIV');
602		div.className='monthYearPicker';
603	}else{
604		var div = document.getElementById('minuteDropDown');
605		var subDivs = div.getElementsByTagName('DIV');
606		for(var no=0;no<subDivs.length;no++){
607			subDivs[no].parentNode.removeChild(subDivs[no]);
608		}
609	}
610	var startMinute = 0;
611	var prefix = '';
612	for(var no=startMinute;no<60;no+=intervalSelectBox_minutes){
613
614		if(no<10)prefix='0'; else prefix = '';
615		var subDiv = document.createElement('DIV');
616		subDiv.innerHTML = prefix + no;
617		subDiv.onmouseover = highlightMonthYear;
618		subDiv.onmouseout = highlightMonthYear;
619		subDiv.onclick = selectMinute;
620		subDiv.id = 'minuteDiv_' + prefix +  no;
621		subDiv.onselectstart = cancelCalendarEvent;
622		div.appendChild(subDiv);
623		if(currentYear && currentYear==no){
624			subDiv.style.color = selectBoxHighlightColor;
625			activeSelectBoxYear = subDiv;
626		}
627	}
628	return div;
629}
630
631function highlightSelect()
632{
633
634	if(this.className=='selectBoxTime'){
635		this.className = 'selectBoxTimeOver';
636		this.getElementsByTagName('IMG')[0].src = pathToImages + 'down_time_over.gif';
637	}else if(this.className=='selectBoxTimeOver'){
638		this.className = 'selectBoxTime';
639		this.getElementsByTagName('IMG')[0].src = pathToImages + 'down_time.gif';
640	}
641
642	if(this.className=='selectBox'){
643		this.className = 'selectBoxOver';
644		this.getElementsByTagName('IMG')[0].src = pathToImages + 'down_over.gif';
645	}else if(this.className=='selectBoxOver'){
646		this.className = 'selectBox';
647		this.getElementsByTagName('IMG')[0].src = pathToImages + 'down.gif';
648	}
649
650}
651
652function highlightArrow()
653{
654	if(this.src.indexOf('over')>=0){
655		if(this.src.indexOf('left')>=0)this.src = pathToImages + 'left.gif';
656		if(this.src.indexOf('right')>=0)this.src = pathToImages + 'right.gif';
657	}else{
658		if(this.src.indexOf('left')>=0)this.src = pathToImages + 'left_over.gif';
659		if(this.src.indexOf('right')>=0)this.src = pathToImages + 'right_over.gif';
660	}
661}
662
663function highlightClose()
664{
665	if(this.src.indexOf('over')>=0){
666		this.src = pathToImages + 'close.gif';
667	}else{
668		this.src = pathToImages + 'close_over.gif';
669	}
670
671}
672
673function closeCalendar(){
674
675	document.getElementById('yearDropDown').style.display='none';
676	document.getElementById('monthDropDown').style.display='none';
677	document.getElementById('hourDropDown').style.display='none';
678	document.getElementById('minuteDropDown').style.display='none';
679
680	calendarDiv.style.display='none';
681	if(iframeObj){
682		iframeObj.style.display='none';
683		 //// //// fix for EI frame problem on time dropdowns 09/30/2006
684			EIS_Hide_Frame();}
685	if(activeSelectBoxMonth)activeSelectBoxMonth.className='';
686	if(activeSelectBoxYear)activeSelectBoxYear.className='';
687
688
689}
690
691function writeTopBar()
692{
693
694	var topBar = document.createElement('DIV');
695	topBar.className = 'topBar';
696	topBar.id = 'topBar';
697	calendarDiv.appendChild(topBar);
698
699	// Left arrow
700	var leftDiv = document.createElement('DIV');
701	leftDiv.style.marginRight = '1px';
702	var img = document.createElement('IMG');
703	img.src = pathToImages + 'left.gif';
704	img.onmouseover = highlightArrow;
705	img.onclick = switchMonth;
706	img.onmouseout = highlightArrow;
707	leftDiv.appendChild(img);
708	topBar.appendChild(leftDiv);
709	if(Opera)leftDiv.style.width = '16px';
710
711	// Right arrow
712	var rightDiv = document.createElement('DIV');
713	rightDiv.style.marginRight = '1px';
714	var img = document.createElement('IMG');
715	img.src = pathToImages + 'right.gif';
716	img.onclick = switchMonth;
717	img.onmouseover = highlightArrow;
718	img.onmouseout = highlightArrow;
719	rightDiv.appendChild(img);
720	if(Opera)rightDiv.style.width = '16px';
721	topBar.appendChild(rightDiv);
722
723
724	// Month selector
725	var monthDiv = document.createElement('DIV');
726	monthDiv.id = 'monthSelect';
727	monthDiv.onmouseover = highlightSelect;
728	monthDiv.onmouseout = highlightSelect;
729	monthDiv.onclick = showMonthDropDown;
730	var span = document.createElement('SPAN');
731	span.innerHTML = monthArray[currentMonth];
732	span.id = 'calendar_month_txt';
733	monthDiv.appendChild(span);
734
735	var img = document.createElement('IMG');
736	img.src = pathToImages + 'down.gif';
737	img.style.position = 'absolute';
738	img.style.right = '0px';
739	monthDiv.appendChild(img);
740	monthDiv.className = 'selectBox';
741	if(Opera){
742		img.style.cssText = 'float:right;position:relative';
743		img.style.position = 'relative';
744		img.style.styleFloat = 'right';
745	}
746	topBar.appendChild(monthDiv);
747
748	var monthPicker = createMonthDiv();
749	monthPicker.style.left = '37px';
750	monthPicker.style.top = monthDiv.offsetTop + monthDiv.offsetHeight + 1 + 'px';
751	monthPicker.style.width ='60px';
752	monthPicker.id = 'monthDropDown';
753
754	calendarDiv.appendChild(monthPicker);
755
756	// Year selector
757	var yearDiv = document.createElement('DIV');
758	yearDiv.onmouseover = highlightSelect;
759	yearDiv.onmouseout = highlightSelect;
760	yearDiv.onclick = showYearDropDown;
761	var span = document.createElement('SPAN');
762	span.innerHTML = currentYear;
763	span.id = 'calendar_year_txt';
764	yearDiv.appendChild(span);
765	topBar.appendChild(yearDiv);
766
767	var img = document.createElement('IMG');
768	img.src = pathToImages + 'down.gif';
769	yearDiv.appendChild(img);
770	yearDiv.className = 'selectBox';
771
772	if(Opera){
773		yearDiv.style.width = '50px';
774		img.style.cssText = 'float:right';
775		img.style.position = 'relative';
776		img.style.styleFloat = 'right';
777	}
778
779	var yearPicker = createYearDiv();
780	yearPicker.style.left = '113px';
781	yearPicker.style.top = monthDiv.offsetTop + monthDiv.offsetHeight + 1 + 'px';
782	yearPicker.style.width = '35px';
783	yearPicker.id = 'yearDropDown';
784	calendarDiv.appendChild(yearPicker);
785
786
787	var img = document.createElement('IMG');
788	img.src = pathToImages + 'close.gif';
789	img.style.styleFloat = 'right';
790	img.onmouseover = highlightClose;
791	img.onmouseout = highlightClose;
792	img.onclick = closeCalendar;
793	topBar.appendChild(img);
794	if(!document.all){
795		img.style.position = 'absolute';
796		img.style.right = '2px';
797	}
798
799
800
801}
802
803function writeCalendarContent()
804{
805	var calendarContentDivExists = true;
806	if(!calendarContentDiv){
807		calendarContentDiv = document.createElement('DIV');
808		calendarDiv.appendChild(calendarContentDiv);
809		calendarContentDivExists = false;
810	}
811	currentMonth = currentMonth/1;
812	var d = new Date();
813
814	d.setFullYear(currentYear);
815	d.setDate(1);
816	d.setMonth(currentMonth);
817
818	var dayStartOfMonth = d.getDay();
819	if (! weekStartsOnSunday) {
820      if(dayStartOfMonth==0)dayStartOfMonth=7;
821      dayStartOfMonth--;
822   }
823
824	document.getElementById('calendar_year_txt').innerHTML = currentYear;
825	document.getElementById('calendar_month_txt').innerHTML = monthArray[currentMonth];
826	document.getElementById('calendar_hour_txt').innerHTML = currentHour;
827	document.getElementById('calendar_minute_txt').innerHTML = currentMinute;
828
829	var existingTable = calendarContentDiv.getElementsByTagName('TABLE');
830	if(existingTable.length>0){
831		calendarContentDiv.removeChild(existingTable[0]);
832	}
833
834	var calTable = document.createElement('TABLE');
835	calTable.width = '100%';
836	calTable.cellSpacing = '0';
837	calendarContentDiv.appendChild(calTable);
838
839
840
841
842	var calTBody = document.createElement('TBODY');
843	calTable.appendChild(calTBody);
844	var row = calTBody.insertRow(-1);
845	row.className = 'calendar_week_row';
846   if (showWeekNumber) {
847      var cell = row.insertCell(-1);
848	   cell.innerHTML = weekString;
849	   cell.className = 'calendar_week_column';
850	   cell.style.backgroundColor = selectBoxRolloverBgColor;
851	}
852
853	for(var no=0;no<dayArray.length;no++){
854		var cell = row.insertCell(-1);
855		cell.innerHTML = dayArray[no];
856	}
857
858	var row = calTBody.insertRow(-1);
859
860   if (showWeekNumber) {
861	   var cell = row.insertCell(-1);
862	   cell.className = 'calendar_week_column';
863	   cell.style.backgroundColor = selectBoxRolloverBgColor;
864	   var week = getWeek(currentYear,currentMonth,1);
865	   cell.innerHTML = week;		// Week
866	}
867	for(var no=0;no<dayStartOfMonth;no++){
868		var cell = row.insertCell(-1);
869		cell.innerHTML = '&nbsp;';
870	}
871
872	var colCounter = dayStartOfMonth;
873	var daysInMonth = daysInMonthArray[currentMonth];
874	if(daysInMonth==28){
875		if(isLeapYear(currentYear))daysInMonth=29;
876	}
877
878	for(var no=1;no<=daysInMonth;no++){
879		d.setDate(no-1);
880		if(colCounter>0 && colCounter%7==0){
881			var row = calTBody.insertRow(-1);
882         if (showWeekNumber) {
883            var cell = row.insertCell(-1);
884            cell.className = 'calendar_week_column';
885            var week = getWeek(currentYear,currentMonth,no);
886            cell.innerHTML = week;		// Week
887            cell.style.backgroundColor = selectBoxRolloverBgColor;
888         }
889		}
890		var cell = row.insertCell(-1);
891		if(currentYear==inputYear && currentMonth == inputMonth && no==inputDay){
892			cell.className='activeDay';
893		}
894		cell.innerHTML = no;
895		cell.onclick = pickDate;
896		colCounter++;
897	}
898
899
900	if(!document.all){
901		if(calendarContentDiv.offsetHeight)
902			document.getElementById('topBar').style.top = calendarContentDiv.offsetHeight + document.getElementById('timeBar').offsetHeight + document.getElementById('topBar').offsetHeight -1 + 'px';
903		else{
904			document.getElementById('topBar').style.top = '';
905			document.getElementById('topBar').style.bottom = '0px';
906		}
907
908	}
909
910	if(iframeObj){
911		if(!calendarContentDivExists)setTimeout('resizeIframe()',350);else setTimeout('resizeIframe()',10);
912	}
913
914
915
916
917}
918
919function resizeIframe()
920{
921	iframeObj.style.width = calendarDiv.offsetWidth + 'px';
922	iframeObj.style.height = calendarDiv.offsetHeight + 'px' ;
923
924
925}
926
927function pickTodaysDate()
928{
929	var d = new Date();
930	currentMonth = d.getMonth();
931	currentYear = d.getFullYear();
932	pickDate(false,d.getDate());
933
934}
935
936function pickDate(e,inputDay)
937{
938	var month = currentMonth/1 +1;
939	if(month<10)month = '0' + month;
940	var day;
941	if(!inputDay && this)day = this.innerHTML; else day = inputDay;
942
943	if(day/1<10)day = '0' + day;
944	if(returnFormat){
945		returnFormat = returnFormat.replace('dd',day);
946		returnFormat = returnFormat.replace('mm',month);
947		returnFormat = returnFormat.replace('yyyy',currentYear);
948		returnFormat = returnFormat.replace('hh',currentHour);
949		returnFormat = returnFormat.replace('ii',currentMinute);
950		returnFormat = returnFormat.replace('d',day/1);
951		returnFormat = returnFormat.replace('m',month/1);
952
953		returnDateTo.value = returnFormat;
954		try{
955			returnDateTo.onchange();
956		}catch(e){
957
958		}
959	}else{
960		for(var no=0;no<returnDateToYear.options.length;no++){
961			if(returnDateToYear.options[no].value==currentYear){
962				returnDateToYear.selectedIndex=no;
963				break;
964			}
965		}
966		for(var no=0;no<returnDateToMonth.options.length;no++){
967			if(returnDateToMonth.options[no].value==parseInt(month)){
968				returnDateToMonth.selectedIndex=no;
969				break;
970			}
971		}
972		for(var no=0;no<returnDateToDay.options.length;no++){
973			if(returnDateToDay.options[no].value==parseInt(day)){
974				returnDateToDay.selectedIndex=no;
975				break;
976			}
977		}
978		if(calendarDisplayTime){
979			for(var no=0;no<returnDateToHour.options.length;no++){
980				if(returnDateToHour.options[no].value==parseInt(currentHour)){
981					returnDateToHour.selectedIndex=no;
982					break;
983				}
984			}
985			for(var no=0;no<returnDateToMinute.options.length;no++){
986				if(returnDateToMinute.options[no].value==parseInt(currentMinute)){
987					returnDateToMinute.selectedIndex=no;
988					break;
989				}
990			}
991		}
992	}
993	closeCalendar();
994
995}
996
997// This function is from http://www.codeproject.com/csharp/gregorianwknum.asp
998// Only changed the month add
999function getWeek(year,month,day){
1000   if (! weekStartsOnSunday) {
1001	   day = (day/1);
1002	} else {
1003	   day = (day/1)+1;
1004	}
1005	year = year /1;
1006    month = month/1 + 1; //use 1-12
1007    var a = Math.floor((14-(month))/12);
1008    var y = year+4800-a;
1009    var m = (month)+(12*a)-3;
1010    var jd = day + Math.floor(((153*m)+2)/5) +
1011                 (365*y) + Math.floor(y/4) - Math.floor(y/100) +
1012                 Math.floor(y/400) - 32045;      // (gregorian calendar)
1013    var d4 = (jd+31741-(jd%7))%146097%36524%1461;
1014    var L = Math.floor(d4/1460);
1015    var d1 = ((d4-L)%365)+L;
1016    NumberOfWeek = Math.floor(d1/7) + 1;
1017    return NumberOfWeek;
1018}
1019
1020function writeTimeBar()
1021{
1022	var timeBar = document.createElement('DIV');
1023	timeBar.id = 'timeBar';
1024	timeBar.className = 'timeBar';
1025
1026	var subDiv = document.createElement('DIV');
1027	subDiv.innerHTML = 'Time:';
1028	//timeBar.appendChild(subDiv);
1029
1030	// Year selector
1031	var hourDiv = document.createElement('DIV');
1032	hourDiv.onmouseover = highlightSelect;
1033	hourDiv.onmouseout = highlightSelect;
1034	hourDiv.onclick = showHourDropDown;
1035	hourDiv.style.width = '30px';
1036	var span = document.createElement('SPAN');
1037	span.innerHTML = currentHour;
1038	span.id = 'calendar_hour_txt';
1039	hourDiv.appendChild(span);
1040	timeBar.appendChild(hourDiv);
1041
1042	var img = document.createElement('IMG');
1043	img.src = pathToImages + 'down_time.gif';
1044	hourDiv.appendChild(img);
1045	hourDiv.className = 'selectBoxTime';
1046
1047	if(Opera){
1048		hourDiv.style.width = '30px';
1049		img.style.cssText = 'float:right';
1050		img.style.position = 'relative';
1051		img.style.styleFloat = 'right';
1052	}
1053
1054	var hourPicker = createHourDiv();
1055	hourPicker.style.left = '130px';
1056	//hourPicker.style.top = monthDiv.offsetTop + monthDiv.offsetHeight + 1 + 'px';
1057	hourPicker.style.width = '35px';
1058	hourPicker.id = 'hourDropDown';
1059	calendarDiv.appendChild(hourPicker);
1060
1061	// Add Minute picker
1062
1063	// Year selector
1064	var minuteDiv = document.createElement('DIV');
1065	minuteDiv.onmouseover = highlightSelect;
1066	minuteDiv.onmouseout = highlightSelect;
1067	minuteDiv.onclick = showMinuteDropDown;
1068	minuteDiv.style.width = '30px';
1069	var span = document.createElement('SPAN');
1070	span.innerHTML = currentMinute;
1071
1072	span.id = 'calendar_minute_txt';
1073	minuteDiv.appendChild(span);
1074	timeBar.appendChild(minuteDiv);
1075
1076	var img = document.createElement('IMG');
1077	img.src = pathToImages + 'down_time.gif';
1078	minuteDiv.appendChild(img);
1079	minuteDiv.className = 'selectBoxTime';
1080
1081	if(Opera){
1082		minuteDiv.style.width = '30px';
1083		img.style.cssText = 'float:right';
1084		img.style.position = 'relative';
1085		img.style.styleFloat = 'right';
1086	}
1087
1088	var minutePicker = createMinuteDiv();
1089	minutePicker.style.left = '167px';
1090	//minutePicker.style.top = monthDiv.offsetTop + monthDiv.offsetHeight + 1 + 'px';
1091	minutePicker.style.width = '35px';
1092	minutePicker.id = 'minuteDropDown';
1093	calendarDiv.appendChild(minutePicker);
1094
1095
1096	return timeBar;
1097
1098}
1099
1100function writeBottomBar()
1101{
1102	var d = new Date();
1103	var bottomBar = document.createElement('DIV');
1104
1105	bottomBar.id = 'bottomBar';
1106
1107	bottomBar.style.cursor = 'pointer';
1108	bottomBar.className = 'todaysDate';
1109	// var todayStringFormat = '[todayString] [dayString] [day] [monthString] [year]';	;;
1110
1111	var subDiv = document.createElement('DIV');
1112	subDiv.onclick = pickTodaysDate;
1113	subDiv.id = 'todaysDateString';
1114	subDiv.style.width = (calendarDiv.offsetWidth - 95) + 'px';
1115	var day = d.getDay();
1116	if (! weekStartsOnSunday) {
1117      if(day==0)day = 7;
1118      day--;
1119   }
1120
1121	var bottomString = todayStringFormat;
1122	bottomString = bottomString.replace('[monthString]',monthArrayShort[d.getMonth()]);
1123	bottomString = bottomString.replace('[day]',d.getDate());
1124	bottomString = bottomString.replace('[year]',d.getFullYear());
1125	bottomString = bottomString.replace('[dayString]',dayArray[day].toLowerCase());
1126	bottomString = bottomString.replace('[UCFdayString]',dayArray[day]);
1127	bottomString = bottomString.replace('[todayString]',todayString);
1128
1129
1130	subDiv.innerHTML = todayString + ': ' + d.getDate() + '. ' + monthArrayShort[d.getMonth()] + ', ' +  d.getFullYear() ;
1131	subDiv.innerHTML = bottomString ;
1132	bottomBar.appendChild(subDiv);
1133
1134	var timeDiv = writeTimeBar();
1135	bottomBar.appendChild(timeDiv);
1136
1137	calendarDiv.appendChild(bottomBar);
1138
1139
1140
1141}
1142function getTopPos(inputObj)
1143{
1144
1145  var returnValue = inputObj.offsetTop + inputObj.offsetHeight;
1146  while((inputObj = inputObj.offsetParent) != null)returnValue += inputObj.offsetTop;
1147  return returnValue + calendar_offsetTop;
1148}
1149
1150function getleftPos(inputObj)
1151{
1152  var returnValue = inputObj.offsetLeft;
1153  while((inputObj = inputObj.offsetParent) != null)returnValue += inputObj.offsetLeft;
1154  return returnValue + calendar_offsetLeft;
1155}
1156
1157function positionCalendar(inputObj)
1158{
1159	calendarDiv.style.left = getleftPos(inputObj) + 'px';
1160	calendarDiv.style.top = getTopPos(inputObj) + 'px';
1161	if(iframeObj){
1162		iframeObj.style.left = calendarDiv.style.left;
1163		iframeObj.style.top =  calendarDiv.style.top;
1164		
1165		//// fix for EI frame problem on time dropdowns 09/30/2006
1166		/*
1167		iframeObj2.style.left = calendarDiv.style.left;
1168		iframeObj2.style.top =  calendarDiv.style.top;
1169		*/
1170	}
1171
1172}
1173
1174function initCalendar()
1175{
1176	if(MSIE){
1177		iframeObj = document.createElement('IFRAME');
1178		iframeObj.style.filter = 'alpha(opacity=0)';
1179		iframeObj.style.position = 'absolute';
1180		iframeObj.border='0px';
1181		iframeObj.style.border = '0px';
1182		iframeObj.style.backgroundColor = '#FF0000';
1183		
1184		//// fix for EI frame problem on time dropdowns 09/30/2006
1185		/*
1186		iframeObj2 = document.createElement('IFRAME');
1187		iframeObj2.style.position = 'absolute';
1188		iframeObj2.border='0px';
1189		iframeObj2.style.border = '0px';
1190		iframeObj2.style.height = '1px';
1191		iframeObj2.style.width = '1px';
1192		
1193		//// fix for EI frame problem on time dropdowns 09/30/2006
1194		// Added fixed for HTTPS
1195		iframeObj2.src = 'blank.html';
1196		iframeObj.src = 'blank.html';
1197		document.body.appendChild(iframeObj2);  // gfb move this down AFTER the .src is set
1198		document.body.appendChild(iframeObj);
1199		*/
1200	}
1201
1202	calendarDiv = document.createElement('DIV');
1203	calendarDiv.id = 'calendarDiv';
1204	calendarDiv.style.zIndex = 1000;
1205	slideCalendarSelectBox();
1206
1207	document.body.appendChild(calendarDiv);
1208	writeBottomBar();
1209	writeTopBar();
1210
1211
1212
1213	if(!currentYear){
1214		var d = new Date();
1215		currentMonth = d.getMonth();
1216		currentYear = d.getFullYear();
1217	}
1218	writeCalendarContent();
1219
1220
1221
1222}
1223
1224function setTimeProperties()
1225{
1226	if(!calendarDisplayTime){
1227		document.getElementById('timeBar').style.display='none';
1228		document.getElementById('timeBar').style.visibility='hidden';
1229		document.getElementById('todaysDateString').style.width = '100%';
1230
1231
1232	}else{
1233		document.getElementById('timeBar').style.display='block';
1234		document.getElementById('timeBar').style.visibility='visible';
1235		document.getElementById('hourDropDown').style.top = document.getElementById('calendar_minute_txt').parentNode.offsetHeight + calendarContentDiv.offsetHeight + document.getElementById('topBar').offsetHeight + 'px';
1236		document.getElementById('minuteDropDown').style.top = document.getElementById('calendar_minute_txt').parentNode.offsetHeight + calendarContentDiv.offsetHeight + document.getElementById('topBar').offsetHeight + 'px';
1237		document.getElementById('minuteDropDown').style.right = '50px';
1238		document.getElementById('hourDropDown').style.right = '50px';
1239		document.getElementById('todaysDateString').style.width = '115px';
1240	}
1241}
1242
1243function calendarSortItems(a,b)
1244{
1245	return a/1 - b/1;
1246}
1247
1248
1249function displayCalendar(inputField,format,buttonObj,displayTime,timeInput)
1250{
1251	if(displayTime)calendarDisplayTime=true; else calendarDisplayTime = false;
1252	if(inputField.value.length>0){
1253
1254		if(!format.match(/^[0-9]*?$/gi)){
1255			var items = inputField.value.split(/[^0-9]/gi);
1256			var positionArray = new Array();
1257			positionArray['m'] = format.indexOf('mm');
1258			if(positionArray['m']==-1)positionArray['m'] = format.indexOf('m');
1259			positionArray['d'] = format.indexOf('dd');
1260			if(positionArray['d']==-1)positionArray['d'] = format.indexOf('d');
1261			positionArray['y'] = format.indexOf('yyyy');
1262			positionArray['h'] = format.indexOf('hh');
1263			positionArray['i'] = format.indexOf('ii');
1264
1265			var positionArrayNumeric = Array();
1266			positionArrayNumeric[0] = positionArray['m'];
1267			positionArrayNumeric[1] = positionArray['d'];
1268			positionArrayNumeric[2] = positionArray['y'];
1269			positionArrayNumeric[3] = positionArray['h'];
1270			positionArrayNumeric[4] = positionArray['i'];
1271
1272
1273			positionArrayNumeric = positionArrayNumeric.sort(calendarSortItems);
1274			var itemIndex = -1;
1275			currentHour = '00';
1276			currentMinute = '00';
1277			for(var no=0;no<positionArrayNumeric.length;no++){
1278				if(positionArrayNumeric[no]==-1)continue;
1279				itemIndex++;
1280				if(positionArrayNumeric[no]==positionArray['m']){
1281					currentMonth = items[itemIndex]-1;
1282					continue;
1283				}
1284				if(positionArrayNumeric[no]==positionArray['y']){
1285					currentYear = items[itemIndex];
1286					continue;
1287				}
1288				if(positionArrayNumeric[no]==positionArray['d']){
1289					tmpDay = items[itemIndex];
1290					continue;
1291				}
1292				if(positionArrayNumeric[no]==positionArray['h']){
1293					currentHour = items[itemIndex];
1294					continue;
1295				}
1296				if(positionArrayNumeric[no]==positionArray['i']){
1297					currentMinute = items[itemIndex];
1298					continue;
1299				}
1300			}
1301
1302			currentMonth = currentMonth / 1;
1303			tmpDay = tmpDay / 1;
1304		}else{
1305			var monthPos = format.indexOf('mm');
1306			currentMonth = inputField.value.substr(monthPos,2)/1 -1;
1307			var yearPos = format.indexOf('yyyy');
1308			currentYear = inputField.value.substr(yearPos,4);
1309			var dayPos = format.indexOf('dd');
1310			tmpDay = inputField.value.substr(dayPos,2);
1311
1312			var hourPos = format.indexOf('hh');
1313			if(hourPos>=0){
1314				tmpHour = inputField.value.substr(hourPos,2);
1315				currentHour = tmpHour;
1316			}else{
1317				currentHour = '00';
1318			}
1319			var minutePos = format.indexOf('ii');
1320			if(minutePos>=0){
1321				tmpMinute = inputField.value.substr(minutePos,2);
1322				currentMinute = tmpMinute;
1323			}else{
1324				currentMinute = '00';
1325			}
1326		}
1327	}else{
1328		var d = new Date();
1329		currentMonth = d.getMonth();
1330		currentYear = d.getFullYear();
1331		currentHour = '08';
1332		currentMinute = '00';
1333		tmpDay = d.getDate();
1334	}
1335
1336	inputYear = currentYear;
1337	inputMonth = currentMonth;
1338	inputDay = tmpDay/1;
1339
1340
1341	if(!calendarDiv){
1342		initCalendar();
1343	}else{
1344		if(calendarDiv.style.display=='block'){
1345			closeCalendar();
1346			return false;
1347		}
1348		writeCalendarContent();
1349	}
1350
1351
1352
1353	returnFormat = format;
1354	returnDateTo = inputField;
1355	positionCalendar(buttonObj);
1356	calendarDiv.style.visibility = 'visible';
1357	calendarDiv.style.display = 'block';
1358	if(iframeObj){
1359		iframeObj.style.display = '';
1360		iframeObj.style.height = '140px';
1361		iframeObj.style.width = '195px';
1362		
1363		
1364		/*
1365		iframeObj2.style.display = '';
1366		iframeObj2.style.height = '140px';
1367		iframeObj2.style.width = '195px';
1368		*/
1369	}
1370
1371	setTimeProperties();
1372	updateYearDiv();
1373	updateMonthDiv();
1374	updateMinuteDiv();
1375	updateHourDiv();
1376
1377}
1378
1379function displayCalendarSelectBox(yearInput,monthInput,dayInput,hourInput,minuteInput,buttonObj)
1380{
1381	if(!hourInput)calendarDisplayTime=false; else calendarDisplayTime = true;
1382
1383	currentMonth = monthInput.options[monthInput.selectedIndex].value/1-1;
1384	currentYear = yearInput.options[yearInput.selectedIndex].value;
1385	if(hourInput){
1386		currentHour = hourInput.options[hourInput.selectedIndex].value;
1387		inputHour = currentHour/1;
1388	}
1389	if(minuteInput){
1390		currentMinute = minuteInput.options[minuteInput.selectedIndex].value;
1391		inputMinute = currentMinute/1;
1392	}
1393
1394	inputYear = yearInput.options[yearInput.selectedIndex].value;
1395	inputMonth = monthInput.options[monthInput.selectedIndex].value/1 - 1;
1396	inputDay = dayInput.options[dayInput.selectedIndex].value/1;
1397
1398	if(!calendarDiv){
1399		initCalendar();
1400	}else{
1401		writeCalendarContent();
1402	}
1403
1404
1405
1406	returnDateToYear = yearInput;
1407	returnDateToMonth = monthInput;
1408	returnDateToDay = dayInput;
1409	returnDateToHour = hourInput;
1410	returnDateToMinute = minuteInput;
1411
1412
1413
1414
1415	returnFormat = false;
1416	returnDateTo = false;
1417	positionCalendar(buttonObj);
1418	calendarDiv.style.visibility = 'visible';
1419	calendarDiv.style.display = 'block';
1420	if(iframeObj){
1421		iframeObj.style.display = '';
1422		iframeObj.style.height = calendarDiv.offsetHeight + 'px';
1423		iframeObj.style.width = calendarDiv.offsetWidth + 'px';
1424		
1425		//// fix for EI frame problem on time dropdowns 09/30/2006
1426		/*
1427		iframeObj2.style.display = '';
1428		iframeObj2.style.height = calendarDiv.offsetHeight + 'px';
1429		iframeObj2.style.width = calendarDiv.offsetWidth + 'px'
1430		*/
1431	}
1432	setTimeProperties();
1433	updateYearDiv();
1434	updateMonthDiv();
1435	updateHourDiv();
1436	updateMinuteDiv();
1437
1438}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.