/** Replaces the inner html of object obj with the HTML
 ** necessary to render the passed URL referencing the video
 **
 ** param obj - the HTML element to contain the video control
 ** param vidUrl - the URL referencing the media to be played
 **/
function showVideo(obj, vidUrl, myId) {
    var vidStr = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' id='" +myId + "' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,16,0' width='372' height='288' ><param name='movie' value='" + vidUrl + "'><param name='quality' value='high'><param name='play' value='true'><param name='LOOP' value='false'><param name='wmode' value='transparent'><embed src='" + vidUrl + "' name='" +myId + "' width='372' height='288' play='true' loop='false' wmode='transparent' swliveconnect='true' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash'></embed></object>";
    obj.innerHTML = vidStr;
}

function getFlashObject(movieId) {
    if (window.document[movieId]) {
	return window.document[movieId];
    }
    if (navigator.appName.indexOf("Microsoft Internet")==-1) {
	if (document.embeds && document.embeds[movieId])
	    return document.embeds[movieId]; 
    } else { // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
	return document.getElementById(movieId);
    }
}

function playFlash(movieId) {
    var flv = getFlashObject(movieId);
    flv.Play();
}

function stopFlash(movieId) {
    var flv = getFlashObject(movieId);
    flv.StopPlay();
}

function pauseFlash(movieId) {
    var flv = getFlashObject(movieId);
    flv.StopPlay();
}

