function popup(URL, Width, Height) // nice and easy centred popup window command
{
	if (document.all)
	{
		Available_Width = document.body.clientWidth;
		Available_Height = document.body.clientHeight;
	}
	else if (document.layers)
	{
		Available_Width = window.innerWidth;
		Available_Height = window.innerHeight;
	}
	else
	{
		Available_Width = screen.availWidth;
		Available_Height = screen.availHeight; 
	}

	var Left = (Available_Width - Width) /2;
	var Top = (Available_Height - Height) /2;

	Popup_Window = window.open(URL, '_blank', 'width=' + Width + ',height=' + Height + ',top=' + Top + ',left=' + Left + ',toolbar=no,scrollbars=yes');
	
	return Popup_Window;
}

function isNumberKey(evt)
{
	var charCode = (evt.which) ? evt.which : event.keyCode;

	if (charCode > 31 && (charCode < 48 || charCode > 57) && charCode != 46)
		return false;

	return true;
}

String.prototype.trim = function() {
a = this.replace(/^\s+/, '');
return a.replace(/\s+$/, '');
};

