// JavaScript Document

function makeMenu(thispage) {

	function makeButton(thelink,height) {
		if (thispage==thelink) {
			document.write ('<img name="'+thelink+'" src="images/menu/'+thelink+'-over.gif" width="121" height="'+height+'" border="0" alt="'+thelink+'"><BR>');
		} else {
			document.write ('<a href="'+thelink+'.html" onmouseover="changeImages(\''+thelink+'\', \'images/menu/'+thelink+'-over.gif\'); return true;" onmouseout="changeImages(\''+thelink+'\', \'images/menu/'+thelink+'.gif\'); return true;" onmousedown="changeImages(\''+thelink+'\', \'images/menu/'+thelink+'-over.gif\'); return true;" onmouseup="changeImages(\''+thelink+'\', \'images/menu/'+thelink+'-over.gif\'); return true;"><img name="'+thelink+'" src="images/menu/'+thelink+'.gif" width="121" height="'+height+'" border="0" alt="'+thelink+'"></a><BR>');
		}
	}
	
	document.write ('<div id="menu" style="position:absolute; width:121px; height:115px; z-index:1; left: 47px; top: 150px;">');
	makeButton('nick','26');
	makeButton('bethany','25');
	makeButton('kilian','24');
	makeButton('aidan','23');
	makeButton('susan','23');
	document.write ('<img src="images/global/spacer.gif" width="121" height="25" alt=""><BR>');
	makeButton('other','23');
	document.write ('</div>');

}


function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		nick_over = newImage("images/menu/nick-over.gif");
		bethany_over = newImage("images/menu/bethany-over.gif");
		kilian_over = newImage("images/menu/kilian-over.gif");
		aidan_over = newImage("images/menu/aidan-over.gif");
		susan_over = newImage("images/menu/susan-over.gif");
		other_over = newImage("images/menu/other-over.gif");
		preloadFlag = true;
	}
}


function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function popup(thepage){
makeNewWindow(thepage);}
var newWindow = null;
function makeNewWindow(thepage) {
	var theParams = "width=550,height=450,"
	theParams += "toolbar=no,scrollbars=yes,status=yes,location=no,resizable=yes,menubar=yes"
	var windowName = "Popup"
	var theLocation = thepage;
	newWindow = window.open("",windowName,theParams);
	if (newWindow != null) {
		newWindow.location = theLocation;
	}
}


ns4 = (document.layers)? true:false;
ie4 = (document.all)? true:false;
W3C = document.getElementById ? 1 : 0;

if (ns4 == false) {
	document.write('<style type="text/css">');
	document.write('<!--');
	document.write('td {');
	document.write('line-height: 15px;');
	document.write('}');
	document.write('-->');
	document.write('</style>');
}	