function platform() {
     var version = navigator.appVersion;
     
     if (version.indexOf('Win') > -1) {
     	if (version.indexOf('MSIE') > -1) {
     		return 'WinIE';
     	}
     	else {
     		return 'Other';
     	}
     }
     else
         return 'Other';
 }
 

function qtDetect(video) {
	var browser = platform();
    
	var hasQT = 0;
	var hasRP = 0;
	var root = 'http://www.ehsd.org/videos/';

	for (i=0; i<navigator.plugins.length; i++) {
		//document.writeln(navigator.plugins[i].name + '<BR>');
		if (navigator.plugins[i].name.indexOf("QuickTime") >= 0) {
			hasQT = 1;
		}
		if (navigator.plugins[i].name.indexOf("RealPlayer") >= 0) {
			hasRP = 1;
		}
		
	}
	  		//alert('Using normal detect: QuickTime-' + hasQT + ' RealPlayer-' + hasRP);
	
	
	if (hasQT && hasRP) {url = root + 'both-players.html?' + video;} 		// both players
	else if (hasQT) {url = root + video + '-v.html';} 				// QuickTime only
	else if (hasRP) {url = root + video + '.rm';} 					// RealPlayer only
	else if (browser == 'WinIE') {url = root + 'pcmsie-player.html?' + video;}
	else {url = root + 'neither-player.html?' + video;}					// neither player
	
	MM_openBrWindow(url,'window','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=425,height=360');

}
