var browserName=navigator.appName; 
var browserVer=parseInt(navigator.appVersion); 
var winHeight=0; var winWidth=0; //predefined sreen size
if (self.screen) {
	winWidth = screen.width;
	winHeight = screen.height;
}

function Left(obj) {
	var curleft = 0;

	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft;
			obj = obj.offsetParent;
		}
	}
	else if (obj.x) {
		curleft += obj.x;
	}

	return curleft;
}

function Top(obj) {
	var curtop = 0;
	
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop;
			obj = obj.offsetParent;
		}
	}
	else if (obj.y) {
		curtop += obj.y;
	}

	return curtop;
}

function getObj(objID) {
    
    if (document.getElementById) {
    	return document.getElementById(objID);
    }
    else if (document.all) {
    	return document.all[objID];
    }
    else if (document.layers) {
    	return document.layers[objID];
    }
}

function show_win_center(name, src,width,height) {
	x = winWidth/2 - width/2;
	y = winHeight/2 - height/2;
	window.open(src, name, 'width=' + width + ',height=' + height + ',left=' + x + ',top=' + y + ',directories=no,location=no,menubar=no,resizable=yes,scrollbars=yes,statusbar=no,toolbar=no');	
}
function empty() {}
