// ################## Script For Flash & ActiveX #########################

// +++++++++++++  MakeFlashString(source,id,width,height,wmode) ++++++++
// 
// source: source url --> ÇÃ·¡½¬ ÆÄÀÏÀÇ °æ·Î
// id: flash id 
// width: source width
// height: source height
// wmode: wmode --> "none, transparent, opaque"
// otherparam : Ãß°¡ ÆÄ¶ó¹ÌÅÍ "<param name='myParam' value='myValue' />
// 
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


// +++++++++++++  MakeObjectString(classid, codebase, name, id, width,height, param) ++++++++
// 
// classid: classid --> ÇÃ·¡½¬ ÆÄÀÏÀÇ °æ·Î
// codebase: cabÆÄÀÏ À§Ä¡ ¹× ¹öÀüÁ¤º¸ 
// name :
// id :
// width: source width
// height: source height
// 
// wmode: wmode --> "none, transparent, opaque"
// param : Ãß°¡ ÆÄ¶ó¹ÌÅÍ "<param name='myParam' value='myValue' />
// 
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

// Example 
// DocumentWrite(MakeFlashString('image/ml_flash.swf','emb1','330','520','opaque'));
// SetInnerHTML(document.all.mm, MakeFlashString('image/ml_flash.swf','emb1','330','520','opaque'));
// @@ÁÖÀÇ »çÇ× 
//  - »óÈ£ÀÛ¿ë ¾ø´Â ÄÁÅÙÃ÷´Â DocumentWrite, SetInnerHTML µÑ´Ù »ç¿ë °¡´É
//  - »óÈ£ÀÛ¿ë ÀÖ´Â ÄÁÅÙÃ÷´Â SetInnerHTML¸¸ »ç¿ë °¡´É
// #######################################################################


function MakeFlashString(source,id,width,height,wmode,otherParam)
{	
	return "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0\" width="+width+" height="+height+" id="+id+"><param name=wmode value="+wmode+" /><param name=movie value="+source+" /><param name=quality value=high /><param name=menu value=false />"+otherParam+"<embed src="+source+"  quality=high   menu=false  wmode="+wmode+" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash\" width="+width+" height="+height+"></embed></object>";
}

function MakeObjectString(classid, codebase, name, id, width,height, param)
{
	return "<object classid="+classid+" codebase="+codebase+" name="+name+" width="+width+" height="+height+" id="+id+" ><param name=wmode value="+wmode+" />"+param+"</object>";
}

// innerHTML Type
function SetInnerHTML(target, code)
{ 
	target.innerHTML = code; 
}

// Direct Write Type
function DocumentWrite(src)
{
	document.write(src);
}


function swfLoad(sUrl,sWidth,sHeight,sName,sAlign,sColor,sTrans) {
	document.write('<EMBED src="' + sUrl + '" quality=high' + ' bgcolor=' + sColor + ' wmode="'+ sTrans +'"  WIDTH="' + sWidth + '" HEIGHT="' + sHeight + '" NAME="' + sName + '" ALIGN="' + sAlign + '"');
	document.write(' TYPE="application/x-shockwave-flash"');
	document.write(' PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">');
	document.write('</EMBED>');
}

function swf_obj(src,w,h,swfid){
	swf_html = '';
	swf_html += '<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="'+w+'" height="'+h+'" id="'+swfid+'" align="middle">';
	swf_html += '<param name="allowScriptAccess" value="always">';
	swf_html += '<param name="movie" value="'+src+'">';
	swf_html += '<param name="quality" value="high">';
	swf_html += '<param name="bgcolor" value="#FFFFFF">';
	swf_html += '<PARAM NAME="wmode" VALUE="transparent">';
	swf_html += '<embed src="'+src+'" quality="high" bgcolor="#FFFFFF" width="'+w+'" height="'+h+'" name="'+swfid+'" align="middle" allowScriptAccess="always" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">';
	swf_html += '</object>';
	//document.write(swf_html);
	document.write(swf_html);
}

function FlashMainbody(Ftrans,wid,hei) {
	mainbody = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='"+ wid +"' height='"+ hei +"'>";
	mainbody += "<param name='movie' value='"+ Ftrans +"'>";
	mainbody += "<param name='quality' value='high'>";
	mainbody += "<param name='wmode' value='transparent'>";
	mainbody += "<param name='menu' value='false'>";
	mainbody += "<embed src='"+ Ftrans +"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+ wid +"' height='"+ hei +"'></embed>"
	mainbody += "</object>";

	//document.body.innerHTML = mainbody;
	document.write(mainbody);
	return;
}
