/*
	Flash Activete
	deute ²¨ ÈÉÃÄ¿Â zizzy;;
*/
function GnxFlashActivate ( strFlashUrl , n4Witdh , n4Height , strWmode , strId , strClassName , strFlashvar ) {
	//width,height ¿©ºÎ & ¹­À½ (width,height°¡ ¾øÀ»¶§´Â 0 À¸·Î ¼±¾ð)
	if (n4Witdh != 0) {
		objSize_attribute = " width='"+ n4Witdh +"' height='"+ n4Height +"'";
	} else {
		objSize_attribute = "";
	}
	//id ¿©ºÎ (ID ¼¿·º·ºÅÍ°¡ ¾øÀ»°æ¿ì 0À¸·Î¼±¾ð)
	if (strId != 0) {
		objId_attribute = " id='" + strId + "'";
		objId_IE_attribute = " id='" + strId + "'";
	} else {
		objId_attribute = "";
		objId_IE_attribute = "";
	}
	//class ¿©ºÎ (class°¡ ¾øÀ»¶§´Â 0 À¸·Î ¼±¾ð)
	if (strClassName != 0) {
		className_attribute = " class='" + strClassName + "'";
	} else {
		className_attribute = "";
	}
	//wmode ¿©ºÎ (wmode°¡ ¾øÀ»¶§´Â 0 À¸·Î ¼±¾ð)
	if (strWmode != 0) {
		wmode_param = "<param name='wmode' value='" + strWmode + "' />";
		wmode_attribute = " wmode='" + strWmode + "'";
	} else {
		wmode_param = "";
		wmode_attribute = "";
	}
	//Flashvar ¿©ºÎ (wmode°¡ ¾øÀ»¶§´Â 0 À¸·Î ¼±¾ð)
	if (strFlashvar != 0) {
		Flashvar_param = "<param name='flashvars' value='" + strFlashvar + "' />";
		Flashvar_attribute = " Flashvars='" + strFlashvar + "'";
	} else {
		Flashvar_param = "";
		Flashvar_attribute = "";
	}
	document.writeln( "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' " + objSize_attribute + objId_IE_attribute + className_attribute + ">" );
	document.writeln( "<param name='movie' value='"+ strFlashUrl +"' />" );
	document.writeln( "<param name='quality' value='high' />" );
	document.writeln( "<param name='allowScriptAccess' value='always' />" );
	document.writeln( wmode_param );
	document.writeln( Flashvar_param );
	document.writeln( "<!-- Hixie method -->" );
	document.writeln( "<!--[if !IE]> <-->" );
	document.writeln( "<object type='application/x-shockwave-flash' data='"+ strFlashUrl +"'" + Flashvar_attribute + objSize_attribute + objId_attribute + wmode_attribute + className_attribute + "></object>" );
	document.writeln( "<!--> <![endif]-->" );
	document.writeln( "</object>" );
}

/* »ç¿ë¹ý
<script type="text/javascript" language="JavaScript">
// <![CDATA[
	GnxFlashActivate('http://s.nx.com/S2/Bigshot2/swf/sub_nav.swf',890,175,'opaque','TopNavi','TopNavi','Flashvars');
// ]]>
</script>
*/

function GnxMovieActivate ( strMovieUrl , n4Width , n4Height , strId , n4AutoStart , n4ShowControls ) {
	//width,height ¿©ºÎ & ¹­À½ (width,height°¡ ¾øÀ»¶§´Â 0 À¸·Î ¼±¾ð)
	if (n4Width != 0) {
		if (n4ShowControls == 0) {
			Realn4Height = n4Height;	
		} else {
			Realn4Height = n4Height + 45;
		}
		objSize_attribute = " width='"+ n4Width +"' height='"+ Realn4Height +"'";
	} else {
		objSize_attribute = "";
	}
	//id ¿©ºÎ (ID ¼¿·ºÅÍ°¡ ¾øÀ»°æ¿ì 0À¸·Î ¼±¾ð ¹Ýµå½Ã ¼±¾ðµÇ¾î¾ßÇÔ)
	if (strId != 0) {
		objId_attribute = " id='" + strId + "'";
		objId_IE_attribute = " id='" + strId + "IE'";
	} else {
		objId_attribute = "";
		objId_IE_attribute = "";
	}

	//ShowControls ¿©ºÎ (ÄÁÆ®·ÑÈ­¸éÀ»°¡¸®°í ½ÍÀ»¶§´Â 0, º¸ÀÌ°í ½ÍÀ»¶§´Â 1)
	if (n4ShowControls == 0) {
		ShowControls_param = "<param name='showcontrols' value='false' />";
		ShowControls_attribute = " showcontrols='0'";
	} else if (n4ShowControls == 1){
		ShowControls_param = "<param name='showcontrols' value='true' />";
		ShowControls_attribute = " showcontrols='1'";
	}

	//AutoStart ¿©ºÎ (ÄÁÆ®·ÑÈ­¸éÀ»°¡¸®°í ½ÍÀ»¶§´Â 0, º¸ÀÌ°í ½ÍÀ»¶§´Â 1)
	if (n4AutoStart == 0) {
		AutoStart_param = "<param name='autostart' value='false' />";
		AutoStart_attribute = " autostart='0'";
	} else if (n4AutoStart == 1){
		AutoStart_param = "<param name='autostart' value='true' />";
		AutoStart_attribute = " autostart='1'";
	}
	document.writeln( "<object classid='CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95'" + objId_IE_attribute + objSize_attribute +">");
	document.writeln( "	<param name='AudioStream' value='-1' />");
	document.writeln( "	<param name='AutoSize' value='false' />");
	document.writeln( "	<param name='AnimationAtStart' value='true' />");
	document.writeln( "	<param name='AllowChangeDisplaySize' value='true' />");
	document.writeln( "	<param name='BufferingTime' value='5' />");
	document.writeln( "	<param name='Enabled' value='true' />");
	document.writeln( "	<param name='EnableContextMenu' value='true' />");
	document.writeln( "	<param name='EnableTracker' value='true' />");
	document.writeln( "	<param name='PlayCount' value='1' />");
	document.writeln( "	<param name='Rate' value='1' />");

	document.writeln( "	<param name='ShowCaptioning' value='false' /> <!-- ÀÚ¸· -->");
	document.writeln( "	<param name='ShowAudioControls' value='true' /> <!-- º¼·ýÁ¶Àý -->");
	document.writeln( "	<param name='ShowDisplay' value='false' /> <!-- ¹Ìµð¾îÁ¤º¸ -->");
	document.writeln( "	<param name='ShowPositionControls' value='true' /> <!-- Forward,Rewind -->");
	document.writeln( "	<param name='ShowStatusBar' value='false' /> <!-- »óÅÂ¹Ù -->");
	document.writeln( "	<param name='ShowTracker' value='true' /> <!-- Å½»ö¹Ù -->");
	
	document.writeln( "	<param name='Mute' value='false' />");
	document.writeln( AutoStart_param );
	document.writeln( ShowControls_param );
	document.writeln( "	<param name='FileName' value='" + strMovieUrl + "'>");

	document.writeln( "	<!-- Hixie method -->");
	document.writeln( "	<!--[if !IE]> <-->");
	document.writeln( "		<object type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' data='" + strMovieUrl + "' " + objSize_attribute + objId_attribute + AutoStart_attribute + ShowControls_attribute + ">");
	document.writeln( "	<!--> <![endif]-->");

	document.writeln( "</object>");

}

/* »ç¿ë¹ý
<script type="text/javascript" language="JavaScript">
// <![CDATA[
	GnxMovieActivate ( 'http://party.paran.com/hp/wmv/[MV]20050511_Side-B_JustDoIt(500k).wmv' , 320 , 240 , 'movie01' , 1 , 1 )
// ]]>
</script>
*/
