var newwin;

function launchwin(xRes,xPath)
{
	if (xRes == "Hi") {
		myurl = "../video/hi.php?vid=" + xPath;
	}
	else if (xRes == "Low") {
		myurl = "../video/low.php?vid=" + xPath;
	}	
	else if (xRes == "Audio") {
		myurl = "../audio/manager.php?aud=" + xPath;
	}	
	newwin = window.open(myurl,"oaslcvideo", "width=400,height=350,directories=0,menubar=0,location=0,resizable=0,status=0,toolbar=0");
}

function whichWMP (resolutionType,filePath) {
	//alert(navigator.appName + " | " + navigator.platform + " | " + navigator.appVersion);
	if (navigator.appName == "Microsoft Internet Explorer") {
		if (navigator.platform == "Win32") {
			// IE on Windows
			if (resolutionType == "Audio") {
				fullPath = "http://www.oceanalaska.org/audio/" + filePath + ".wma";
				window.location.replace(fullPath);
			}
			else {
				fullPath = "http://www.oceanalaska.org/video/" + filePath + ".wmv";
				window.location.replace(fullPath);
			}
		}
		else {
			// Mac OS
			launchwin(resolutionType,filePath);
		}
	}
	else { 
		launchwin(resolutionType,filePath);
	}
}

