function fnLoadMediaPlayer(divTagName, file, width, height, image)
{
    if (image == null)
    {
        image = "media/default.png";
    }

// SWFObject
    var so = new SWFObject("mediaplayer/player.swf", "ply", width, height, "9", "#000000");
    so.addParam("allowfullscreen", "true");
    so.addParam("allowscriptaccess","always");
    so.addParam("wmode", "opaque");
    so.addVariable("file", file);
    so.addVariable("image", image);
    so.addVariable("controlbar", "over");
    so.write(divTagName);
// SWFObject

/* JW Embedder (center alignment is tricky)
    jwplayer(divTagName).setup
    ({
        "flashplayer": "mediaplayer/player.swf",
        "image":       image,
        "file":        file,
        "controlbar":  "over",
        "fullscreen":  "true",
        "stretching":  "true",
        "width":       width,
        "height":      height
    });
*/
}

function fnRightUlClick(iCount, iRowCount)
{
	if (document.getElementById("idRightUl_"+iCount).style.display == "block")
	{
		document.getElementById("idRightUl_"+iCount).style.display = "none";
	}
	else
	{
		document.getElementById("idRightUl_"+iCount).style.display = "block";
	}
/*
	var x;

	for(x=0;x<iRowCount;x++)
	{
		document.getElementById("idRightUl_"+x).style.display =
			x==iCount ? "block" : "none";
	}
*/
}

function fnPreCode(obj)
{
	if(navigator.userAgent.indexOf("MSIE") != -1)
	{
		obj.focus();
		window.clipboardData.setData("text", obj.innerText);
		window.alert("This code has been copied to Windows clipboard\n(Only for Microsoft Windows Internet Explorer (IE)).");
	}
}

function fnOptHint(obj)
{
	if(navigator.userAgent.indexOf("MSIE") != -1)
	{
		obj.title = "Double click to copy to Windows clipboard\n(Only for Microsoft Windows Internet Explorer (IE)).";
	}
}

function fnSetBrowserTitle(sTitle)
{
	document.title = sTitle;
}
