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

	function openFullWindow(url) {
		mywin = window.open(url,"outsidewindow", 'favorites=1,toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1');
	}

	function openSmallWindow(url) {
		mywin = openWindow("Window", url, 240, 320);
	}

	function openBigWindow(url) {
		mywin = openWindow("Window", url, 800, 600);
	}

	function openWindow(title, url, w, h) {
		var winl = (screen.width - w) / 2;
		var wint = (screen.height - h) / 2;
		
		var winprops = "top="+wint+",left="+winl+",height="+h+",width="+w+",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0";
		mywin = window.open(url, title, winprops);
		return mywin;
	}

// -- 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>");
	}
	
// ------------------------------------------------------------------------------------------

	
	

