
    var myListener = new Object();

        	/**
        	 * Initialisation
        	 */
        	myListener.onInit = function()
        	{
                    //alert("p");
                    //setTimeout(function() { stop(); play(); } , 1000);
                    getFlashObject().SetVariable("method:setVolume", 0);
                    getFlashObject().SetVariable("method:setUrl", "videos/video-FCC-cinema.flv");
                    getFlashObject().SetVariable("method:play", "");
        	};
        	/**
        	 * onClick event on the video
        	 */
        	myListener.onClick = function()
        	{
        		//getFlashObject().SetVariable("method:setVolume", 0);
                        if(myListener.volume == 0)
                            getFlashObject().SetVariable("method:setVolume", 100);
                        else getFlashObject().SetVariable("method:setVolume", 0);
        	};
        	/**
        	 * onKeyUp event on the video
        	 */
        	myListener.onKeyUp = function(pKey)
        	{
        		document.getElementById("info_key").innerHTML = pKey;
        	};
        	/**
        	 * onComplete event
        	 */
        	myListener.onFinished = function()
        	{
        		stop(); play();
        	};
        	/**
        	 * Update
        	 */
        	myListener.onUpdate = function()
        	{
        		
        	};

        	function getFlashObject()
        	{
        		return document.getElementById("myFlash");
        	}
                
            function play()
            {
            	if (myListener.position == 0) {
	                getFlashObject().SetVariable("method:setUrl", "videos/video-FCC-cinema.flv");
                }
                getFlashObject().SetVariable("method:play", "");
            }
            function pause()
            {
                getFlashObject().SetVariable("method:pause", "");
            }
            function stop()
            {
                getFlashObject().SetVariable("method:stop", "");
            }
            
            function setVolume()
            {
            	var volume = document.getElementById("inputVolume").value;
            	getFlashObject().SetVariable("method:setVolume", volume);
            }
            function loadImage()
            {
            	var url = document.getElementById("inputImage").value;
            	var depth = document.getElementById("inputImageDepth").value;
            	var verticalAlign = document.getElementById("inputImageVertical").value;
            	var horizontalAlign = document.getElementById("inputImageHorizontal").value;

            	getFlashObject().SetVariable("method:loadMovieOnTop", url+"|"+depth+"|"+verticalAlign+"|"+horizontalAlign);
            }
            function unloadImage()
            {
            	var depth = document.getElementById("inputUnloadDepth").value;
            	getFlashObject().SetVariable("method:unloadMovieOnTop", depth);
            }


$(document).load(function() {


});
