﻿
function fnWrite(strTarget){
	document.write(strTarget);
}

function fnEmbedSubMenu(strParamPath,intWidth,intHight){
	var strObject;
	strObject =	"<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='" + intWidth + "' height='" + intHight + "'  id='sub_navi' />" +
					"<param name='allowScriptAccess' value='always' />" +
					"<param name='base' value='" + strParamPath + "' />" +
					"<param name='movie' value='" + strParamPath + "'/>" +
					"<param name='quality' value='high'/>" +
					"<param name='wmode' value='transparent'/>" +
					"<param name='menu' value='false'>" +
					"<embed src='" + strParamPath + "' quality='high' wmode='transparent' base='" + strParamPath + "' width='" + intWidth + "' height='" + intHight + "' name='sub_navi' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />" +
				"</object>"
	fnWrite(strObject);
}

function GnxFlashActivate ( strFlashUrl , n4Witdh , n4Height , strWmode , strId , strClassName , strFlashvar, strStartTime ) {

	if (n4Witdh != 0) {
		objSize_attribute = " width='"+ n4Witdh +"' height='"+ n4Height +"'";
	} else {
		objSize_attribute = "";
	}

	if (strId != 0) {
		objId_attribute = " id='" + strId + "'";
		objId_IE_attribute = " id='" + strId + "'";
	} else {
		objId_attribute = "";
		objId_IE_attribute = "";
	}

	if (strClassName != 0) {
		className_attribute = " class='" + strClassName + "'";
	} else {
		className_attribute = "";
	}

	if (strWmode != 0) {
		wmode_param = "<param name='wmode' value='" + strWmode + "' />";
		wmode_attribute = " wmode='" + strWmode + "'";
	} else {
		wmode_param = "";
		wmode_attribute = "";
	}

	if (strFlashvar != 0) {
		Flashvar_param = "<param name='flashvars' value='" + strFlashvar + "' />";
		Flashvar_attribute = " Flashvars='" + strFlashvar + "'";
	} else {
		Flashvar_param = "";
		Flashvar_attribute = "";
	}
	
	if (strStartTime != 0) {
		StartTime_param = "<param name='startTime' value='" + strStartTime + "' />";
		StartTime_attribute = " startTime='" + strStartTime + "'";
	} else {
		StartTime_param = "";
		StartTime_attribute = "";
	}

	document.writeln( "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,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='menu' value='0' />" );
	document.writeln( "<param name='allowScriptAccess' value='always' />" );
	document.writeln( "<param name='allowFullScreen' value='true' />" );
	document.writeln( wmode_param );
	document.writeln( Flashvar_param );
	document.writeln( StartTime_param );
	document.writeln( "<!-- Hixie method -->" );
	document.writeln( "<!--[if !IE]> <-->" );
	document.writeln( "<object type='application/x-shockwave-flash' allowScriptAccess='always' data='"+ strFlashUrl +"'" + Flashvar_attribute + objSize_attribute + objId_attribute + wmode_attribute + className_attribute + StartTime_attribute +"></object>" );
	document.writeln( "<!--> <![endif]-->" );
	document.writeln( "</object>" );
}


//Footer 패밀리 사이트 이동 함수
function fnGoFamilySite(value) {
	if (value != "") {
		window.open(value, 'family', '');
	}
}

function fnFanMoviePrev(strMov, width, height, divName) {
	var strObject;

	strObject =	"<object id='mbox' width='" + width + "' height='" + height + "' classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95'  codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.%20cab#Version=5,1,52,701' standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject' VIEWASTEXT>" +
					"<param name='FileName' value='" + strMov + "'>" +
					"<param name='ShowControls' value='0'>" +
					"<param name='ShowStatusBar' value='0'>" +
					"<param name='ShowGoToBar' value='0'>" +
					"<param name='AutoStart' value='1'>" +
					"<param name='ClickToPlay1' value='1'>" +
					"<PARAM NAME='Volume' value='-600'>" +
					"<embed TYPE='application/x-mplayer2' pluginspage='http://www.microsoft.com/windows/mediaplayer/en/download/Win32I E4x86.asp' src='video/04_gfather_I.wmv'>" +
				"</object>"

	document.getElementById(divName).innerHTML = strObject;
}



function fnMovie(strMov, width, height) {


    document.writeln( "<object style='border:5 #A1BADF solid;background:#000000;' id=player name=player classid=CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95 width='"+width+"' height='"+height+"' type=application/x-oleobject standby=\"Loading Microsoft Windows Media Player components...\">" );
    document.writeln( "            <param name=\"FileName\" value=\""+strMov+"\">" );
    document.writeln( "            <param name=\"ANIMATIONATSTART\" value=\"0\">" );
    document.writeln( "            <param name=\"AUTOSTART\" value=\"1\">" );
    document.writeln( "            <param name=\"BALANCE\" value=\"0\">" );
    document.writeln( "            <param name=\"CURRENTMARKER\" value=\"0\">" );
    document.writeln( "            <param name=\"CURRENTPOSITION\" value=\"0\">" );
    document.writeln( "            <param name=\"DISPLAYMODE\" value=\"4\">" );
    document.writeln( "            <param name=\"ENABLECONTEXTMENU\" value=\"0\">" );
    document.writeln( "            <param name=\"ENABLED\" value=\"1\">" );
    document.writeln( "            <param name=\"FULLSCREEN\" value=\"0\">" );
    document.writeln( "            <param name=\"INVOKEURLS\" value=\"1\">" );
    document.writeln( "            <param name=\"PLAYCOUNT\" value=\"1\">" );
    document.writeln( "            <param name=\"RATE\" value=\"1\">" );
    document.writeln( "            <param name=\"SHOWCONTROLS\" value=\"1\">" );
    document.writeln( "            <param name=\"SHOWSTATUSBAR\" value=\"-1\">" );
    document.writeln( "            <param name=\"STRETCHTOFIT\" value=\"0\">" );
    document.writeln( "            <param name=\"TRANSPARENTATSTART\" value=\"1\">" );
    document.writeln( "            <param name=\"UIMODE\" value=\"FULL\">" );
    document.writeln( "            <param name=\"displaybackcolor\" value=\"0\">" );
    document.writeln( "            <param name=\"SendMouseClickEvents\" value=\"1\">" );
    document.writeln( "            <param name=\"SendPlayStateChangeEvents\" value=\"1\">" );
    document.writeln( "</object>" );


}
