// Window opener function
function open_window (strURL)
{
	window.open(strURL,"win",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=520,height=350');
}

function open_window (strURL, strOptions)
{
	strOptions = "toolbar=0,location=1,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,left=0,top=0,width=" + screen.width + ",height=" + (screen.height - 25)
	newWindow = window.open(strURL, "win", strOptions);
	newWindow.focus();
}

function openLanguageWindow(strID, strLangType, strAbbrevName)
{
	//open Language Window
	var strOptions = "";
	var strURL = "";
	
	//build URL, passing all necessary data
	strURL = "MultiLanguageSupport.asp?ID=" + strID + "&Type=" + escape(strLangType) + "&AbbrevName=" + strAbbrevName
	
	//build options
	strOptions = "toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,left=" + ((screen.width - 650) / 2) + ",top=" + ((screen.height - 450) / 2) + ",width=650,height=450"
	
	//open the new window
	window.open(strURL, "MultiLanguageSupport", strOptions);
}

function openMessageInfoWindow (strURL)
{
	strOptions = "toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,left=15,top=15,width=750,height=" + (screen.height - 120)
	newWindow = window.open(strURL, "Comm_MessageInfo", strOptions);
	newWindow.focus();
}

// Mimic of the VB Script function Trim.
function Trim(strString)
{
	return LTrim(RTrim(strString));
}

// Mimic of the VB Script function LTrim.
function LTrim(strString)
{
	return strString.replace(/^\s+/, '');
}

// Mimic of the VB Script function RTrim.
function RTrim(strString)
{
	return strString.replace(/\s+$/, '');
}
