var dbName     = "TheAnatomyBowl";
var serverUrl  = location.hostname;
var serverPort = "9500";
if (serverUrl == "209.98.146.172")
{
	serverPort = "9510";
}

function Help(content)
{
	alert("When Help is implemented, a small secondary window will appear above the main window. This window will contain HTML help for this tool.");
}

function MessageClear(win)
{
	win.document.getElementById("message").innerHTML = "&nbsp;";
}

function MessageError(win,msg)
{
	win.document.getElementById("message").innerHTML = "<font color='#FF0000'><b><blink>" + msg + "</blink></b></font>";
}

function MessageNormal(win,msg)
{
	win.document.getElementById("message").innerHTML = "<blink>" + msg + "</blink>";
}

function Trimmed(txt)
{
	if (txt != null)
	{
		while ((txt.substr(0,1) <= " ") && (txt.length > 0))
		{
			txt = txt.substr(1);
		}
		while ((txt.substr(txt.length - 1,1) <= " ") && (txt.length > 0))
		{
			txt = txt.substr(0, txt.length - 1);
		}
	}
	return txt;
}

function ZeroPadded(val,len)
{
	var rtnVal = ("00000000000" + val);
	return rtnVal.substr(rtnVal.length - len);
}
