// COMMON FILES REQUIRE JQUERY (jquery-latest.js)


/* ------------------ ROW STRIPING TABLES ------------ */

//$(document).ready(function(){
//$(".dataTable tr").mouseover(function() {$(this).addClass("over");}).mouseout(function() {$(this).removeClass("over");});
//$(".dataTable tr:even").addClass("alt");
//});

function TB_position(layer,width,height) {
	var pagesize = getPageSize();	
	var arrayPageScroll = getPageScrollTop();
	$("#"+layer).css({left: ((pagesize[0] - width)/2)+"px", top: (arrayPageScroll[1] + ((pagesize[1]-height)/2))+"px" });
}

function getPageScrollTop(){
	var yScrolltop;
	if (self.pageYOffset) {
		yScrolltop = self.pageYOffset;
	} else if (document.documentElement && document.documentElement.scrollTop){	 // Explorer 6 Strict
		yScrolltop = document.documentElement.scrollTop;
	} else if (document.body) {// all other Explorers
		yScrolltop = document.body.scrollTop;
	}
	arrayPageScroll = new Array('',yScrolltop) 
	return arrayPageScroll;
}

function getPageSize(){
	var de = document.documentElement;
	var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
	var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight;
	
	arrayPageSize = new Array(w,h) 
	return arrayPageSize;
}


function set_page(section)
{
	var pageSize = getPageSize();
	$("#"+section+" .left").width('200px');
	$("#"+section+" .right").width((pageSize[0]-215) + "px");
	$("#"+section+" .left").height(pageSize[1] - $("#"+section+" .heading").height()-10+"px");
	$("#"+section+" .right").height(pageSize[1]- $("#"+section+" .heading").height()+"px");
	
	//alert($("#"+section+" .right").width());
}

var posX = 0;
var posY = 0;

window.document.onmousemove = getMouseXY;

function getMouseXY(e) {

	if(navigator.appName == "Netscape"){
		posX = e.pageX
	 	posY = e.pageY

	} else {
		posX = event.clientX + document.body.scrollLeft
 		posY = event.clientY + document.body.scrollTop
	}

	if (posX <= 0) {posX = 0} 
	if (posY <= 0) {posY = 0}   
 	return true
}