function openWin(URL,width,height,scroll,resize, status, menubar, toolbar, location, directories) {	noUrl = false		if (URL == "" || URL == null) { URL="about:blank"; noUrl=true }	if (width == "" || width == null ) { width = 640 }	if (height == "" || height == null ) { height = 480 }	if (width == "*" ) { 		width = (screen.availWidth * (100/99)) ;		if (width > 800) width="800"; //since the site isn't wider than 800px, there's no point in opening in fullscreen mode, it just looks silly!	}	if (height == "*" ) { 	height =  (screen.availHeight * (100/95));		if (height > 580) height="580";//since the site isn't taller than 800px, there's no point in opening in fullscreen mode, it just looks silly!	}	if (scroll == "" || scroll == null ) { scroll = 1 }	if (resize == "" || resize == null ) { resize = 1 }	if (status == "" || status == null ) { status = 1 }	if (menubar == "" || menubar == null) {menubar=0}	if (toolbar == "" || toolbar == null) {toolbar=0}	if (location == "" || location == null) {location=0}	if (directories == "" || directories == null) {directories=0}		PARMS = 'toolbar='+toolbar +',location='+location +',directories='+directories +',status='+status +',menubar='+menubar +',scrollbars=' + scroll + ',resizable=' + resize + ',width=' + width + ',height=' + height  var newWin = window.open(URL,"NEW",PARMS);	/* newWin.screenX = 0;  newWin.screenY = 0; */	if (noUrl) {		newWin.document.writeln("<BR><BR><FONT color='red'>It seems like you forgot to put in a value for URL when you called for <I>openWin()</I></FONT>")		newWin.document.close()	}	return;}function openFullScreenWin(u) {		var w = screen.availWidth * (100/100);	var h = screen.availHeight * (100/100);	var parms = 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width='+w+',height='+h+',top=1,left=1';	var windowname = 'fullscreenpop';		var newfullscreenWin = window.open(u,windowname,parms);  	return;	}function getCleanUrl() {	URL = document.URL	myParamStartPos = URL.indexOf("?",0)	if(myParamStartPos>0){		URL = document.URL.substr(0,myParamStartPos)		return URL	}	else return URL}function getParam(name) {	var param;	var idxStart = document.URL.indexOf('?');		if (idxStart >= 0) {		// get the query string, prepend and append & to make searching easier		idxStart += 1;		var url = "&"+document.URL.substring(idxStart, document.URL.length)+"&";				// found the param?		idxStart = url.indexOf("&"+name+"=");		if (idxStart >= 0) {			idxStart += name.length+2;			var idxEnd = url.indexOf("&", idxStart);			param = url.substring(idxStart, idxEnd);		} else debug("Couldn't find param: "+name, "DEBUG");	}		debug("getParam('"+name+"') = "+param, "DEBUG");	return param;} // getParam(name)function changeUrlParams(params){	currentCleanUrl = getCleanUrl()	newUrl = currentCleanUrl + "?" +params	document.location = newUrl}function getServerInfo() { return document.location.host //alert(document.location.port)}//Swaps image// LAF: this doesn't look netscape compatible, especitially with layersfunction swapImage(imgName,imgSrc) {	document.images[imgName].src=imgSrc}// debug level setting for displaying debug messages with the debug() function// this can be set in any javascript file or blockvar DEBUG; // 'DEBUG', 'ERROR', 'WARNING'// debug message alerts// uses the global variable DEBUG // msg = the message to display in the alert// logLevel = only displays the msg if the current log level, or higher, is being used// where log levels are: debug, warning, info// if DEBUG='DEBUG' all messages are shown, i.e. debug, error, and warning messages// if DEBUG='WARNING' only warning and error messages are shown// if DEBUG='ERROR' only error messages are shownfunction debug(msg, logLevel) {	//if (!DEBUG) DEBUG = getParam("DEBUG");	if (!DEBUG || (DEBUG=='')) return; // debugging is turned off	if (!logLevel) logLevel = 'DEBUG'; // default	if (DEBUG != 'DEBUG') {		if ((DEBUG == 'ERROR') && (logLevel != 'ERROR')) return;		if ((DEBUG == 'WARNING') && (logLevel == 'DEBUG')) return;	}	alert('Debug level: '+DEBUG+'\nMessage level: '+logLevel+'\n'+msg);}function returnBASE() {        url = location + "";        // remove the query string if it exists        idxQuery = url.indexOf( '?' );        if ( idxQuery >= 0 ) {                 url = url.substring( 0, idxQuery );        }        // get the BASE        idxLast = url.lastIndexOf( '/' ) + 1;        base = url.substring( 0, idxLast );        return base;} function setBase(form) {        BASE = returnBASE();        form.BASE.value = BASE;}
