// ------------------------------------------------------------------------------------------
// -- WRITE TO DOCUMENT FUNCTIONS --
	
	function write (txt) {
		document.write(txt);
	}
	
	
// -- WINDOW FUNCTIONS --

	function openSmallWindow(url) {
		mywin = window.open(url,"win",'height=350,width=250,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0');
	}

	function openWindow(url) {
		mywin = window.open(url,"win",'height=480,width=640, toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1');
	}

// -- TEXT FUNCTIONS --

	function quote(aText) {
		return "\"" + aText + "\"";
	}
		
	function singleQuote(aText) {
		return "'" + aText + "'";
	}

// -- BUTTONS --
	
	function getButtonImage(imageName) {
		var aImage = new Image();
		aImage.src = "images/buttons/" + imageName + ".gif";
		return aImage;
	}
	
	function normalButton(buttonName) {
		document[buttonName].src = eval(buttonName + "n.src");
	}
	
	function rollButton(buttonName) {
		document[buttonName].src = eval(buttonName + "r.src");
	}
	
	function buttonGoto(buttonName, alt, url) {
		
		eval(buttonName + "n = getButtonImage('" + buttonName + "n')");
		eval(buttonName + "r = getButtonImage('" + buttonName + "r')");
		
		document.write("<a href=" + quote (url));
		
		document.write(" onMouseOver=" + quote("rollButton('" + buttonName + "'); window.status='" + alt + "'; return true;"));
		document.write(" onMouseOut=" + quote("normalButton('" + buttonName + "')") + ">");
		
		document.write("<img name=" + quote(buttonName) + " border=0 src=" + quote("images/buttons/"+buttonName+"n.gif") + ">");
		document.write("</a>");
	}
	
// ------------------------------------------------------------------------------------------

	
	
