
var screenW = 640, screenH = 480;
if (parseInt(navigator.appVersion)>3) {
 screenW = screen.width;
 screenH = screen.height;
}
else if (navigator.appName == "Netscape" 
    && parseInt(navigator.appVersion)==3
    && navigator.javaEnabled()
   ) 
{
 var jToolkit = java.awt.Toolkit.getDefaultToolkit();
 var jScreenSize = jToolkit.getScreenSize();
 screenW = jScreenSize.width;
 screeH = jScreenSize.height;
}

String.prototype.trim = function() {
	return this.replace(/^\s+|\s+$/g,"");
}
String.prototype.ltrim = function() {
	return this.replace(/^\s+/,"");
}
String.prototype.rtrim = function() {
	return this.replace(/\s+$/,"");
}


function MouseHand(oCaller)
{
	oCaller.style.cursor = 'pointer';
}
function MousePointer(oCaller)
{
	oCaller.style.cursor = 'default';
}

function content_replace(sURL, sDivID)
{
//	alert('1');
	$('#' + sDivID).load(sURL);
}

function ShowBalloon(oCaller,ID,lYAdjust, lXAdjust)
{
var oBoo = document.getElementById("balloon" + ID);
oBoo.style.display = 'inline';
oBoo.style.top = findTop(oCaller) + 20 - lYAdjust;

}

function HideBalloon(ID)
{
var oBoo = document.getElementById("balloon" + ID);
oBoo.style.display = 'none';
}

function findTop(obj) 
{
	var curtop = 0;
	if (obj.offsetParent) 
	{
	do {
			curtop += obj.offsetTop;
		} while (obj = obj.offsetParent);
	}
	return curtop;
}


