/************************\
 ]		CALENDAR.JS		[
\************************/
function findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		do {
			curleft += obj.offsetLeft;
			curtop += obj.offsetTop;
		} while (obj = obj.offsetParent);
	}
	return [curleft,curtop];
}

function toggleOn(div,a){
	var aPos=findPos(a)

	//alert(navigator.appName);
	//if (navigator.appName=='Microsoft Internet Explorer'){
		//div.style.left=aPos[0]+(a.offsetWidth/5)+'px';
		div.style.left=aPos[0]-a.offsetWidth+'px';
		div.style.top=aPos[1]+(a.offsetHeight-2)+'px';
	/*} else {
		div.style.left=aPos[0]+(a.offsetWidth/2)+'px';
		div.style.top=aPos[1]+(a.offsetHeight-2)+'px';
	}*/

	if (div!=null){
		//safe function to show an element with a specified id
		if (document.getElementById) { // DOM3 = IE5, NS6
			div.style.display = 'block';
		} else {
			if (document.layers) { // Netscape 4
				document.div.display = 'block';
			} else { // IE 4
				document.all.div.style.display = 'block';
			}
		}//UNHIDE BY BROWSER
	}//DIV != NULL
}

function toggleOff(div){
	if (div!=null){
		//safe function to show an element with a specified id
		if (document.getElementById) { // DOM3 = IE5, NS6
			div.style.display = 'none';
		} else {
			if (document.layers) { // Netscape 4
				document.div.display = 'none';
			} else { // IE 4
				document.all.div.style.display = 'none';
			}
		}//UNHIDE BY BROWSER
	}//DIV != NULL
}

function keepOn(div){
	if (div!=null){
		//safe function to show an element with a specified id
		if (document.getElementById) { // DOM3 = IE5, NS6
			div.style.display = 'block';
		} else {
			if (document.layers) { // Netscape 4
				document.div.display = 'block';
			} else { // IE 4
				document.all.div.style.display = 'block';
			}
		}//UNHIDE BY BROWSER
	}//DIV != NULL
}

function keepOff(div){
	if (div!=null){
		//safe function to show an element with a specified id
		if (document.getElementById) { // DOM3 = IE5, NS6
			div.style.display = 'none';
		} else {
			if (document.layers) { // Netscape 4
				document.div.display = 'none';
			} else { // IE 4
				document.all.div.style.display = 'none';
			}
		}//UNHIDE BY BROWSER
	}//DIV != NULL
}


/*=========*/


function showEventBlowup(a) {
	var div=a.childNodes[1];
	//alert(div.parentNode.parentNode.nodeName);

	//ALLOW OVERFLOW IN THE TD
	div.parentNode.parentNode.style.overflow='visible';

	if (div!=null){
		//safe function to show an element with a specified id
		if (document.getElementById) { // DOM3 = IE5, NS6
			div.style.display = 'block';
		} else {
			if (document.layers) { // Netscape 4
				document.div.display = 'block';
			} else { // IE 4
				document.all.div.style.display = 'block';
			}
		}//UNHIDE BY BROWSER
	}//IF div ISN'T NULL
}
function hideEventBlowup(a) {
	var div=a.childNodes[1];

	if (div!=null){
		//safe function to hide an element with a specified id
		if (document.getElementById) { // DOM3 = IE5, NS6
			div.style.display = 'none';
		} else {
			if (document.layers) { // Netscape 4
				document.div.display = 'none';
			} else { // IE 4
				document.all.div.style.display = 'none';
			}
		}//UNHIDE BY BROWSER
	}//IF div ISN'T NULL
}