function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		home_over = newImage("../images/bbrx-home-ro.jpg");
		extra_over = newImage("../images/bbrx-extra-ro.jpg");
		training_over = newImage("../images/bbrx-training-ro.jpg");
		games_over = newImage("../images/bbrx-games-ro.jpg");
		health_over = newImage("../images/bbrx-health-ro.jpg");
		coaches_over = newImage("../images/bbrx-coaches-ro.jpg");
		preloadFlag = true;
	}
}
// -->

function MM_CheckFlashVersion(reqVerStr,msg){
  with(navigator){
    var isIE  = (appVersion.indexOf("MSIE") != -1 && userAgent.indexOf("Opera") == -1);
    var isWin = (appVersion.toLowerCase().indexOf("win") != -1);
    if (!isIE || !isWin){  
      var flashVer = -1;
      if (plugins && plugins.length > 0){
        var desc = plugins["Shockwave Flash"] ? plugins["Shockwave Flash"].description : "";
        desc = plugins["Shockwave Flash 2.0"] ? plugins["Shockwave Flash 2.0"].description : desc;
        if (desc == "") flashVer = -1;
        else{
          var descArr = desc.split(" ");
          var tempArrMajor = descArr[2].split(".");
          var verMajor = tempArrMajor[0];
          var tempArrMinor = (descArr[3] != "") ? descArr[3].split("r") : descArr[4].split("r");
          var verMinor = (tempArrMinor[1] > 0) ? tempArrMinor[1] : 0;
          flashVer =  parseFloat(verMajor + "." + verMinor);
        }
      }
      // WebTV has Flash Player 4 or lower -- too low for video
      else if (userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 4.0;

      var verArr = reqVerStr.split(",");
      var reqVer = parseFloat(verArr[0] + "." + verArr[2]);
  
      if (flashVer < reqVer){
        if (confirm(msg))
          window.location = "http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
      }
    }
  } 
}

function displayEmbed(vidName, title){
eval("win = window.open('','bbrox', 'urlbar=0,toolbar=0,scrollbars=0,location=0,status=0,resizable=0,menubar=0,width=600,height=630');");
win.document.open();
win.document.writeln('<html>');
win.document.writeln('<head><title>' + title + '</title></head>');
win.document.writeln('<body bgcolor="#cccccc" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">');
win.document.writeln('<table width="590" border="0" cellpadding="5" cellspacing="0" align="center">');
win.document.writeln('<tr><td valign="top"><strong>Copy the code in the form box below and paste it into your web page.</strong></td></tr>');
win.document.writeln('<tr><td valign="top">Video <strong>Auto</strong> starts.</td></tr>');
win.document.writeln('<tr><td valign="top"><form><textarea cols="70" rows="13" name="embed">');
win.document.writeln('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="400" height="225">');
win.document.writeln('<param name="author" value="http://www.baseballrox.com" />');
win.document.writeln('<param name="movie" value="http://www.baseballrox.com/videos/FLVPlayer_Progressive.swf" />');
win.document.writeln('<param name="FlashVars" value="&skinName=http://www.baseballrox.com/videos/Clear_Skin_1&streamName=http://www.baseballrox.com/videos/' + vidName + '&autoPlay=true&autoRewind=true" />');
win.document.writeln('<embed src="http://www.baseballrox.com/videos/FLVPlayer_Progressive.swf" flashvars="&skinName=http://www.baseballrox.com/videos/Clear_Skin_1&streamName=http://www.baseballrox.com/videos/' + vidName + '&autoPlay=true&autoRewind=true" width="400" height="225" type="application/x-shockwave-flash" />');
win.document.writeln('</object>');
win.document.writeln('</textarea></form></td></tr>');
win.document.writeln('<tr><td valign="top">Video does <strong>Not</strong> auto start.</td></tr>');
win.document.writeln('<tr><td valign="top"><form><textarea cols="70" rows="13" name="embed">');
win.document.writeln('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="400" height="225">');
win.document.writeln('<param name="author" value="http://www.baseballrox.com" />');
win.document.writeln('<param name="movie" value="http://www.baseballrox.com/videos/FLVPlayer_Progressive.swf" />');
win.document.writeln('<param name="FlashVars" value="&skinName=http://www.baseballrox.com/videos/Clear_Skin_1&streamName=http://www.baseballrox.com/videos/' + vidName + '&autoRewind=true" />');
win.document.writeln('<embed src="http://www.baseballrox.com/videos/FLVPlayer_Progressive.swf" flashvars="&skinName=http://www.baseballrox.com/videos/Clear_Skin_1&streamName=http://www.baseballrox.com/videos/' + vidName + '&autoRewind=true" width="400" height="225" type="application/x-shockwave-flash" />');
win.document.writeln('</object>');
win.document.writeln('</textarea></form></td></tr>');
win.document.writeln('</table></body></html>');   
}
// -->