var currCal;

function BodyClick(){
	// removed because of compatibility issues
	}

function ShowCal(button,event){
	x=0;
	y=0;

	if (window.event){
		// get IE mouse click x/y accounting for strict mode
		ie=(document.compatMode && document.compatMode != "BackCompat")? document.documentElement : document.body
		x=window.event.clientX+(document.all? ie.scrollLeft : pageXOffset);
		y=window.event.clientY+(document.all? ie.scrollTop : pageYOffset);
		}
	else{
		// get Firefox, NS, etc
		x=event.clientX;
		y=event.clientY;
		x+=window.pageXOffset;
		y+=window.pageYOffset;
		}

	calFrame=document.getElementById('cal');
	calFrame.style.left=x+2;
	calFrame.style.top=y+2;
	Effect.Appear('cal',{duration: 0.3});
	}

function CalClick(y, m, d){
	Effect.Fade('cal',{duration: 1.5});
	document.dateselector.mon1.selectedIndex=m-1;
	document.dateselector.day1.selectedIndex=d-1;
	document.dateselector.year1.selectedIndex=y;
	}

function CloseCal(){
	Effect.Fade('cal',{duration: 1.5});
	}

function setSelectors(){
	dt=new Date();
	y=dt.getFullYear();

	document.getElementById("year1").options[0]=new Option(y);
	document.getElementById("year1").options[1]=new Option(y+1);
	document.getElementById("mon1").selectedIndex=dt.getMonth();
	document.getElementById("day1").selectedIndex=dt.getDate()-1;

	dt.setTime(dt.getTime()+259200000);
	document.getElementById("year2").options[0]=new Option(y);
	document.getElementById("year2").options[1]=new Option(y+1);
	if (y != dt.getFullYear()){
		document.getElementById("year2").selectedIndex=1;
		}
	document.getElementById("mon2").selectedIndex=dt.getMonth();
	document.getElementById("day2").selectedIndex=dt.getDate()-1;
	}
