// 멀티미디어 출력용 (IE에서 플래쉬/동영상 주변에 점선 생김 방지용)
function displayMultimedia(src, width, height, wmode, auto_start , flashvars) {

    var wmode = wmode ? wmode : '';
    var auto_start  =   auto_start;

    var clsid			= "";
    var codebase	= "";
    var html			= "";
    var id				= "m" + Math.round(Math.random()*1000000);
    if ( typeof(flashvars)=="undefined" ) flashvars = "";


    if(/\.swf/i.test(src)) {
        clsid = "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";
        codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0";
        html = ""+
           "<object classid=\""+clsid+"\" codebase=\""+codebase+"\" width=\""+width+"\" height=\""+height+"\" id=\""+id+"\" flashvars=\""+flashvars+"\">"+
            (wmode ? "<param name=\"wmode\" value=\""+wmode+"\" />" : '')+
            "<param name=\"allowScriptAccess\" value=\"sameDomain\" />"+
            "<param name=\"movie\" value=\""+src+"\" />"+
            "<param name=\"quality\" value=\"high\" />"+
			 "<param name=\"flashvars\" value=\""+flashvars+"\" />"+
            "<embed src=\""+src+"\" autostart=\""+auto_start+"\"  width=\""+width+"\" height=\""+height+"\" flashvars=\""+flashvars+"\" wmode=\"transparent\" ></embed>"+
            "</object>";
    } else if(/\.flv/i.test(src)) {
        // html = "<embed src=\"/common/images/flvplayer/flvplayer.swf?autoStart="+auto_start+"&file="+src+"\" width=\""+width+"\" height=\""+height+"\" type=\"application/x-shockwave-flash\"></embed>";
	html = "<embed src=\"/common/images/flvplayer/flvplayer.swf\" allowfullscreen=\"true\" autostart=\""+auto_start+"\" width=\""+width+"\" height=\""+height+"\" flashvars=\"&file="+src+"&width="+width+"&height="+height+"&autostart="+auto_start+"\" />";
    } else {
        html = "<embed src=\""+src+"\" autostart=\""+auto_start+"\" width=\""+width+"\" height=\""+height+"\" flashvars=\""+flashvars+"\"></embed>";
    }


    document.writeln(html);
}





//	문자열의 양쪽 공백 없애기
String.prototype.trim = function() {
    return this.replace(/(^\s*)|(\s*$)/g, "");
}

// 배경음악
function music_on(){

    var music_path  =   '/images/flash/bgmusic.swf';
    var html =  '';
    html+=   '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="110" height="25" id="m5151515" flashvars="">';
    html+=   '<param name="wmode" value="transparent" />';
    html+=   '<param name="allowScriptAccess" value="sameDomain" />';
    html+=   '<param name="movie" value="'+music_path+'" />';
    html+=   '<param name="quality" value="high" />';
    html+=   '<param name="flashvars" value="" />';
    html+=   '<embed src="'+music_path+'" autostart="1"  width="110" height="25" flashvars="" wmode="transparent" >';
    html+=   '</embed>';
    html+=   '</object>';

    document.getElementById('music_player').innerHTML   =  html;

}

function music_off(){
    document.getElementById('music_player').innerHTML   =  '';
}

