// Flash player
function ShowFlash(url, width, height, fullScreen)
{
	var fullScreen = fullScreen ? fullScreen : false; 
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="FlashPlayer" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab" width="' + width + '" height="' + height + '" VIEresuEXT>');
    document.write('<param name="movie" value="' + url + '">');
    document.write('<param name="quality" value="high">');
    document.write('<param name="wmode" value="transparent">');
	document.write('<param name="allowFullScreen" value="' + fullScreen + '">');
	document.write('<param name="allowScriptAccess" value="always">'); //sameDomain
    document.write('<embed src="' + url + '" quality="high" pluginspage="http://www.adobe.com/go/getflashplayer" name="FlashPlayer" type="application/x-shockwave-flash" width="' + width + '" height="' + height + '"></embed>');
    document.write('</object>');
}

// Windows Media player
function embedMediaPlayer( mediaUrl, showControls, autoPlay, loop, autoSize, width, height, mediaObjectId )
{
	var showControlsValue = (true == showControls) ? "true" : "false";
	var autoPlayValue = (true == autoPlay) ? "true" : "false";
	var autoSizeValue = (true == autoSize) ? "true" : "false";

	var str = "<object";
	str += ( "" == mediaObjectId ) ? "" : " id=\"" + mediaObjectId + "\"";
	str += ( "" == width || true == autoSize ) ? "" : " width=\"" + width + "\"";
	str += ( "" == height || true == autoSize ) ? "" : " height=\"" + height + "\"";
	str += " classid=\"clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95\" codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715\">";
	str += "<param name=\"FileName\" value=\"" + mediaUrl + "\">";
	str += "<param name=\"AutoStart\" value=\"" + autoPlayValue + "\">";
	str += "<param name=\"ShowTracker\" value=\"" + showControlsValue + "\">";
	str += "<param name=\"ShowControls\" value=\"" + showControlsValue + "\">";
	str += "<param name=\"ShowGotoBar\" value=\"false\">";
	str += "<param name=\"ShowDisplay\" value=\"false\">";
	str += "<param name=\"ShowStatusBar\" value=\"" + showControlsValue + "\">";
	str += "<param name=\"AutoSize\" value=\"" + autoSizeValue + "\">";
	str += (false == loop) ? "" : "<param name=\"PlayCount\" value=\"0\">";
	str += "<embed";
	str += ( "" == width || true == autoSize ) ? "" : " width=\"" + width + "\"";
	str += ( "" == height || true == autoSize ) ? "" : " height=\"" + height + "\"";
	str += ( false == loop ) ? "" : " PlayCount=\"0\"";
	str += " src=\"" + mediaUrl + "\" AutoStart=\"" + autoPlayValue + "\" ShowTracker=\"" + showControlsValue + "\" ShowControls=\"" + showControlsValue + "\" ShowGotoBar=\"false\" ShowDisplay=\"false\" ShowStatusBar=\"" + showControlsValue + "\" AutoSize=\"" + autoSizeValue + "\" pluginspage=\"http://www.microsoft.com/windows/windowsmedia/download/\"></embed>";
	str += "</object>";

	document.write( str );
}

// Sitemap
function showHideLayer(stat){
//alert(stat);
        if(stat){
                document.all.sitemap02.style.visibility="visible";
                document.all.sitemap01.style.visibility="hidden";				
        }else{
                document.all.sitemap02.style.visibility="hidden";
                document.all.sitemap01.style.visibility="visible";				
        }
}
