function showHideNote(divId,index,event) {
    var notediv = $('#' + divId);
	if(index > -1)
	{
	    notediv.html("<div style='width:100%;text-align:left;padding:5px 5px 5px 5px;'>" + unescape(notes[index].replace(/\+/g, "&nbsp;")) + "</div>");
	}
	if(notediv.css("display") != "block") {
	    var mX = $(document).data('mouseX');
	    var mY = $(document).data('mouseY');
	    notediv.css({
	        "display": "block",
	        "position": "absolute",
	        "top": mY - 20,
	        "left": mX + 20,
	        "zIndex": 10
	    });
	}
	else {
	    notediv.html("");
	    notediv.css("display", "none");
	}
}

function showHideDiv(divId,rlaid)
{
	var obj = document.getElementById(divId);
	embedFlash(obj,rlaid);
	if(obj.style.display != "block")
	{
		obj.style.top = "0";
		obj.style.left = "0";
		obj.style.display = "block";
		obj.style.position = "absolute";
		obj.style.zIndex = "10";
	}
	else
	{
		obj.innerHTML = "";
		obj.style.display = "none";
	}
}

function embedFlash(obj,rlaid)
{
	var swfNode = "";
	var swfPath = "http://localhost/ltcitraining/media/";
	var swfFile = "reallifeapplication.swf";

	swfNode += '<OBJECT ';
	swfNode += 'codeBase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"';
	swfNode += 'height="100%"';
	swfNode += 'width="100%"';
	swfNode += 'align="middle"'; 
	swfNode += 'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">';
	swfNode += '<PARAM NAME="_cx" VALUE="14552">';
	swfNode += '<PARAM NAME="_cy" VALUE="10583">';
	swfNode += '<PARAM NAME="FlashVars" VALUE="">';
	swfNode += '<PARAM NAME="Movie" VALUE="' + swfPath + swfFile + '">';
	swfNode += '<PARAM NAME="Src" VALUE="' + swfPath + swfFile + '?rlaid=' + rlaid + '">';
	swfNode += '<PARAM NAME="WMode" VALUE="Transparent">';
	swfNode += '<PARAM NAME="Play" VALUE="-1">';
	swfNode += '<PARAM NAME="Loop" VALUE="-1">';
	swfNode += '<PARAM NAME="Quality" VALUE="High">';
	swfNode += '<PARAM NAME="SAlign" VALUE="">';
	swfNode += '<PARAM NAME="Menu" VALUE="-1">';
	swfNode += '<PARAM NAME="Base" VALUE="">';
	swfNode += '<PARAM NAME="AllowScriptAccess" VALUE="sameDomain">';
	swfNode += '<PARAM NAME="Scale" VALUE="ShowAll">';
	swfNode += '<PARAM NAME="DeviceFont" VALUE="0">';
	swfNode += '<PARAM NAME="EmbedMovie" VALUE="0">';
	swfNode += '<PARAM NAME="BGColor" VALUE="FFFFFF">';
	swfNode += '<PARAM NAME="SWRemote" VALUE="">';
	swfNode += '<PARAM NAME="MovieData" VALUE="">';
	swfNode += '<PARAM NAME="SeamlessTabbing" VALUE="1">';
	swfNode += '<PARAM NAME="Profile" VALUE="0">';
	swfNode += '<PARAM NAME="ProfileAddress" VALUE="">';
	swfNode += '<PARAM NAME="ProfilePort" VALUE="0">';
	swfNode += '<PARAM NAME="scale" VALUE="noscale">';
	swfNode += '<embed ';
	swfNode += '	src="' + swfPath + swfFile + '?rlaid=' + rlaid + '" ';
	swfNode += '	scalse="noscale"';
	swfNode += '	quality="high" ';
	swfNode += '	wmode="transparent" ';
	swfNode += '	bgcolor="#ffffff" ';
	swfNode += '	width="100%" ';
	swfNode += '	height="100%" ';
	swfNode += '	name="testpanel" ';
	swfNode += '	align="middle" ';
	swfNode += '	allowscriptaccess="sameDomain" ';
	swfNode += '	type="application/x-shockwave-flash" ';
	swfNode += '	pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	swfNode += '</OBJECT>';

	obj.innerHTML = '<a href="javascript:hideDiv();"><img alt="CLOSE" src="../images/close.gif" border="0"></a>';
	obj.innerHTML += swfNode;
}

