function submitForm(theForm, theButton, fuseaction, theAction)
	{
	if(theAction == null)
		{
		theForm.action = "index.cfm";
		}
	else
		{
		theForm.action = theAction;
		}
	theForm.fuseaction.value = fuseaction;
	document.getElementById(theButton).value = "Please Wait...";
	document.getElementById(theButton).disabled = true;
	theForm.submit();
	}


function popWin(url, features)
	{
	window.open(url, '', features);
	}
	
function moveOption(fromItem, toItem)
	{
	var locationIndex = fromItem.selectedIndex;
	if(locationIndex >= 0)
		{
		var locationVal = fromItem.options[locationIndex].value;
		var locationDisplay = fromItem.options[locationIndex].text;
		fromItem.options[locationIndex] = null;
		toItem[toItem.options.length]=new Option(locationDisplay, locationVal, false);
		sortSelect(toItem);
		}	
	}
	
function selectAllSelect(obj)
	{
	for(i=0; i<obj.options.length; i++)
		{
		obj.options[i].selected = true;
		}
	}
	
function sortSelect(obj) {
	var o = new Array();
	if (obj.options.length <= 0) { return; }
	for (var i=0; i<obj.options.length; i++) {
		o[o.length] = new Option( obj.options[i].text, obj.options[i].value, obj.options[i].defaultSelected, obj.options[i].selected) ;
		}
	if (o.length==0) { return; }
	o = o.sort( 
		function(a,b) { 
			if ((a.text+"") < (b.text+"")) { return -1; }
			if ((a.text+"") > (b.text+"")) { return 1; }
			return 0;
			} 
		);

	for (var i=0; i<o.length; i++) {
		obj.options[i] = new Option(o[i].text, o[i].value, o[i].defaultSelected, o[i].selected);
		}
	}

