/*

    @file mw_lib_bigpond_movies_entertainmentportal_video.js

    $Id: mw_lib_bigpond_movies_entertainmentportal_video.js,v 1.3 2007/07/18 06:59:14 james Exp $

    @author     James Mc Parlane

    PROJECT:    MetaWrap JavaScript Library

    COMPONENT:  -

    @date       11 September 2004


    GENERAL INFO:

        Massive Technologies
        PO Box 567
        Darlinghurst 2010
        NSW, Australia
        email:  james@massive.com.au
        tel:    (+61-2) 9331 8699
        fax:    (+61-2) 9331 8699
        mob:    (+61) 407-909-186


    LICENSE:

    Copyright (C) 2006  Massive Technologies, Pty Ltd.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/

/*
 * $Log: mw_lib_bigpond_movies_entertainmentportal_video.js,v $
 * Revision 1.3  2007/07/18 06:59:14  james
 * *** empty log message ***
 *
 * Revision 1.2  2007/05/31 06:30:27  leon
 * changed it so it reads from input file, plays local movie as before but cannot access remote urls
 *
 * Revision 1.1  2007/05/25 07:27:40  james
 * Entertainment Video Portal
 *
 */

/*! \page mw_javascript_lib_bigpond_movies_entertainmentportal_video MetaWrap - JavaScript - Bigpond - Movies - Entertainmentportal - Video
 *
 * \subsection mw_javascript_lib_bigpond_movies_entertainmentportal_video Overview
 *
 */

//alert("$Id: mw_lib_bigpond_movies_entertainmentportal_video.js,v 1.3 2007/07/18 06:59:14 james Exp $");

/*! \defgroup mw_javascript_lib_bigpond_movies_entertainmentportal_video  MetaWrap - JavaScript - Bigpond - Movies - Entertainmentportal - Video
 *@{
 */

// Ensure we have the namespace we need
MwUse("MetaWrap","mw_lib.js");
MwUse("MetaWrap.Bigpond","mw_lib_bigpond.js");
MwUse("MetaWrap.Bigpond.Movies","mw_lib_bigpond_movies.js");
MwUse("MetaWrap.Bigpond.Movies.Entertainmentportal","mw_lib_bigpond_movies_entertainmentportal.js");

// Create namespace
/*! @name  MetaWrap.Bigpond.Movies.Entertainmentportal.Video*/
//@{

MetaWrap.Bigpond.Movies.Entertainmentportal.Video = {};

/*!
    @fn         function getFlashObject(p_id)
    @param
    @return     true on success - false on failure
    @brief
    @author     James Mc Parlane
    @date       10 June 2005
    @warning 	no longer used
*/
function getFlashObject(p_id)
{
    var isIE = navigator.appName.indexOf("Microsoft") != -1;
    var l_fobj = (isIE) ? window[p_id] : document[p_id];

    if (l_fobj == null)
    {
		error("getFlashObject: Unable to find flash object " + p_id);
	}

	return l_fobj;
}

/*!
    @fn         function JSInit(p_url)
    @param
    @return     true on success - false on failure
    @brief
    @author     James Mc Parlane
    @date       10 June 2005
    @warning 	no longer used
*/
function JSInit(p_url)
{
	//alert("JSInit('" + p_url + "')");

	try
	{
		g_video_player.launchVideo(p_url);//"testvideo/V8_Test_380.wmv");
	}
	catch(l_e)
	{
		debug(MetaWrap.exceptionMessage(l_e));
	}

	return true;
}


/*!
    @fn         JSBigpondTV JSInit(p_url)
    @param
    @return     true on success - false on failure
    @brief
    @author     James Mc Parlane
    @date       10 June 2005
    @warning 	no longer used
*/
function JSBigpondTV(p_url)
{
	alert("JSBigpondTV('" + p_url + "')");

	return true;
}

/*!
    @fn         function JSPlay()
    @param
    @return     true on success - false on failure
    @brief
    @author     James Mc Parlane
    @date       10 June 2005
    @warning 	no longer used
*/
function JSPlay()
{
	//alert("JSPlay()");

	try
	{
		g_video_player.playVideo();
	}
	catch(l_e)
	{
		debug(MetaWrap.exceptionMessage(l_e));
	}

	return true;
}


/*!
    @fn         function JSPause()
    @param
    @return     true on success - false on failure
    @brief
    @author     James Mc Parlane
    @date       10 June 2005
*/
function JSPause()
{
	//alert("JSPause()");

	try
	{
		g_video_player.pauseVideo();
	}
	catch(l_e)
	{
		debug(MetaWrap.exceptionMessage(l_e));
	}


	return true;
}


/*!
    @fn         function JSRestart()
    @param
    @return     true on success - false on failure
    @brief
    @author     James Mc Parlane
    @date       10 June 2005
    @warning 	no longer used
*/
function JSRestart()
{
	//alert("JSRestart()");

	try
	{
		g_video_player.restartVideo();
	}
	catch(l_e)
	{
		debug(MetaWrap.exceptionMessage(l_e));
	}

	return true;
}

/*!
    @fn         function JSMute(p_state)
    @param
    @return     true on success - false on failure
    @brief
    @author     James Mc Parlane
    @date       10 June 2005
    @warning 	no longer used
*/
function JSMute(p_muted)
{
	//alert("JSMute(" + p_state + ")");

	try
	{
		g_video_player.muteVideoVolume(p_muted);
	}
	catch(l_e)
	{
		debug(MetaWrap.exceptionMessage(l_e));
	}

	return true;
}


/*!
    @fn         function JSFullScreen()
    @param
    @return     true on success - false on failure
    @brief
    @author     James Mc Parlane
    @date       10 June 2005
    @warning 	no longer used
*/
function JSFullScreen()
{
	//alert("JSFullScreen()");

	try
	{
		g_video_player.fullscreenVideo(true);
	}
	catch(l_e)
	{
		debug(MetaWrap.exceptionMessage(l_e));
	}


	return true;
}


/*!
    @fn         function JSHide()
    @param
    @return     true on success - false on failure
    @brief
    @author     James Mc Parlane
    @date       10 June 2005
    @warning 	no longer used
*/
function JSHide()
{
	//alert("JSHide()");

	try
	{
		g_video_player.closeVideo();
	}
	catch(l_e)
	{
		debug(MetaWrap.exceptionMessage(l_e));
	}


	return true;
}


/*!
 *@} endgroup mw_javascript_lib_bigpond_movies_entertainmentportal_video MetaWrap - JavaScript - Bigpond - Movies - Entertainmentportal - Video
 */

/*!
 *@} end of mw_javascript_lib_bigpond_movies_entertainmentportal_video
 */