/*
Flash Activating Script
********************************************
* Writer      : ±èµ¿ÀÓ
* Date        : 2006-02-27
* Last Update : 
********************************************

'------------------------------------------------------------------
'FlashScriptIns(sname,sid,swidth,sheight,swmode,sbgcolor,setc)
	sname: source url
	sid: flash id 
	swidth: source width
	sheight: source height
	swmode: "none, transparent, opaque"
	sbgcolor : source bgcolor
	setc : ±âÅ¸ ÆÄ¶ó¹ÌÅÍ "<param name='myParam' value='myValue' />
	ex ) DocumentWrite(FlashScriptIns('flash/flash.swf','flash','100','150','transparent','no',''));
	     SetInnerHTML(document.all.mm, FlashScriptIns('flash/flash.swf','flash','100','150','transparent','no',''));
'------------------------------------------------------------------



'------------------------------------------------------------------
'ObjectScriptIns(sclassid, scodebase, sname, sid, swidth,sheight, setc)
	classid: classid --> ÇÃ·¡½¬ ÆÄÀÏÀÇ °æ·Î
	codebase: cabÆÄÀÏ À§Ä¡ ¹× ¹öÀüÁ¤º¸ 
	name :
	id :
	width: source width
	height: source height

	wmode: wmode --> "none, transparent, opaque"
	setc : Ãß°¡ ÆÄ¶ó¹ÌÅÍ "<param name='myParam' value='myValue' />
'------------------------------------------------------------------
*/

function FlashScriptIns(sname,sid,swidth,sheight,swmode, sbgcolor, setc){	
	var tagTxt;

		tabTxt = "<object type=\"application/x-shockwave-flash\" classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" width="+swidth+" height="+sheight+" id="+sid+">";
		tabTxt = tabTxt + "<param name=wmode value="+swmode+" />";
		tabTxt = tabTxt + "<param name=allowScriptAccess value=always />";
		tabTxt = tabTxt + "<param name=menu value=false>";

	if (sbgcolor != 'no'){
		tabTxt = tabTxt + "<param name=bgcolor value="+sbgcolor+" />";
	}

	if (setc != 'no'){
		tabTxt = tabTxt + setc;
	}
		tabTxt = tabTxt + "<param name=movie value="+sname+" />";		
		tabTxt = tabTxt + "<param name=quality value=high />";
		tabTxt = tabTxt + "<embed src="+sname+" quality=high wmode="+swmode+" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" width="+swidth+" height="+sheight+">";
		tabTxt = tabTxt + "</embed>";
		tabTxt = tabTxt + "</object>";
	
	return tabTxt;
}

function ObjectScriptIns(sclassid, scodebase, sname, sid, swidth,sheight, setc){
	var tagTxt;
	tabTxt = "<object classid="+sclassid+" codebase="+scodebase+" name="+sname+" width="+swidth+" height="+sheight+" id="+sid+">";
	tabTxt = tabTxt + "<param name=wmode value="+swmode+" />"
	tabTxt = tabTxt + setc;
	tabTxt = tabTxt + "</object>";
	return tabTxt;
}

// assign code innerHTML
function SetInnerHTML(target, code){ 
	target.innerHTML = code; 
}

// write document contents
function ScriptWrite(src){
	document.write(src);
}
