function MouseEvent(e) 
{
	if(e) {
	  this.e = e; 
	} else {
	  this.e = window.event; 
	}
	
	if(e.pageX) { //NOT IE
		this.x = e.pageX; 
	} 
	else { //for IE
		scrollX = document.documentElement.scrollLeft;	
		this.x = e.clientX + scrollX; 
	}
	
	
	if(e.pageY) { //NOT IE
		this.y = e.pageY; 
	} 
	else { //for IE
		scrollY = document.documentElement.scrollTop;	
		this.y = e.clientY + scrollY; 
	}
	
	if(e.target) {
	  this.target = e.target; 
	} else {
	  this.target = e.srcElement;
	}
}


function showArea(divArea)
{
	if ($(divArea))
		$(divArea).style.display = 'block';
}
function inlineArea(divArea)
{
	if ($(divArea))
		$(divArea).style.display = 'inline';
}

function hideArea(divArea)
{
	if ($(divArea))
		$(divArea).style.display = 'none';
}

function hideArea2(divArea,btn)
{
	var imgObj = $(btn);
	var imgSrc = imgObj.src;
	if ($(divArea)){
		$(divArea).style.display = 'none';
		imgObj.src = imgSrc.replace("On", "Off");
	}
}


function switchArea(divArea)
{
	if ($(divArea)) {
		if ($(divArea).style.display == 'block' || $(divArea).style.display == '')
			$(divArea).style.display = 'none';
		else
			$(divArea).style.display = 'block';
	}
}

function switchArea2(divArea,btn)
{
var imgObj = $(btn);
var imgSrc = imgObj.src;

	if ($(divArea)) {
		if ($(divArea).style.display == 'block' || $(divArea).style.display == '')
		{
			$(divArea).style.display = 'none';
			imgObj.src = imgSrc.replace("On", "Off");
		}
		else
		{
			$(divArea).style.display = 'block';
			imgObj.src = imgSrc.replace("Off", "On");
		}
	}
}


function getAutoDimensions(objID) {
	obj = $(objID);
	var xy = new Array();
	xy[0] = (obj.clientWidth) ? obj.clientWidth : obj.innerWidth;
	xy[1] = (obj.clientHeight) ? obj.clientHeight : obj.innerHeight;
	return xy;

}

function getAbsolutePosition(objID) {
	var obj = top.$(objID);
	var leftY = topY = 0;
	if (obj.offsetParent) {
		leftY = obj.offsetLeft;
		topY = obj.offsetTop;
		while (obj = obj.offsetParent) {
			leftY += obj.offsetLeft;
			topY += obj.offsetTop;
		}
	}	
	var ap = new Array();
	ap[0] = leftY;
	ap[1] = topY;
	return ap;
}