<!--
function preload() {
	if (!document.images){return;}
	ar = new Array();
	args = preload.arguments;
	for (var i = 0; i < args.length; i++) {
		ar[i] = new Image();
		ar[i].src = args[i];
	}
	return;
}

function getFileName(x){
	return x.substring(x.lastIndexOf("/") + 1, x.length).toLowerCase();
}

function rollOver(x, overSrc){
	if(!x.src){x = document.images[x];}
	if(getFileName(x.src) == getFileName(overSrc)){}
	else{
		document.saveSrc = x;
		if(!x.sSrc){x.sSrc = x.src};
		x.src = overSrc;
	}
}

function rollOut(){
	x = document.saveSrc;
	if(x != undefined){x.src = x.sSrc};
}

// Restore Array can undo max of 10 elements
restoreClassArray = new Array(2);
restoreClassArray[0] = new Array(); //IDs
restoreClassArray[1] = new Array(); //ClassNames

// swap a style of an element with a new style
// input: id, styleName combinations ('id', 'style', 'id2', 'style2', ...)
function swapClass(){
	args = swapClass.arguments;
	restoreClass();
	for (var item = 0; item + 1 < args.length; item+=2){
		// Set for undo
		restoreClassArray[0][item/2] = args[item];
		restoreClassArray[1][item/2] = document.getElementById(args[item]).className;
		
		//Swap classNames
		document.getElementById(args[item]).className = args[item + 1];
	}
}

function restoreClass(){
	for (var i = 0; i < restoreClassArray[0].length; i++){
		// Reset class
		document.getElementById(restoreClassArray[0][i]).className = restoreClassArray[1][i];
		
		// Clear array
		restoreClassArray[0][i] = "";
		restoreClassArray[1][i] = "";
	}
}

// open new window if not open yet, else change location and bring to front
var itemWin
function viewItem(url)
{
	if(itemWin && !itemWin.closed){
		itemWin.location = url;
		itemWin.focus();
	}
	else{
		itemWin = window.open(url, "itemWin", "top=50,left=50,,height=240,width=500,status=0,toolbar=0,menubar=0,location=0,scrollbars=0,personalbar=0,resizable=1");
		itemWin.focus();
	}
}

//Resize the window based on the image dimentions
function sizewindow() {
	window.resizeTo(document.images[0].width + 48, document.images[0].height + 115) //75
	//window.moveTo((screen.width-document.images[0].width + 10)/2, (screen.height-document.images[0].height + 25)/2)
}
	
function openwindow(url,type){
	switch (type){
	case "help" :
		window.open(url, "HelpWindow", "location=0,menubar=0,scrollbars=0,titlebar=0,toolbar=0,personalbar=0,status=0,resizable=1,width=530,height=200");
	break;
	case "links" :
		window.open(url, "LinkWindow", "location=0,menubar=1,scrollbars=1,titlebar=0,toolbar=0,personalbar=1,status=0,resizable=1,width=800,height=600");
	break;
	case "intro" :
		window.open(url, "LinkWindow", "location=0,menubar=0,scrollbars=0,titlebar=0,toolbar=0,personalbar=0,status=0,resizable=1,width=800,height=420");
	break;
	default : window.open(url, "HelpWindow", "location=0,menubar=0,scrollbars=0,titlebar=0,toolbar=0,personalbar=0,status=0,resizable=1,width=420,height=280");
	}
}

function popIt(theURL) { //v2.0
  meWindow=window.open(theURL,'thePics','scrollbars=yes,width=620,height=375');
  meWindow.focus();
}

function hov(loc,cls){
	if(loc.className)
		loc.className=cls;}
-->