<!--
function launchit(newURL, newName, newFeatures, orgName) {
  var NewWindow = window.open(newURL, newName, newFeatures);
  if (NewWindow.opener == null) NewWindow.opener = self;
  NewWindow.opener.name = orgName;
  NewWindow.focus();
  return NewWindow;
}

//NEW - centers the popup
function popUp(mylink) { 
	if (!window.focus) return true; // Don't know what this does but .focus() does not return a value
	var href = (typeof(mylink) == 'string') ? mylink : mylink.href;
	var Width = (arguments.length > 1) ? arguments[1] : 750;
	var Height = (arguments.length > 2) ? arguments[2] : 500;
	var Name = (arguments.length > 3 && arguments[3].length > 0) ? arguments[3] : mylink.target;
	var ExtraFeatures = (arguments.length > 4 && arguments[4].length > 0) ? arguments[4] : 'resizable=1,scrollbars=1,status=1,toolbar=1';
	var leftPos = 5, topPos = 5;
	if (screen) {
		leftPos = (screen.width / 2) - (Width / 2);
		topPos = (screen.height / 2) - (Height / 2);
	}
	var Features = (ExtraFeatures.length > 1) ? "screenX=" + leftPos + ",left=" + leftPos + ",screenY=" + topPos + ",top=" + topPos + ",width=" + Width + ",height=" + Height + "," + ExtraFeatures : "screenX=" + leftPos + ",left=" + leftPos + ",screenY=" + topPos + ",top=" + topPos + ",width=" + Width + ",height=" + Height;
	//var Features = (ExtraFeatures.length > 1) ? "width=" + Width + ",height=" + Height + "," + ExtraFeatures : "width=" + Width + ",height=" + Height;
//alert('DEBUG Name: ' + Name + ', Features: ' + Features + ', href: ' + href + ', orgName: ' + (window.name==''?'main':window.name));
	launchit(href, Name, Features, (window.name==''?'main':window.name));
	return false;
}

/* OLDER
// Replaces "load_url", "small_popup", "tiny_popup"
function popUp(mylink) { 
	var href, Width = 750, Height = 500, Name = mylink.target;
	
	if (!window.focus) return true;
	if (arguments.length >= 3) { // We've been passed a size
		Width = arguments[1]; Height = arguments[2];
		if (arguments.length >= 4 && arguments[3].length > 0) { Name = arguments[3]; }
	}
	if (typeof(mylink) == 'string')
		href=mylink;
	else
		href=mylink.href;
		
	launchit(href, Name, "height=" + Height + ",width=" + Width + ",screenX=5,left=5,screenY=5,top=5,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=1,toolbar=1", window.name);
	return false;
}
*/
function load_url(inURL) {
	var myRemote = launchit(inURL, "myRemote", "height=500,width=750,screenX=5,left=5,screenY=5,top=5,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=1,toolbar=1", window.name);
}
function small_popup(inURL) {
	var myRemote = launchit(inURL, "myRemote2", "height=420,width=440,screenX=5,left=5,screenY=5,top=5,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0", window.name);
}
function tiny_popup(inURL) {
	var myRemote = launchit(inURL, "myRemote3", "height=50,width=100,screenX=5,left=5,screenY=5,top=5,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0", window.name);
}


function redirect(thisSelect){
	var v = thisSelect.options[thisSelect.selectedIndex].value;
	if (v!="") {
		if (v.indexOf('.lch') != -1 && v.indexOf('Mac.lch') == -1) 
			location.href = v;
		else
			load_url(v);
	}
	thisSelect.selectedIndex = 0;
	return false;
}

function listgoto(thisSelect){
	var v = thisSelect.options[thisSelect.selectedIndex].value;
	if (v!="") {
		location.href = v;
	}
	thisSelect.selectedIndex = 0;
	return false;
}

// According to the Netscape JavaScript Reference manual there isn't a form input type of image.
function HREFSubmit(inText, inAction) {
	if (inText != ''){
		if (confirm(inText)) {
			if (document.forms[0].hiddenaction) {
				document.forms[0].hiddenaction.value = inAction;
			}
			document.forms[0].submit();
		}
	}
	else {
		if (document.forms[0].hiddenaction) {
			document.forms[0].hiddenaction.value = inAction;
		}
		document.forms[0].submit();
	}
	return false;
}
	
function BrowserType()
{
	var AppString = navigator.appName;
	var isNS = (AppString == "Netscape" ); 
	if (isNS )
	{
		var NSVer = parseInt(navigator.appVersion);
		if (NSVer >= 6)
			result = 'n6';
		else if (NSVer >= 5)
			result = 'n5';
		else if (NSVer >= 4)
			result = 'n4';
		else
			result = 'n3';
	}
	else if (AppString.indexOf('Explorer') != -1) 
		result = 'ie';
	else if (AppString.indexOf('Safari') != -1)
		result = 'safari';
		
	return result;
}

function IsOpera() {
	var AppString = navigator.appName
	
	if (AppString.indexOf('Opera') != -1)
		return true

	return false
}

function OSType()
{
	var AppString = navigator.platform;
	var result;
	
	if (AppString.indexOf('Win32') != -1) 
		result = 'win';
	if (AppString.indexOf('Linux') != -1) 
		result = 'linux';
	if (AppString.indexOf('Mac') != -1) 
		result = 'mac';

	return result;
}

// Utility function that returns true if a string only contains whitespace
function isblank(s)
{
	for( var i = 0; i < s.length; i++ ) {
		var c = s.charAt(i);
		if( (c != ' ') && (c != '\n') && (c != '\t') ) return false;
	}
	return true;
}

function getOptionValue(e) {
var oValue;

	for( var j = 0; j < e.options.length; j++ ) {
		if( e.options[j].selected ) {
			oValue = e.options[j].value;
			return oValue; 
			break;
		}
	}
	return true;
}

function alertUser(inMessage) {
	var theMessage, theHRef;
	var pos, pos2;
	var bConfirm = false, rc = true;
			
	pos = inMessage.indexOf("|goHRef=");	pos2 = inMessage.indexOf("|goCHRef=");
	if (pos != -1) {
		theMessage = inMessage.substring(0, pos-1);
		theHRef = inMessage.substring(pos + 8); // 8 is the length of "|goHRef=";
	}
	else if (pos2 != -1) {
		theMessage = inMessage.substring(0, pos2-1);
		theHRef = inMessage.substring(pos2 + 9); // 9 is the length of "|goCHRef=";
		bConfirm = true;
	}
	else
		theMessage = inMessage;
	
	// Show the message			
	if( (theMessage == null) || (theMessage == "") || isblank(theMessage) ) { }
	else {
		if (bConfirm)
			rc = confirm(theMessage);
		else
			alert(theMessage);
	}
	
	if (rc) {
		// Redirect if necessary		
		if( (theHRef == null) || (theHRef == "") || isblank(theHRef) ) { }
		else
			window.location = theHRef;
	}		
	
	return true;
}

function myVoid () { ; } // do nothing