var vidUrl = '';
var depVidUrl = '';
var globalFormat = '';
var urlString = '';
var vType;
var pluginFound = false;
var haveReal = false;
var haveQT = false;
var pName = '';


//Please note that the vidUrl can only have TWO underscores in the name... If it has more than TWO underscores,
//this code will not work correctly...

function vidPop(vidUrl){
        var path = '/html/vid-interface/';
	switch(vidUrl){
		case 'duty':
			depVidUrl = path + 'duty.htm';
			break;
		case 'honor':
			depVidUrl = path + 'honor.htm';
			break;
		case 'loyalty':
			depVidUrl = path + 'loyalty.htm';
			break;
		case 'integ':
			depVidUrl = path + 'integ.htm';
			break;
		case 'p_cour':
			depVidUrl = path + 'p_cour.htm';
			break;
		case 'respect':
			depVidUrl = path + 'respect.htm';
			break;
		case 's_serve':
			depVidUrl = path + 's_serve.htm';
			break;
		case 'intro':
			depVidUrl = path + 'intro.htm';
			break;
		case 'summary':
			depVidUrl = path + 'summary.htm';
			break;
		case 'physical':
			depVidUrl = path + 'physical.htm';
			break;
		case 'at_war':
			depVidUrl = path + 'at_war.htm';
			break;
		case 'welcomearmy':
			depVidUrl = path + 'welcomearmy.htm';
			break;												
	}
	var aWin = window.open(depVidUrl,vidUrl+'_','width=425,height=340,status=no,resizable=no,location=no,left=0,top=0,screenX=0,screenY=0,scrollbars=no,menubar=no');
	aWin.focus();
}

function formatDropdown(){
	dd = '';
	isNS4 = (document.layers) ? true : false;
	if(isNS4){
		dd = '<select name="playerType" size="1" onchange="setType(this.form);">\n';
		dd = dd + '                                                                                     <option selected value="#">Select a format...</option>\n';
		dd = dd + '                                                                                     <option value="rh">RealPlayer - HIGH</option>\n';
		dd = dd + '                                                                                     <option value="rl">RealPlayer - LOW</option>\n';
		dd = dd + '                                                                                     <option value="qt">QuickTime</option>\n';
		dd = dd + '                                                                                     <option value="qc">QuickTime - CAPTIONED</option>\n';
		dd = dd + '                                                                                </select>';
	}else{
		dd = '<select name="playerType" size="1" onchange="setType(this.form);" class="dropdown">\n';
		dd = dd + '                                                                                     <option selected value="x">Select a format...</option>\n';
		dd = dd + '                                                                                     <option value="rh">RealPlayer - HIGH</option>\n';
		dd = dd + '                                                                                     <option value="rl">RealPlayer - LOW</option>\n';
		dd = dd + '                                                                                     <option value="qt">QuickTime</option>\n';
		dd = dd + '                                                                                     <option value="qc">QuickTime - CAPTIONED</option>\n';
		dd = dd + '                                                                                </select>';
	}
	document.write(dd);
}

function formatDropdownUSAREC(){
//Used for the USAREC non-captioned video that uses LOW and HIGH in Quicktime
	dd = '';
	isNS4 = (document.layers) ? true : false;
	if(isNS4){
		dd = '<select name="playerType" size="1" onchange="setType(this.form);">\n';
		dd = dd + '                                                                                     <option selected value="#">Select a format...</option>\n';
		dd = dd + '                                                                                     <option value="rh">RealPlayer - HIGH</option>\n';
		dd = dd + '                                                                                     <option value="rl">RealPlayer - LOW</option>\n';
		dd = dd + '                                                                                     <option value="qt">QuickTime - HIGH</option>\n';
		dd = dd + '                                                                                     <option value="qc">QuickTime - LOW</option>\n';
		dd = dd + '                                                                                </select>';
	}else{
		dd = '<select name="playerType" size="1" onchange="setType(this.form);" class="dropdown">\n';
		dd = dd + '                                                                                     <option selected value="x">Select a format...</option>\n';
		dd = dd + '                                                                                     <option value="rh">RealPlayer - HIGH</option>\n';
		dd = dd + '                                                                                     <option value="rl">RealPlayer - LOW</option>\n';
		dd = dd + '                                                                                     <option value="qt">QuickTime - HIGH</option>\n';
		dd = dd + '                                                                                     <option value="qc">QuickTime - LOW</option>\n';
		dd = dd + '                                                                                </select>';
	}
	document.write(dd);
}

function formatDropdownALL(){
//Added 2/10/2005 by TWD
//Used for the USAREC videos that use ALL video formats including LOW and HIGH in RP, 90 and 300 in QT and a Captioned QT (90 Only)
	dd = '';
	isNS4 = (document.layers) ? true : false;
	if(isNS4){
		dd = '<select name="playerType" size="1" onchange="setType(this.form);">\n';
		dd = dd + '                                                                                     <option selected value="#">Select a format...</option>\n';
		dd = dd + '                                                                                     <option value="rh">RealPlayer - HIGH</option>\n';
		dd = dd + '                                                                                     <option value="rl">RealPlayer - LOW</option>\n';
		dd = dd + '                                                                                     <option value="qt">QuickTime - HIGH</option>\n';
		dd = dd + '                                                                                     <option value="qc">QuickTime - LOW</option>\n';
		dd = dd + '                                                                                     <option value="qp">QuickTime - CAPTIONED</option>\n';
		dd = dd + '                                                                                </select>';
	}else{
		dd = '<select name="playerType" size="1" onchange="setType(this.form);" class="dropdown">\n';
		dd = dd + '                                                                                     <option selected value="x">Select a format...</option>\n';
		dd = dd + '                                                                                     <option value="rh">RealPlayer - HIGH</option>\n';
		dd = dd + '                                                                                     <option value="rl">RealPlayer - LOW</option>\n';
		dd = dd + '                                                                                     <option value="qt">QuickTime - HIGH</option>\n';
		dd = dd + '                                                                                     <option value="qc">QuickTime - LOW</option>\n';
		dd = dd + '                                                                                     <option value="qp">QuickTime - CAPTIONED</option>\n';
		dd = dd + '                                                                                </select>';
	}
	document.write(dd);
}

function setType(vidType){

	isNS4 = (document.layers) ? true : false;
	with(document.vidform){
	typeval=playerType.options[playerType.selectedIndex].value;
	vType = typeval;
	}
	if (globalFormat.indexOf('#') != -1){
		alert('Please select a video format');
	}else{
		globalFormat = vType.substring(0,1);

		parsed = window.name.split('_');
		if (parsed.length < 3)
		{
			window.name = parsed[0] + '_' + vType;
		}
		else
		{
			window.name = parsed[0] + '_' + parsed[1] + '_' + vType;
		}

		if(isNS4){
			window.location.href = window.location.href;	
		}else{
			window.location.reload(true);
		}
	}
}

function seturlString(vType) {

	vidurl = '';

	parsed = window.name.split('_');

	if (parsed.length < 3)
	{
		switch(vType){
			case 'h':
				vidurl = parsed[0] + '_hi';
				break;
			case 'l':
				vidurl = parsed[0] + '_lo';
				break;
			case 't':
				vidurl = parsed[0] + '_90nc';
				break;
			case 'c':
				vidurl = parsed[0] + '_90';
				break;
		}
	}
	else
	{
		switch(vType){
			case 'h':
				vidurl = parsed[0] + '_' + parsed[1] + '_hi';
				break;
			case 'l':
				vidurl = parsed[0] + '_' + parsed[1] + '_lo';
				break;
			case 't':
				vidurl = parsed[0] + '_' + parsed[1] + '_90nc';
				break;
			case 'c':
				vidurl = parsed[0] + '_' + parsed[1] + '_90';
				break;
		}
	}
	
	return vidurl;
}

function writeVideo(globalFormat,urlString) {

	//check for RealPlayer
	haveReal = WM_easyDetect('RealPlayer');
	
	//check for version 5 or 6 of QuickTime
	versi = getQuicktimeVersion();
	if (versi > 4)
	{
		haveQT = true;
	}

	parsed = window.name.split('_');

	if (parsed.length < 3)
	{
		x = parsed[1].substr(0,1);
		y = parsed[1].substr(1,1);
	}
	else
	{
		x = parsed[2].substr(0,1);
		y = parsed[2].substr(1,1);
	}

	urlString = seturlString(y);

	switch(x){
		case 'r':
			if (haveReal)
			{
				wv = '<object id="RAOCX" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" height="180" width="240">\n';
				wv = wv + '<param name="src" value="http://mfile.akamai.com/6689/rm/goarmy.download.akamai.com/6689/dep/' + urlString + '.ram">\n';
				wv = wv + '<param name="CONTROLS" value="ImageWindow">\n';
				wv = wv + '<param name="AUTOSTART" value="true">\n';
				wv = wv + '<embed type="audio/x-pn-realaudio-plugin" src="http://mfile.akamai.com/6689/rm/goarmy.download.akamai.com/6689/dep/' + urlString + '.ram" height="180" width="240" controls="ImageWindow" autostart="true"></embed>\n';
				wv = wv + '</object>\n';
				document.write(wv);
				break;
			}
			else
			{
				wv = '<img src="all/noplugins_rp.gif" alt="Click on the link below to download the most current version of RealPlayer." height="196" width="240" border="0">';
				document.write(wv);
				break;
			}
		case 'q':
			if (haveQT)
			{		
				wv = '<embed src="http://a994.g.akamai.net/7/994/6690/v002/goarmy.download.akamai.com/6690/dep/' + urlString + '.mov" width="240" height="196" type="video/quicktime" controller="true" autoplay="true" bgcolor="#000000"></embed>';
				document.write(wv);
				break;
			}
			else
			{
				wv = '<img src="all/noplugins_qt.gif" alt="Click on the link below to download the most current version of QuickTime." height="196" width="240" border="0">';
				document.write(wv);
				break;
			}
		case '':
			wv = '<img src="all/vid_slct.gif" width="179" height="12" alt="Select a video format above.">'
			document.write(wv);
			break;
	}
}

function writePhysicalVideo(globalFormat,urlString) {

//VIDEO IS CALLED 'physical' so it uses the first method of parsing
	
	//check for RealPlayer
	haveReal = WM_easyDetect('RealPlayer');
	
	//check for version 5 or 6 of QuickTime
	versi = getQuicktimeVersion();
	if (versi > 4)
	{
		haveQT = true;
	}

	parsed = window.name.split('_');

	x = parsed[1].substr(0,1);
	y = parsed[1].substr(1,1);

	vidurl = '';
	
	switch(y){
			case 'h':
				vidurl = parsed[0] + '_hi';
				break;
			case 'l':
				vidurl = parsed[0] + '_lo';
				break;
			case 't':
				vidurl = parsed[0] + '_90ns';
				break;
			case 'c':
				vidurl = parsed[0] + '_90capt';
				break;
	}

	urlString = vidurl;

	switch(x){
		case 'r':
			if (haveReal)
			{
				wv = '<object id="RAOCX" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" height="136" width="240">\n';
				wv = wv + '<param name="src" value="http://mfile.akamai.com/6689/rm/goarmy.download.akamai.com/6689/dep/' + urlString + '.ram">\n';
				wv = wv + '<param name="CONTROLS" value="ImageWindow">\n';
				wv = wv + '<param name="AUTOSTART" value="true">\n';
				wv = wv + '<embed type="audio/x-pn-realaudio-plugin" src="http://mfile.akamai.com/6689/rm/goarmy.download.akamai.com/6689/dep/' + urlString + '.ram" height="136" width="240" controls="ImageWindow" autostart="true"></embed>\n';
				wv = wv + '</object>\n';
				document.write(wv);
				break;
			}
			else
			{
				wv = '<img src="all/noplugins_rp.gif" alt="Click on the link below to download the most current version of RealPlayer." height="196" width="240" border="0">';
				document.write(wv);
				break;
			}
		case 'q':
			if (haveQT)
			{
				wv = '<embed src="http://a994.g.akamai.net/7/994/6690/v010/goarmy.download.akamai.com/6690/dep/' + urlString + '.mov" width="240" height="192" type="video/quicktime" controller="true" autoplay="true" bgcolor="#000000"></embed>';
				document.write(wv);
				break;
			}
			else
			{
				wv = '<img src="all/noplugins_qt.gif" alt="Click on the link below to download the most current version of QuickTime." height="192" width="240" border="0">';
				document.write(wv);
				break;
			}
		case '':
			wv = '<img src="all/vid_slct.gif" width="179" height="12" alt="Select a video format above.">'
			document.write(wv);
			break;
	}
}

function writeSafetyVideo(globalFormat,urlString) {

//VIDEO IS CALLED 'at_war' so it uses the second method of parsing and uses different video names (see the switch)
	
	//check for RealPlayer
	haveReal = WM_easyDetect('RealPlayer');
	
	//check for version 5 or 6 of QuickTime
	versi = getQuicktimeVersion();
	if (versi > 4)
	{
		haveQT = true;
	}

	parsed = window.name.split('_');

	x = parsed[2].substr(0,1);
	y = parsed[2].substr(1,1);

	vidurl = '';

	switch(y){
			case 'h':
				vidurl = parsed[0] + '_' + parsed[1] + '_hi';
				break;
			case 'l':
				vidurl = parsed[0] + '_' + parsed[1] + '_lo';
				break;
			case 't':
				vidurl = parsed[0] + '_' + parsed[1] + '_300';
				break;
			case 'c':
				vidurl = parsed[0] + '_' + parsed[1] + '_100';
				break;
	}

	urlString = vidurl;

	switch(x){
		case 'r':
			if (haveReal)
			{
				wv = '<object id="RAOCX" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" height="136" width="240">\n';
				wv = wv + '<param name="src" value="http://mfile.akamai.com/6689/rm/goarmy.download.akamai.com/6689/usarec/' + urlString + '.ram">\n';
				wv = wv + '<param name="CONTROLS" value="ImageWindow">\n';
				wv = wv + '<param name="AUTOSTART" value="true">\n';
				wv = wv + '<embed type="audio/x-pn-realaudio-plugin" src="http://mfile.akamai.com/6689/rm/goarmy.download.akamai.com/6689/usarec/' + urlString + '.ram" height="136" width="240" controls="ImageWindow" autostart="true"></embed>\n';
				wv = wv + '</object>\n';
				document.write(wv);
				break;
			}
			else
			{
				wv = '<img src="all/noplugins_rp.gif" alt="Click on the link below to download the most current version of RealPlayer." height="196" width="240" border="0">';
				document.write(wv);
				break;
			}
		case 'q':
			if (haveQT)
			{
				wv = '<embed src="http://a994.g.akamai.net/7/994/6690/v010/goarmy.download.akamai.com/6690/usarec/' + urlString + '.mov" width="240" height="192" type="video/quicktime" controller="true" autoplay="true" bgcolor="#000000"></embed>';
				document.write(wv);
				break;
			}
			else
			{
				wv = '<img src="all/noplugins_qt.gif" alt="Click on the link below to download the most current version of QuickTime." height="192" width="240" border="0">';
				document.write(wv);
				break;
			}
		case '':
			wv = '<img src="all/vid_slct.gif" width="179" height="12" alt="Select a video format above.">'
			document.write(wv);
			break;
	}
}

function writeUSARECVideo(globalFormat,urlString) {

//VIDEOS are in the usarec directory, have no underscores in the name, and use hi, lo, 300, 90, 90c, and 300c
	
	//check for RealPlayer
	haveReal = WM_easyDetect('RealPlayer');
	
	//check for version 5 or 6 of QuickTime
	versi = getQuicktimeVersion();
	if (versi > 4)
	{
		haveQT = true;
	}

	parsed = window.name.split('_');

	x = parsed[1].substr(0,1);
	y = parsed[1].substr(1,1);

	vidurl = '';

	switch(y){
			case 'h':
				vidurl = parsed[0] + '_hi';
				break;
			case 'l':
				vidurl = parsed[0] + '_lo';
				break;
			case 't':
				vidurl = parsed[0] + '_300';
				break;
			case 'c':
				vidurl = parsed[0] + '_90';
				break;
			case 'p':
				vidurl = parsed[0] + '_90c';
				break;								
	}

	urlString = vidurl;
    
	switch(x){
		case 'r':
			if (haveReal)
			{
				wv = '<object id="RAOCX" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" height="136" width="240">\n';
				wv = wv + '<param name="src" value="http://mfile.akamai.com/6689/rm/goarmy.download.akamai.com/6689/usarec/' + urlString + '.ram">\n';
				wv = wv + '<param name="CONTROLS" value="ImageWindow">\n';
				wv = wv + '<param name="AUTOSTART" value="true">\n';
				wv = wv + '<embed type="audio/x-pn-realaudio-plugin" src="http://mfile.akamai.com/6689/rm/goarmy.download.akamai.com/6689/usarec/' + urlString + '.ram" height="136" width="240" controls="ImageWindow" autostart="true"></embed>\n';
				wv = wv + '</object>\n';
				document.write(wv);
				break;
			}
			else
			{
				wv = '<img src="all/noplugins_rp.gif" alt="Click on the link below to download the most current version of RealPlayer." height="196" width="240" border="0">';
				document.write(wv);
				break;
			}
		case 'q':
			if (haveQT)
			{
				wv = '<embed src="http://a994.g.akamai.net/7/994/6690/v010/goarmy.download.akamai.com/6690/usarec/' + urlString + '.mov" width="240" height="192" type="video/quicktime" controller="true" autoplay="true" bgcolor="#000000"></embed>';
				document.write(wv);
				break;
			}
			else
			{
				wv = '<img src="all/noplugins_qt.gif" alt="Click on the link below to download the most current version of QuickTime." height="192" width="240" border="0">';
				document.write(wv);
				break;
			}
		case '':
			wv = '<img src="all/vid_slct.gif" width="179" height="12" alt="Select a video format above.">'
			document.write(wv);
			break;
	}
}

// this is where we write out the VBScript for MSIE Windows
var WM_startTagFix = '</';
var msie_windows = 0;
if ((navigator.userAgent.indexOf('MSIE') != -1) && (navigator.userAgent.indexOf('Win') != -1)){
 msie_windows = 1;
 document.writeln('<script language="VBscript">');
 document.writeln('\'This will scan for plugins for all versions of Internet Explorer that have a VBscript engine version 2 or greater.');
 document.writeln('\'This includes all versions of IE4 and beyond and some versions of IE 3.');
 document.writeln('Dim WM_detect_through_vb');
 document.writeln('WM_detect_through_vb = 0');
 document.writeln('If ScriptEngineMajorVersion >= 2 then');
 document.writeln('  WM_detect_through_vb = 1');
 document.writeln('End If');
 document.writeln('Function WM_activeXDetect(activeXname)');
 document.writeln('  on error resume next');
 document.writeln('  If ScriptEngineMajorVersion >= 2 then');
 document.writeln('     WM_activeXDetect = False');
 document.writeln('     WM_activeXDetect = IsObject(CreateObject(activeXname))');
 document.writeln('     If (err) then');
 document.writeln('        WM_activeXDetect = False');
 document.writeln('     End If');
 document.writeln('   Else');
 document.writeln('     WM_activeXDetect = False');
 document.writeln('   End If');
 document.writeln('End Function');
 document.writeln(WM_startTagFix+'script>');
}

function WM_pluginDetect(plugindescription, pluginxtension, pluginmime, activeXname){

 //This script block will test all user agents that have a real plug-in array

 //(i.e. Netscape) and set the variables, otherwise it directs the routine

 // to WM_activeXDetect to detect the activeX control.

 // First define some variables
 var i,plugin_undetectable=0,detected=0, daPlugin=new Object();

 // Then we check to see if it's an MSIE browser that you can actually

 // check for the plugin in question. 

 if (msie_windows && WM_detect_through_vb){
     plugin_undetectable = 0;
 } else {
     plugin_undetectable = 1;
 }

 // If it has a real plugins or mimetypes array, we look there for the plugin first

 if(navigator.plugins) {
     numPlugins = navigator.plugins.length;
     if (numPlugins > 1) {
       if (navigator.mimeTypes && navigator.mimeTypes[pluginmime] && navigator.mimeTypes[pluginmime].enabledPlugin && (navigator.mimeTypes[pluginmime].suffixes.indexOf(pluginxtension) != -1)) { // seems like we have it, let's just make sure and check the version (if specified)
           if ((navigator.appName == 'Netscape') && (navigator.appVersion.indexOf('4.0') != -1)) { // stupid, stupid Netscape can't handle the references to navigator.plugins by number, sooo...
            for(i in navigator.plugins) {
                if ((navigator.plugins[i].description.indexOf(plugindescription) != -1) || (i.indexOf(plugindescription) != -1)) { // some versions of quicktime have no description. feh!
                 detected=1;
                 break;
                }
            }
           } else {
            for (i = 0; i < numPlugins; i++) {
                daPlugin = navigator.plugins[i];
                if ((daPlugin.description.indexOf(plugindescription) != -1) || (daPlugin.name.indexOf(plugindescription) != -1)) {
                 detected=1;
                 break;
                }
            }
           }

           // Mac weirdness
     if (navigator.mimeTypes[pluginmime] == null) {
            detected = 0;
           }
       }
       return detected;
     } else if((msie_windows == 1) && !plugin_undetectable){
       return WM_activeXDetect(activeXname);
     } else {           
       return 0;
     }
 } else {
     return 0;
 }
}


// this next function just makes it easy to detect the common plugins

function WM_easyDetect(whichPlugin) {

   // this function just makes it easy to do basic plug-in detection without

   // knowing all the mimetypes and activeX names and such
   var isItThere = 0;
   if( (whichPlugin == 'flash') || (whichPlugin == 'Flash') ) {
     isItThere = WM_pluginDetect('Flash', 'swf', 'application/x-shockwave-flash', 'ShockwaveFlash.ShockwaveFlash');
   } else if( (whichPlugin == 'director') || (whichPlugin == 'Director') ) {
     isItThere = WM_pluginDetect('Shockwave', 'dcr', 'application/x-director', 'SWCtl.SWCtl.1');
   } else if( (whichPlugin == 'quicktime') || (whichPlugin == 'Quicktime') || (whichPlugin == 'QuickTime') ) {
     isItThere = WM_pluginDetect('QuickTime', 'mov', 'video/quicktime', '');
   } else if( (whichPlugin == 'realplayer') || (whichPlugin == 'Realplayer') || (whichPlugin == 'RealPlayer') ) {
     isItThere = (WM_pluginDetect('RealPlayer', 'rpm', 'audio/x-pn-realaudio-plugin', 'RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)')) || (WM_pluginDetect('RealPlayer', 'rpm', 'audio/x-pn-realaudio-plugin','rmocx.RealPlayer G2 Control')) || (WM_pluginDetect('RealPlayer', 'rpm', 'audio/x-pn-realaudio-plugin','RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)')) || (WM_pluginDetect('RealPlayer', 'rpm', 'audio/x-pn-realaudio-plugin','RealVideo.RealVideo(tm) ActiveX Control (32-bit)'))
   } else {

     alert('You need to tell me which plug-in to look for, like so:\n\n' + '          WM_easyDetect(\'flash\')\n\n' + '          WM_easyDetect(\'director\')\n\n' + '          WM_easyDetect(\'quicktime\')\n\n' + '          WM_easyDetect(\'realaudio\')');
   }
   return isItThere;
}

var quicktimeVersion = 0;
quicktimeVersion_DONTKNOW = -1;
function getQuicktimeVersion() {
	var agent = navigator.userAgent.toLowerCase(); 
	
	// NS3+, Opera3+, IE5+ Mac (support plugin array):  check for Quicktime plugin in plugin array
	if (navigator.plugins != null && navigator.plugins.length > 0) {
      for (i=0; i < navigator.plugins.length; i++ ) {
         var plugin =navigator.plugins[i];
         if (plugin.name.indexOf("QuickTime") > -1) {
            quicktimeVersion = parseFloat(plugin.name.substring(18));
         }
      }
	}
   
	// IE4+ Win32:  attempt to create an ActiveX object using VBScript
	else if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && agent.indexOf("win")!=-1 && agent.indexOf("16bit")==-1) {
	  document.write('<scr' + 'ipt language="VBScript"\> \n');
		document.write('on error resume next \n');
		document.write('dim obQuicktime \n');
		document.write('set obQuicktime = CreateObject("QuickTimeCheckObject.QuickTimeCheck.1") \n');
		document.write('if IsObject(obQuicktime) then \n');
		document.write('   if obQuicktime.IsQuickTimeAvailable(0) then \n');
		document.write('      quicktimeVersion = CInt(Hex(obQuicktime.QuickTimeVersion) / 1000000) \n');
		document.write('   end if \n');
		document.write('end if \n');
		document.write('</scr' + 'ipt\> \n');
  }

	// Can't detect in all other cases
	else {
		quicktimeVersion = quicktimeVersion_DONTKNOW;
	}

	return quicktimeVersion;
}

