// open a generic popup window, specifying source and size

	function popup(source,width,height) {
		window.open(source,"popup","width="+String(width)+",height="+String(height)+",location=no,menubar=no,directories=no,toolbar=no,scrollbars=auto,resizable=yes,status=no");
	}


// parse a URL that contains a plain list of unnamed args (you can use just one of these two lines)

	argString = document.URL.substring(document.URL.indexOf('?') + 1, document.URL.length)
	argList = document.URL.substring(document.URL.indexOf('?') + 1, document.URL.length).split(",")


// parse a URL that contains name/value pairs, as in the content extractor after version 2.1 (you can use just one of these two lines)

	argString = document.URL.substring(document.URL.indexOf('args=') + 5, document.URL.length)
	argList = document.URL.substring(document.URL.indexOf('args=') + 5, document.URL.length).split(",")


// the simplest possible rollover function

	function swap(name,state) {
		eval('document.images.' + name + '.src = ' + name + '_' + String(state) + '.src')
	}
	

// rollovers with sticky highlights
// - used in navigation frames where the buttons persist but other pages are changing

	var previous = null
	var current = null

	function stickySwap(name,state,hold) {
		if (hold == 1) {
			// set previously lit button to normal
			previous = current
			if (previous != null) {
				eval('document.images.' + previous + '.src = ' + previous + '_0.src')
			}
		}
		if ((name != null) && (name != current)) {
			// set new button state
			eval('document.images.' + name + '.src = ' + name + '_' + String(state) + '.src')
			if (hold == 1) {current = name}
		}
	}
	

// set a base text size for each platform; can be used in conjunction with static font tags for face and color
// remember to close this tag with a static </font> later in your document	

	function baseText(mac,win) {
		if (navigator.appVersion.indexOf("Mac") != -1) {
			document.write("<font face=verdana,geneva,arial size="+mac+">")
		} else {
			document.write("<font face=verdana,geneva,arial size="+win+">")
		}
	}


// post all the fields in the current form to the specified URL

	function postTo(page_URL) {
		document.main.action = page_URL
		document.main.submit()
	}


// submit the current form to the specified URL, then redirect

	function submitTo(script_URL,redirect_URL) {
		document.main.action = script_URL
		document.main.redirect.value = redirect_URL
		document.main.submit()
	}
	

// this is handy for preventing the Return key from submitting forms (set form action to "JavaScript:nothing()"
	
	function nothing() {}


// set date menus to a new date

	function selectDate(menu_name,new_date) {
		if (new_date == "") {
			date = new Date()
			
			day = date.getDate()
			month = date.getMonth() + 1
			year = date.getYear()
			
		} else {
			date = new_date
			
			year = date.substring(0,date.indexOf("-"))
			month = date.substring(date.indexOf("-")+1,date.lastIndexOf("-"))
			day = date.substring(date.lastIndexOf("-")+1)
			
		}
				
		eval("document." + menu_name + "_month.selectedIndex = month")
		eval("document." + menu_name + "_day.selectedIndex = day")
		eval("document." + menu_name + "_year.selectedIndex = year - document." + menu_name + "_year.options[1].value + 1")
	}


