<!--
var version4 = (navigator.appVersion.charAt(0) == "4"); 
var popupHandle;

function closePopup() {
	if(popupHandle != null && !popupHandle.closed) popupHandle.close();
	}

function displayPopup(url,formfield,formname) {
	var properties = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=170,height=220"
	var leftprop, topprop, screenX, screenY, cursorX, cursorY, padAmt;
	if(navigator.appName == "Microsoft Internet Explorer") {
		screenY = document.body.offsetHeight;
		screenX = window.screen.availWidth;
	}
	else {
		screenY = window.outerHeight
		screenX = window.outerWidth
	}
	cursorX = (version4 ? event : null).screenX;
	cursorY = (version4 ? event : null).screenY;
	padAmtX = 10;
	padAmtY = 10;
	if((cursorY + 170 + padAmtY) > screenY) {
		// make sizes a negative number to move left/up
		padAmtY = (-30) + (170 * -1);
		// if up or to left, make 30 as padding amount
	}
	if((cursorX + 220 + padAmtX) > screenX)	{
		padAmtX = (-30) + (220 * -1);	
		// if up or to left, make 30 as padding amount
	}
	if(navigator.appName == "Microsoft Internet Explorer") {
		leftprop = cursorX + padAmtX;
		topprop = cursorY + padAmtY;
	}
	else{
		leftprop = (cursorX - pageXOffset + padAmtX);
		topprop = (cursorY - pageYOffset + padAmtY);
	}
	if((version4 ? event : null) != null) {
		properties = properties + ", left = " + leftprop;
		properties = properties + ", top = " + topprop;
	}

	closePopup();
	var myURL;
	var strIniDate = "document." + formname +"." + formfield + ".value"
	
	myURL = url + "?initialdate=" + escape(eval(strIniDate));
	myURL = myURL + "&formfield=" + formfield
	myURL = myURL + "&formname=" + formname

	popupHandle = window.open(myURL,"Calendar",properties);
}
//-->