function Browser() {
	var ua, s, i;
	this.isIE    = false;
	this.isNS    = false;
	this.version = null;
	ua = navigator.userAgent;
	s = "MSIE";
	if ((i = ua.indexOf(s)) >= 0) {
		this.isIE = true;
		this.version = parseFloat(ua.substr(i + s.length));
		return;
	}
	s = "Netscape6/";
	if ((i = ua.indexOf(s)) >= 0) {
		this.isNS = true;
		this.version = parseFloat(ua.substr(i + s.length));
		return;
	}
	s = "Gecko";
	if ((i = ua.indexOf(s)) >= 0) {
		this.isNS = true;
		this.version = 6.1;
		return;
	}
}
function showHideDiv(id, status){
	var divObj = document.getElementById(id);
	if(status) {
		divObj.style.visibility = "visible"; 
		divObj.style.display = "block"; 
	}else{
		divObj.style.visibility = "hidden"; 
		divObj.style.display = "none"; 
	}
}
var browser = new Browser();
function setDivWindow(event,divId){
	showHideDiv(divId,'1');
	var x;
	var y;
	if (browser.isIE) {
		x = window.event.clientX + document.documentElement.scrollLeft
		+ document.body.scrollLeft;
		y = window.event.clientY + document.documentElement.scrollTop
		+ document.body.scrollTop;
	}
	if (browser.isNS) {
		x = event.clientX + window.scrollX;
		y = event.clientY + window.scrollY;
	}
	var divWidht = document.getElementById(divId).offsetWidth;
	document.getElementById(divId).style.left= x - (parseInt(divWidht) / 2)  + 'px';
	document.getElementById(divId).style.top= y - 65 + 'px';
}	