//ºê¶ó¿ìÁ® Ã¼Å©
appname = navigator.appName;
useragent = navigator.userAgent;
if(appname == "Microsoft Internet Explorer") appname = "IE";
IE55 = (useragent.indexOf('MSIE 5.5')>0);  //5.5 ¹öÀü
IE6 = (useragent.indexOf('MSIE 6')>0);     //6.0 ¹öÀü
IE7 = (useragent.indexOf('MSIE 7')>0);     //7.0 ¹öÀü
IE8 = (useragent.indexOf('MSIE 8')>0);     //8.0 ¹öÀü
//¿ÀºêÁ§Æ® È£Ãâ
function swfprint(objid,furl,fwidth,fheight,transoption,flashvars,pscale) {
	if(pscale == null) {
		pscale = "noscale";
	}
	if (typeof(scheme) == 'undefined' || scheme == null) {
		scheme = 'http';
	}

	var ieTxt = '<object id="'+ objid +'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+scheme+'"://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="'+ fwidth +'" height="' + fheight +'" align="middle">';
	ieTxt += '<param name="allowScriptAccess" value="always"/>';
	ieTxt += '<param name="movie" value="'+ furl +'"/>';
	ieTxt += '<param name="quality" value="high"/>';
	ieTxt += '<param name="bgcolor" value="#ffffff"/> ';
	ieTxt += '<param name="salign" value="T"/> ';
	ieTxt += '<param name="menu" value="false"/> ';
	if (flashvars) ieTxt += '<param name="flashVars" value="'+ flashvars +'">';
	if (transoption == "t") {
		ieTxt += '<param name="wmode" value="transparent"/>';
	} else if	(transoption == "o") {
		ieTxt += '<param name="wmode" value="opaque"/>';
	}
	ieTxt += '</object>';

	var ffTxt = '<object id="'+ objid +'" type="application/x-shockwave-flash" data="'+ furl +'" width="'+ fwidth +'" height="' + fheight +'"';
	if (flashvars) ffTxt += ' flashVars="'+ flashvars +'" ';
	if (transoption == "t")	{
		ffTxt += ' wmode="transparent"';
	} else if (transoption == "o") {
		ffTxt += ' wmode="opaque"';
	}
	ffTxt +='allowScriptAccess="always"';
	ffTxt += '></object>';

	if(appname=="IE") document.write(ieTxt);
	else  document.write(ffTxt);
}

function setEmbed() {
	var obj = new String; 
	var parameter = new String; 
	var embed = new String; 
	var html = new String; 
	var allParameter = new String; 
	var clsid = new String; 
	var codebase = new String; 
	var pluginspace = new String; 
	var embedType = new String; 
	var src = new String; 
	var width = new String; 
	var height = new String; 

	this.init = function(getType , s ,w , h , t ) {
		if ( getType == "flash") {
			clsid = "D27CDB6E-AE6D-11CF-96B8-444553540000";
			codebase = "http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"; 
			pluginspage = "http://www.macromedia.com/go/getflashplayer"; 
			embedType = "application/x-shockwave-flash"; 
		}
		/* type Ãß°¡ 
		else if ( ) {
		} 
		*/

		parameter += "<param name='movie' value='"+ s + "'>\n";
		parameter += "<param name='quality' value='high'>\n";
	
		if(t == "1"){
			parameter += "<param name='wmode' value='transparent'>\n";
		}

		src = s;
		width = w;
		height = h;
	}

	this.parameter = function( parm , value ) {
		parameter += "<param name='"+parm +"' value='"+ value + "'>\n";
		allParameter += " "+parm + "='"+ value+"'";
	}

	this.show = function() {
		if (clsid) {
			obj = "<object classid=\"clsid:"+ clsid +"\" codebase=\""+ codebase +"\" width='"+ width +"' height='"+ height +"'>\n";
		}

		embed = "<embed src='" + src + "' pluginspage='"+ pluginspage + "' type='"+ embedType + "' width='"+ width + "' height='"+ height +"'"+ allParameter +" ></embed>\n";

		if (obj) {
			embed += "</object>\n"; 
		}

		html = obj + parameter + embed;

		document.write(html);
	}
}
