

	var flashVideoPlayer; // Use a variable to reference the embedded SWF file.
	var curPos=0;
	var curPart=0;
	var curProduct=0;
	var curUser=0;

	function initialize() {
		flashVideoPlayer=getFlashMovieObject("videoPlayer");
		updateStatus("player initialized " + flashVideoPlayer, curPos);
    	}
	
	function getFlashMovieObject(movieName){
 		if (window.document[movieName]){
    			return window.document[movieName];
		}
  		if (navigator.appName.indexOf("Microsoft Internet")==-1){
    			if (document.embeds && document.embeds[movieName]){
      				return document.embeds[movieName]; 
			}
  		}else{
    			return document.getElementById(movieName);
  		}
	}


    function callFlashPlayVideo() {
        var comboBox = document.forms['videoForm'].videos;
        var video = comboBox.options[comboBox.selectedIndex].value;
        curPart=video;
        updateStatus("____" + video + "____", curPos);
        flashVideoPlayer.playVideo(video);
        
    }

    // Call the pauseResume() function within the SWF file.
    function callFlashPlayPauseVideo() {
	    updateStatus("____play/pause____", curPos);
        flashVideoPlayer.pauseResume();
		
    }

    /* The updateStatus() function is called from the SWF file from the onStatus() method of the NetStream object. */
    function updateStatus(message, position) {
	    curPos=position;
        //document.forms['videoForm'].videoStatus.value = curPos+"+++" + message + "\n" + document.forms['videoForm'].videoStatus.value;
    }
    
    function toggleFullScreen(prod, pos, prt, pa, rp){  //positon, part, playAll, repeatPlay
	    curProduct=prod;
	    curPart=prt;
	    curPos=pos;
	    var url="http://www.learning2dance.com/fl/fs_stream.php?productId="+curProduct+"&partId="+curPart+"&positionId="+curPos+"&userId="+curUser+"&playAll="+pa+"&repeatPlay="+rp;
	    var w=screen.width;
	    var h=screen.height;
	    var winprop = "width=" + w + ",height=" + h + ",resizable=yes,status=no";
	    //callFlashPlayPauseVideo();
		openwin = window.open(url,'FS',winprop, "");
	    
	}