<!--
var blank = new RegExp("^[\\s]*$","i");
var ns4 = (document.layers);
var ie4 = (document.all && !document.getElementById);
var ie5 = (document.all && document.getElementById);
var ns6 = (!document.all && document.getElementById);

var probflag = 0;

	function pop_win(xstr) {
	  window.open(xstr,'fcc','width=790,height=571,scrollbars=yes');
	}
	function getvar(el, def) { //el=str, def= default value
		var urls = new String(eval("self.location"));
		var re = new RegExp( "\\?[\\w\\W]*"+ el +"=([^\\&\\?#]*)", "i");
		var arr = re.exec(urls);
		if(arr && arr.length>1) return arr[1];
		else return def;
	}
	function echo(str) {
		document.open();
		document.write(str);
		document.close();
	}
	function getcookie(cookiename) {
		var cookiestring=""+document.cookie;
		var index1=cookiestring.indexOf(cookiename);
		if (index1==-1 || cookiename=="") return ""; 
		var index2=cookiestring.indexOf(';',index1);
		if (index2==-1) index2=cookiestring.length; 
		return unescape(cookiestring.substring(index1+cookiename.length+1,index2));
	}
	function _loadme() {
		var vod = "<<@vodonly@>>";
		var inx = new String(getcookie("inx"));
		if(blank.test(inx) && vod.valueOf()==("hidden").valueOf()) {
			self.document.cookie = "inx=";
			self.document.location = "index.htm";
		}
	}

function MM_openBrWindow(theURL,winName,features) {
  	window.open(theURL,winName,features);
}

function browserCheck() {
	if (parseInt(navigator.appVersion) < 4) {
        if (navigator.appName=="Netscape") {
			document.browseroldns.visibility = 'visible';
			probflag++;
        } 
		if (navigator.appVersion.indexOf("MSIE") != -1) {
			document.getElementById("browseroldie").style.visibility = "visible";  
			probflag++;
        }
    } else {
        var appV = navigator.appVersion ;
        if (navigator.appName=="Netscape") {
            var appDidxs = appV.indexOf("[");
            var appDidxe = appV.indexOf("]");
            var appSidxs = appV.indexOf("(") + 1;
            var appSidxe = appV.indexOf(";");
            if (ns4) {
				browserns.innerHTML=navigator.appCodeName+"<br>"+navigator.userAgent;
				document.browseroldns.visibility = 'visible';
			}
			else {
				document.getElementById("browserns").innerHTML=navigator.appCodeName+"<br>"+navigator.userAgent+"&nbsp[PASS]";
				document.getElementById("browserns").style.visibility = "visible";
			}
		}
		if (navigator.appVersion.indexOf("MSIE") != -1) {
            var appDidxs = appV.indexOf("MSIE") + 4;
            var appDidxe = appV.indexOf(";", appDidxs) + 1;
            var appSidxs = appV.indexOf(")");
			browserie.innerHTML=navigator.appName+"<br>"+navigator.appVersion+"&nbsp[PASS]";
			document.all.browserie.style.visibility = 'visible';
        }
    }
		timerID = setTimeout('javaCheck();', 500);
}

function javaCheck() {

    if (navigator.appName=="Netscape") {
		if (navigator.javaEnabled()) {
			if (ns4) {document.javaok.visibility = 'visible';}
				else {document.getElementById("javaok").style.visibility = 'visible';}
		} else {
			if (ns4) {document.javano.visibility = 'visible';}
				else {document.getElementById("javano").style.visibility = 'visible';}
			probflag++;
		}
	}
	if (navigator.appVersion.indexOf("MSIE") != -1) {
		if (navigator.javaEnabled()) {
			document.all.javaok.style.visibility = 'visible';
		} else {
			document.all.javano.style.visibility = 'visible';
			probflag++;
    	}
    }

	timerID = setTimeout('screenCheck();', 500);

}

function screenCheck() {

	var width = screen.width;
	var height = screen.height;
    if (navigator.appName=="Netscape") {
		if (width >= '800') {
			if (ns4) {document.screen800.visibility = 'visible';}
			else {
				document.getElementById("screen800").innerHTML=('<SPAN STYLE="COLOR:#000099; font-size:12px; font-family:Verdana, Arial, Helvetica, sans-serif; font-weight:bold;">Screen Size is OK [Your Screen is: '+ screen.width +' x '+ screen.height+']. [PASS]</SPAN>');
				document.getElementById("screen800").style.visibility = 'visible';
				}  
		} else {
			if (ns4) {document.screenno.visibility = 'visible';}
				else {
					document.getElementById("screenno").style.visibility = 'visible';}  
			probflag++;
		}
    }
	if (navigator.appVersion.indexOf("MSIE") != -1) {
		if (screen.width >= '1024') {
			screen1024.innerHTML="Screen Size is OK [Your Screen is: " + width + " x " + height + "]. [PASS]";
			document.all.screen1024.style.visibility = 'visible';
		} else if (screen.width >= '800') {
			screen800.innerHTML="Screen Size is OK [Your Screen is: " + width + " x " + height + "]. [PASS]";
			document.all.screen800.style.visibility = 'visible';
		} else {
			document.all.screenno.style.visibility = 'visible';
			probflag++;
    	}
    }

	timerID = setTimeout('colorCheck();', 500);

}

function colorCheck() {

var colorDepth;

	colorDepth = window.screen.colorDepth;

    if (navigator.appName=="Netscape") {
    	if ((colorDepth >= 8 && colorDepth < 16) || colorDepth == 18) {
	        if (ns4) {document.getElementById("color8").style.visibility = 'visible';}
				else {document.getElementById("color8").style.visibility = 'visible';}  
			probflag++;
    	}
	    if ((colorDepth >= 16 && colorDepth < 32) && colorDepth != 18) {
	        if (ns4) {document.color16.visibility = 'visible';}
				else 
						{document.getElementById("color16").style.visibility = 'visible';}  
    	}
	    if (colorDepth >= 32) {
	        if (ns4) {document.getElementById("color32").style.visibility = 'visible';}
				else {document.getElementById("color32").style.visibility = 'visible';}  
    	}
	}
    if (navigator.appVersion.indexOf("MSIE") != -1) {
    	if ((colorDepth >= 8 && colorDepth < 16) || colorDepth == 18) {
			document.all.color8.style.visibility = 'visible';
			probflag++;
    	}
	    if ((colorDepth >= 16 && colorDepth < 32) && colorDepth != 18) {
			document.all.color16.style.visibility = 'visible';
    	}
	    if (colorDepth >= 32) {
			document.all.color32.style.visibility = 'visible';
    	}
    }

	timerID = setTimeout('mediaCheck();', 500);
}

function soundCheck() {

    if (soundEnabled == 1) {
			document.getElementById("soundok").style.visibility = 'visible';
		} else {
			document.getElementById("soundno").style.visibility = 'visible';
			probflag++;
	    }

	timerID = setTimeout('mediaCheck();', 500);
}

function mediaCheck() {

	var OpSys;

	if(navigator.userAgent.indexOf('IRIX') != -1) {
		OpSys = "Irix";
	} else if ((navigator.userAgent.indexOf('Win') != -1) &&
	    (navigator.userAgent.indexOf('95') != -1)) {
		OpSys = "Windows 95";
	} else if ((navigator.userAgent.indexOf('Win') != -1) &&
	    (navigator.userAgent.indexOf('98') != -1)) {
		OpSys = "Windows 98";
	} else if ((navigator.userAgent.indexOf('Win') != -1) &&
	    (navigator.userAgent.indexOf('NT 4.0') != -1)) {
		OpSys = "Windows NT";
	} else if ((navigator.userAgent.indexOf('Win') != -1) &&
	    (navigator.userAgent.indexOf('NT 5.0') != -1)) {
		OpSys = "Windows 2000";
	} else if ((navigator.userAgent.indexOf('Win') != -1) &&
	    (navigator.userAgent.indexOf('NT') != -1)) {
		OpSys = "Windows NT";
	} else if (navigator.userAgent.indexOf('Win') != -1) {
		alert(navigator.userAgent)
		OpSys = "Windows3.1";
	} else if (navigator.userAgent.indexOf('Mac') != -1) {
		OpSys = "Macintosh";
	} else {
		OpSys = "other";
	}
	
	if (OpSys!="Macintosh") {
			var NName = navigator.appName;
			var RealMode=0;
			var haveReal="no";
			if (NName=="Netscape") {
				numPlugins = navigator.plugins.length;
				for (i = 0; i < numPlugins; i++) {
					plugin = navigator.plugins[i];
					if (plugin.name.substring(0,10)=="RealPlayer") {
						haveReal = "yes";
						document.getElementById("realok").style.visibility = 'visible';
					}
				}
				if (haveReal != "yes") {
					document.all.realno.style.visibility = 'visible';
					probflag++;
				}
			}
			else if (navigator.appVersion.indexOf("MSIE")) {
				pluginlist = detectIE("rmocx.RealPlayer G2 Control.1","RealPlayer");
				function detectIE(ClassID,name) { 
					result = false; 
					if (result) 
					return name+',';
					 else return ''; }
					if (pluginlist.indexOf("RealPlayer")!=-1)
					haveReal = "yes";
					document.all.realok.style.visibility = 'visible';
			}
		}
		if (OpSys=="Macintosh") {
			numPlugins = navigator.plugins.length;
			for (i = 0; i < numPlugins; i++) {
  				plugin = navigator.plugins[i];
  				if (plugin.name.substring(0,10)=="RealPlayer") {
    					document.getElementById("realok").style.visibility = 'visible';
				}
			}
		}

/*
	if (navigator.appName=="Netscape") {
        numPlugins = navigator.plugins.length;
        for (i = 0; i < numPlugins; i++) {
            plugin = navigator.plugins[i];
            if (plugin.name.substring(0, 20)=="Windows Media Player") {
                    WMP=true;
            }
        }
		if (WMP) {
	        if (ns4) {document.mediaok.visibility = 'visible';}
				else {document.getElementById("mediaok").style.visibility = 'visible';}
		} else {
	        if (ns4) {document.mediaold.visibility = 'visible';}
				else {document.getElementById("mediaold").style.visibility = 'visible';}
			probflag++;
		}
	}
	if (navigator.appVersion.indexOf("MSIE") != -1) {
		if (WMP) {
			document.all.mediaok.style.visibility = 'visible';
		} else {
			document.all.mediaold.style.visibility = 'visible';
			probflag++;
		}
    }
    */
    timerID = setTimeout('SpeedCheck();', 500);

}

function SpeedCheck(){
		var kbytes_of_data = 14926;
		if (navigator.appName=="Netscape") {
			var xmlhttp = new XMLHttpRequest();
			var starttime = new Date();
			
			xmlhttp.open("POST","videos/testvideoduckslow.rm",false);
			xmlhttp.send("videos/testvideoduckslow.rm");
		}
		if (navigator.appVersion.indexOf("MSIE") != -1) {
			var xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
			var starttime = new Date();
			
			xmlhttp.open("POST","videos/testvideoduckslow.rm",false);
			xmlhttp.send("");
		}
				
		var endtime = new Date();
		
		if ((endtime.getSeconds()) == (starttime.getSeconds()))
		{
			var downloadtime = 0;
		}
		else
		{
			downloadtime = ((endtime.getSeconds()) - (starttime.getSeconds()));
		}
		
		var linespeed = kbytes_of_data/downloadtime;
		var kbps = (Math.round((linespeed*10)*1.024))/10;
		
		if (kbps < 256) {
			document.getElementById("speedno").style.visibility = 'visible';
			probflag++;
		} else if (kbps <= 3072) {
			document.getElementById("speedok").innerHTML= "<br>Your conncection speed is OK<br>[Your current download rate is: " + kbps + "kbps]. [PASS]<br>";
			document.getElementById("speedok").style.visibility = 'visible';
		} else if (kbps > 3072) {
			document.getElementById("speedok").innerHTML= "<br>Your connection is optimized for viewing streaming media. [PASS]";
			document.getElementById("speedok").style.visibility = 'visible';
		}
	timerID = setTimeout('CheckDone();', 500);
}


function CheckDone(){
	if (probflag==0) {
        if (navigator.appName=="Netscape") {
            if (ns4) {
				document.checkok.visibility = 'visible';	
			}
			else {
				document.getElementById("checkok").style.visibility = "visible";  
			}
		}
		if (navigator.appVersion.indexOf("MSIE") != -1) {
			document.all.checkok.style.visibility = 'visible';
        }
	}			
	else{
        if (navigator.appName=="Netscape") {
            if (ns4) {
				document.checkno.document.write('<SPAN STYLE="COLOR:RED; font-size:8pt; font-family:Arial, Helvetica, sans-serif; font-weight:bold;">problem(s) detected. You may experience problems viewing the video unless the problem(s) are corrected. To view a test video, <a href="videos/test.ram">click here</a></SPAN>');
				document.checkno.visibility = 'visible';	
			}
			else {
				document.getElementById("checkno").innerHTML='<SPAN STYLE="COLOR:RED; font-size:8pt; font-family:Arial, Helvetica, sans-serif; font-weight:bold;">' + probflag.toString() + ' problem(s) detected. You may experience problems viewing the video unless the problem(s) are corrected. To view a test video, <a href="videos/test.ram">click here</a></SPAN>';
				document.getElementById("checkno").style.visibility = "visible";  
			}
		}
		if (navigator.appVersion.indexOf("MSIE") != -1) {
			checkno.innerHTML= probflag.toString() + ' problem(s) detected. You may experience problems viewing the video unless the problem(s) are corrected. To view a test video, <a href="videos/test.ram"> click here</a>'
			document.all.checkno.style.visibility = 'visible';
        }
	}
}


//-->
