//Regexp for testing email addy validity
var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/

sfHover = function() {
	var sfEls = document.getElementById("items").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
			}
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
				}
			}
		} 
if (window.attachEvent) window.attachEvent("onload", sfHover);


function activateNavImg(argID, argImgNo, argState){
    dispatcher(argID, "http://www.charlottesports.org/images/nav" + argImgNo + "_" + argState + ".jpg");
}

function dispatcher(argID, argImgSrc){
	if (document.images && document.getElementById){
		var img = document.getElementById(argID);
		if (img != null){
			img.src = argImgSrc;
		}
	}
}
// Preloader
var i = 0;
imageObj = new Image();
images = new Array();
images[0]="http://www.charlottesports.org/images/nav1_1.jpg";
images[1]="http://www.charlottesports.org/images/nav2_1.jpg";
images[2]="http://www.charlottesports.org/images/nav3_1.jpg";
images[3]="http://www.charlottesports.org/images/nav4_1.jpg";
images[4]="http://www.charlottesports.org/images/nav5_1.jpg";
for(i=0; i<=5; i++){
	imageObj.src=images[i];
	}
	
function SetContact(argPrefix){
	var tld = 'charlo' + 'ttesport' + 's.org';
	var str = 'ma' + 'il' + 'to:' + argPrefix + '@' + tld;
	document.location.href = str;
}

// -----------------------------------------------

function MM_jumpMenu(targ,selObj,restore){ //v3.0
	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	if (restore) selObj.selectedIndex=0;
}