// JavaScript Document
function goLink() {
	location = document.forms["selectLocation"].elements["location"].options[document.forms["selectLocation"].elements["location"].selectedIndex].value;
}
function formatH2() {
	var arr_H1 = document.getElementById("contentholder").getElementsByTagName("h2");
	for (var i=0;i<arr_H1.length;i++) {
		str_Temp = arr_H1[i].innerHTML;
		str_Temp = "<span class=\"h2text\">" + str_Temp + "</span><span class=\"h2right\">&nbsp;</span>";
		arr_H1[i].innerHTML = str_Temp;
	}
}
var arrVideoTypes = ["mpeg","mpg","avi","mov"];
var arrImageTypes = ["jpg","gif","jpeg"];
function getMediaType(strFile) {
	for(var i=0;i<arrVideoTypes.length;i++) {
		if (strFile.indexOf(arrVideoTypes[i])!=-1) {
			return "video";
		}
	}
	for(var i=0;i<arrImageTypes.length;i++) {
		if (strFile.indexOf(arrImageTypes[i])!=-1) {
			return "image";
		}
	}
	return "none";
}
function openMedia(strFile,intWidth,intHeight) {
	var strType = getMediaType(strFile);
	switch(strType) {
		case "video":
			var winMedia = window.open("/wolves/learn/wow/media_popup.asp?file="+strFile+"&width="+intWidth+"&height="+intHeight,"MediaWindow","width="+(intWidth+20)+",height="+(intHeight+35)+",scrollbars=no");
			break;
		case "image":
			var winMedia = window.open("/wolves/learn/wow/media_popup.asp?file="+strFile+"&width="+intWidth+"&height="+intHeight,"MediaWindow","width="+(intWidth+20)+",height="+(intHeight+20)+",scrollbars=no");
			break;
	}
}