//begin new video section
//You can and adjust values below for however many videos you have.

var strStreamOne = "media/video1_priprava";
var strStreamTwo = "media/video2_rozdelovac";
var strStreamThree = "media/video3_montaz";

//Assuming you will use the same size for all videos, you can leave the following as is.

var strPartOne = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="278" height="220" id="FLVPlayer3"><param name="movie" value="FLVPlayer_Progressive.swf" /><param name="salign" value="lt" /><param name="quality" value="high" /><param name="scale" value="noscale" /><param name="wmode" value="transparent" /><param name="FlashVars" value="&MM_ComponentVersion=1&skinName=clearSkin_3&streamName=';
var strPartTwo = '&autoPlay=true&autoRewind=true" /><embed src="FLVPlayer_Progressive.swf" flashvars="&MM_ComponentVersion=1&skinName=clearSkin_3&streamName=';
var strPartThree = '&autoPlay=true&autoRewind=true" quality="high" scale="noscale" width="278" height="220" name="FLVPlayer" salign="LT" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" wmode="transparent" /></embed></object>';

//Below you add to the array for each video you have on the page following the set pattern below.

var arrVideoCodes = new Array();
arrVideoCodes[0] = strPartOne + strStreamOne + strPartTwo + strStreamOne + strPartThree;
arrVideoCodes[1] = strPartOne + strStreamTwo + strPartTwo + strStreamTwo + strPartThree;
arrVideoCodes[2] = strPartOne + strStreamThree + strPartTwo + strStreamThree + strPartThree;

//function below is called after the page fully loads. Make sure to name the cells/containers for the videos video0, video1, video2 and so on.

function loadVideoClips(numId) {
	var i;
	if (numId != -1) {
		document.getElementById("video" + numId.toString()).innerHTML = arrVideoCodes[numId];
	} else {
		for (i = 0; i < arrVideoCodes.length; i++) {
			document.getElementById("video" + i.toString()).innerHTML = arrVideoCodes[i];
		} //for
	} //if
}

//end new video section
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 fShowVideo(theVideo)
{
//alert(theVideo);
document.FLVPlayer.SRC="media/" + theVideo;
document.FLVPlayer.StartVideo;
}

