
	function SelectListItem( aForm, aList, aValue )
	{
		var formObject = document.forms[aForm];

		for ( i = 0; i < formObject.elements[aList].length; i++ )
		if ( formObject.elements[aList].options[i].value == aValue )
		{
			formObject.elements[aList].selectedIndex = i;
		}
	}

	function InsertListItem( aForm, aList, aText, aValue )
	{
		var formObject = document.forms[aForm];
		var optionObject = new Option( aText, aValue );
		var optionRank = formObject.elements[aList].options.length;
		formObject.elements[aList].options[optionRank] = optionObject;
		formObject.elements[aList].selectedIndex = optionRank;
	}

	function DeleteListItem( aForm, aList )
	{
		var formObject = document.forms[aForm];
		var optionRank = formObject.elements[aList].options.length;
		if ( formObject.elements[aList].selectedIndex != -1 && formObject.elements[aList].options.length != 0 )
		{
			formObject.elements[aList].options[optionRank] = null;
		}
	}

	function OpenWindow( url, name, params )
	{
		var WindowHandle = window.open( url, name, params );
		if ( WindowHandle )
		{
			WindowHandle.focus();
			return false;
		}
		else return true;
	}

	function PopUp( WindowName, WindowWidth, WindowHeight, URL )
	{
	
		return OpenWindow( URL, WindowName, 'width=' + WindowWidth + ',height=' + WindowHeight + ',location=no,toolbar=no,status=no,menubar=no,scrollbars=yes' );
	
	}

	function CloseWindow( aForm, aList, aText, aValue )
	{
		if ( aValue != "" )
		{
			if ( aText != "" ) opener.InsertListItem( aForm, aList, aText, aValue );
			else opener.SelectListItem( aForm, aList, aValue );
		}
		opener.focus();
		window.close();
	}