
var itsonview=false;
var httpObject = null;
var globalEditField='';
var inline_edit_allowed=true;

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 checkField(src,label)
{
	if (src.value.trim()=='')
	{
		alert('Please enter '+label);
		src.focus();
		return false;
	}
	else
		return true;
}
function openWindow(_url, _width, _height)
{
	_name = Math.round(Math.random()*10000);
	var myWindow = window.open (_url, _name, "resizable=yes,scrollbars=yes,status=1,location=0,width="+_width+",height="+_height);
	if (navigator.appName=='Netscape') 
		myWindow.focus(); 
}
function catchKey(e, form_name, skip_fields)
{
    var isIE = (navigator.userAgent.indexOf("MSIE") != -1);
    key = (isIE) ? key = event.keyCode : e.which;
    if (key == 13)
    {
		if (skip_fields)
			document.forms[form_name].submit();
		else if (document.forms[form_name].elements['login'].value!='' && document.forms[form_name].elements['password'].value!='')
			document.forms[form_name].submit();
    }
}
//
function show(divId)
{
	var id = document.getElementById(divId);
	id.style.display = 'inline';
}
//
function fnhide(divId)
{
	var id = document.getElementById(divId);
	id.style.display = 'none';
}
//
function getObj(n)
{
	return document.getElementById(n);
}
