// JavaScript Document

    /**
     *  This method swaps the home page flash with the similar looking image.
     */
    function SwapHomeFlashWithImage(swapFlashWithImage)
    {
        var flashcontent=document.getElementById('flashcontent');
        var divHomeFlashEndImg=document.getElementById('divHomeFlashEnd');
         
         if (flashcontent!=null && divHomeFlashEndImg!=null)
         {
            if (swapFlashWithImage==true)
            {
                //Swap the flash div with Image div
                flashcontent.style.display="none";
                divHomeFlashEndImg.style.display="block";
            }
            else
            {
                //Swap the Image div with flash div  
               //alert(swapFlashWithImage);
                divHomeFlashEndImg.style.display="none";
                flashcontent.style.display="block";
            }
         }   
    }
    /**
	 * POP window specific configuration for book player
	 */
	function OpenOnlineLearning()
	{
	   
	    window.open('book/book.html','Meth360_Online_Learning',"toolbar=no,width=771,height=659;","");
		
	}
	
	
	/**
	 * Expects the specified movie ID to have an external API with a method "pauseMovie"
	 * 
	 * @param String html ID of swf movie
	 * @return void
	 */
    function pauseMovie(movieID) {
        getFlashMovie(movieID).pauseMovie();
    }
	
	/**
	 * Expects the specified movie ID to have an external API with a method "playMovie"
	 * 
	 * @param String html ID of swf movie
	 * @return void
	 */
    function playMovie(movieID) {
        getFlashMovie(movieID).playMovie();
    }
	
	/**
	 * Helper method to pause the specified movie, and open the course player
	 * 
	 * @param String html ID of swf movie
	 * @return void
	 */
	function launchCourse(movieID){
		//pauseMovie(movieID);
		
		OpenOnlineLearning();
		window.location.href="Register.aspx";
	}
	
	function goToOnlineLearning()
	{
	    window.open('onlineLearningCourse.aspx','_top');
	}
	
	/**
	 * Helper method to redirect parent window and close course player
	 * 
	 * @param String html ID of swf movie
	 * @return void
	 */
	function closeCourse(){
		redirectParent("../Register.aspx");
		parentFocus();
	}
	
	function downloadCertificate(){
	    redirectParent("../Certificate.aspx");
	    parentFocus();
	}
	