/*---------------------------------------------------------------------
	File to contain general functions
-----------------------------------------------------------------------*/

/*-------------------------------
	Flash Functions
---------------------------------*/


function PlaceFlashContent(bFlashEnabled, sID, iWidth, iHeight, sPath, sBaseFileName, sBGColor, sHref, sTarget)
{
	if ( bFlashEnabled ) {
		//alert("PlaceFlashContent");
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
		document.write('  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=3,0,0,0" ');
		document.write(' id="' + sID + '" width="' + iWidth + '" height="' + iHeight + '" align="">');
		document.write(' <param name="movie" value="' + sPath + sBaseFileName +'.swf" />');
		document.write(' <param name="quality" value="high" />');
		document.write(' <param name="wmode" value="opaque" />');
		if (sBGColor != null) {
			document.write(' <param name="bgcolor" value="#' + sBGColor + '" />  ');
			document.write(' <embed src="' + sPath + sBaseFileName +'.swf" quality="high" wmode="opaque" bgcolor="#' + sBGColor + '"  ');
		} else {
			document.write(' <embed src="' + sPath + sBaseFileName +'.swf" quality="high" wmode="opaque"  ');
		}
		document.write(' swLiveConnect="FALSE" width="' + iWidth + '" height="' + iHeight + '" name="' + sID + '" align=""');
		document.write(' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">');
		document.write(' </embed>');
		document.write(' </object>');

	}
}


function PlaceFlashMenu(bFlashEnabled, sID, iWidth, iHeight, sPath, sBaseFileName, sBGColor, sHref, sTarget)
{	
	if (!document.getElementById) return
	if ( bFlashEnabled ) {
		//alert("PlaceFlashMenu");
		var mainNavRoot = document.getElementById("Nav");
		for (h=0; h<mainNavRoot.childNodes.length; h++) {
			node = mainNavRoot.childNodes[h];
			if (node.nodeName=="UL") {
				node.className = 'FlashNavEnabled';
			}
		}
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
		document.write('  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=3,0,0,0" ');
		document.write(' id="' + sID + '" width="' + iWidth + '" height="' + iHeight + '" align="">');
		document.write(' <param name="movie" value="' + sPath + sBaseFileName +'.swf" />');
		document.write(' <param name="quality" value="high" />');
		document.write(' <param name="wmode" value="opaque" />');
		if (sBGColor != null) {
			document.write(' <param name="bgcolor" value="#' + sBGColor + '" />  ');
			document.write(' <embed src="' + sPath + sBaseFileName +'.swf" quality="high" wmode="opaque" bgcolor="#' + sBGColor + '"  ');
		} else {
			document.write(' <embed src="' + sPath + sBaseFileName +'.swf" quality="high" wmode="opaque"  ');
		}
		document.write(' swLiveConnect="FALSE" width="' + iWidth + '" height="' + iHeight + '" name="' + sID + '" align=""');
		document.write(' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">');
		document.write(' </embed>');
		document.write(' </object>');

	}
}



