// Javascript
function preload() {
	var args = preload.arguments;
	for (var i=0; i<args.length; i++) {
		this[args[i]] = new Image();
		this[args[i]].src = "/images/" + args[i] + ".gif";
		
		this[args[i]+'_f2'] = new Image();
		this[args[i]+'_f2'].src = "/images/" + args[i] + "_f2.gif";
	}
}

function SwapImage(imgToSwapIn,imgLocation) {
	imgToSwapIn = eval(imgToSwapIn + ".src");
	document [imgLocation].src = imgToSwapIn;
}

function openWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}

function printDate() {
	today = new Date();
	months = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
	
	date = today.getDate();
	year = today.getFullYear();
	month = today.getMonth();
	
	document.write(months[month] + " " + date + ", " + year);	
}

function JumpMenu(form) {
	var level = form.level[form.level.selectedIndex].value;
	switch (level) {
		case "home":
			window.location.href = '/';
			break;
		case "varsity":
			//window.location.href = '/varsity/';
			window.location.href = 'http://www.nhhswrestling.com/';
			break;
		case "jrhigh":
			//window.location.href = '/jrhigh/';
			window.location.href = 'http://www.nhhswrestling.com/jrhigh.htm';
			break;
		case "youth":
			window.location.href = '/youth/';
			break;
		default:
			return false;
			break;
	}
	return false;
}

preload('varsity','jrhigh','youth','b1','b2','b3','b4','b5','b6','b7');