	// Get a reference to the SWF object.
	function getSWF(movieName) 
	{ 
		if (navigator.appName.indexOf("Microsoft") != -1) 
		{ 
			return window[movieName]; 
		} 
		else 
		{ 
			return document[movieName]; 
		} 
	}
	
	function playVideo() 
	{ 
		getSWF("joe_player").playVideo(); 
	} 
	
	function stopVideo() 
	{ 
		getSWF("joe_player").stopVideo(); 
	} 
	
	function setUpJoeButtons()
	{
		// "hide button function" to hide joe video and swap hide button with play button
	    $("#btnHideJoe").click(function () {
	            $("#btnPlayJoe").show();	//show "play" button
	            $("#btnHideJoe").hide();	//hide "hide" button
			stopVideo(); // Call the ActionScript to tell the video to stop playing.
			$("#joeVideoContainer").css("visibility","hidden");	//hide joe video
	            //$("#joeVideoContainer").hide();	//hide joe video
	        });
	    
	    // "play button function" to play joe video and swap play button with hide button
	    $("#btnPlayJoe").click(function () {
	            $("#btnHideJoe").show();	//show "hide" button
	            $("#btnPlayJoe").hide();	//hide "play" button
			playVideo(); // Call the ActionScript to tell the video to play.
	            $("#joeVideoContainer").css("visibility","visible");	//show joe video
	            //$("#joeVideoContainer").show();	//show joe video
	        });
	}

