/******************************************************** 
   파일명 : lib.activex.js
   설  명 : Action X 컨트롤 출력 공통함수 모음
   작성자 : 김현배 
   작성일 : 2008.08.18 
   수정일 : 2008.08.18 
*********************************************************/ 


/**
	함수명 : printFlash
	설  명 : 플래시를 화면에 다시 출력한다.
	인  자 : 아이디, 경로, 넓비, 높이, 윈도우, 플래시변수,DIV명
	리  턴 : 
	사용법 : 
		f_id = "DIV_LeftNavi";
		"/swf/wb/naviLeft.swf?key_id=" + on_menu00 + on_menu01 + "&file_nm=" + leftGroupId + "&on_menu02=" + on_menu02 + "&on_menu03=" + on_menu03;
		f_width = "170";
		f_height ="800";
		f_trans ="";
		f_para ="";
		printFlash(f_id,f_name,f_width,f_height,f_trans,f_para);
 */
function printFlash(fid,src,wid,hei,wmd,fvs) {
    this.fPrint = '';
    this.Src = src;
    this.Width = wid;
    this.Height = hei;
    this.FlashVars = (fvs != undefined)? fvs :'';
    this.Wmod = (wmd != undefined)? wmd :'';
    fPrint = '<object id="' + fid + '" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10.0.12.36"';
    fPrint += ' width="'+Width+'"';
    fPrint += ' height="'+Height+'">';
    fPrint += '<param name="allowScriptAccess" value="always">';
	fPrint += '<PARAM NAME=wmode VALUE=transparent>';
    fPrint += '<param name="movie" value="'+Src+'">';
    fPrint += '<param name="quality" value="high">';
    fPrint += (FlashVars != null) ? '<param name="FlashVars" value="'+FlashVars+'">' : '';
    fPrint += (Wmod != null) ? '<param name="wmode" value="'+Wmod+'">' : '';
    fPrint += '<embed';
    fPrint += fPrint + ' src="'+Src+'"';
    fPrint += (FlashVars != null) ? ' FlashVars="'+FlashVars+'"' : '';
    fPrint += (Wmod != null) ? ' wmode="'+Wmod+'"' : '';
    fPrint += ' quality="high"';
    fPrint += ' allowScriptAccess="always"';
    fPrint += ' pluginspage="http://www.macromedia.com/go/getflashplayer"';
    fPrint += ' type="application/x-shockwave-flash"';
    fPrint += ' width="'+Width+'"';
    fPrint += ' height="'+Height+'"';
    fPrint += '></embed>';
    fPrint += '</object>';
    
	document.write(fPrint);
}
/**
	함수명 : printFlash
	설  명 : 플래시를 화면에 다시 출력한다.
	인  자 : 아이디, 경로, 넓비, 높이, 윈도우, 플래시변수,DIV명
	리  턴 : 
	사용법 : 
		f_id = "DIV_LeftNavi";
		"/swf/wb/naviLeft.swf?key_id=" + on_menu00 + on_menu01 + "&file_nm=" + leftGroupId + "&on_menu02=" + on_menu02 + "&on_menu03=" + on_menu03;
		f_width = "170";
		f_height ="800";
		f_trans ="";
		f_para ="";
		printFlash(f_id,f_name,f_width,f_height,f_trans,f_para);
 */
function printFlashStr(fid,src,wid,hei,wmd,fvs) {
    this.fPrint = '';
    this.Src = src;
    this.Width = wid;
    this.Height = hei;
    this.FlashVars = (fvs != undefined)? fvs :'';
    this.Wmod = (wmd != undefined)? wmd :'';
    fPrint = '<object id="' + fid + '" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0"';
    fPrint += ' width="'+Width+'"';
    fPrint += ' height="'+Height+'">';
    fPrint += '<param name="allowScriptAccess" value="always">';
	fPrint += '<PARAM NAME=wmode VALUE=transparent>';
    fPrint += '<param name="movie" value="'+Src+'">';
    fPrint += '<param name="quality" value="high">';
    fPrint += (FlashVars != null) ? '<param name="FlashVars" value="'+FlashVars+'">' : '';
    fPrint += (Wmod != null) ? '<param name="wmode" value="'+Wmod+'">' : '';
    fPrint += '<embed';
    fPrint += fPrint + ' src="'+Src+'"';
    fPrint += (FlashVars != null) ? ' FlashVars="'+FlashVars+'"' : '';
    fPrint += (Wmod != null) ? ' wmode="'+Wmod+'"' : '';
    fPrint += ' quality="high"';
    fPrint += ' allowScriptAccess="always"';
    fPrint += ' pluginspage="http://www.macromedia.com/go/getflashplayer"';
    fPrint += ' type="application/x-shockwave-flash"';
    fPrint += ' width="'+Width+'"';
    fPrint += ' height="'+Height+'"';
    fPrint += '></embed>';
    fPrint += '</object>';
    
	return fPrint;
}


/**
	함수명 : printMedia
	설  명 : 동영상을 화면에 출력한다.
	인  자 : 파일경로, 가로, 세로
	리  턴 : 
	사용법 : 
		<script>printMedia(url, w, h);</script>
 */
function printMedia(url ,w, h, id){
	var movieStr=

	"<object classid=clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95 width="+w+" height="+h+" id="+id+" VIEWASTEXT>" +
	"<param name='animationatstart' value='false'>" +
	"<param name='autostart' value='1'>" +
	"<param name='Filename' value='" + url + "'>" +
	"<param name='AutoRewind' value='1'>" +
	"<param name='showtracker' value='1'>" +
	"<param name='showcontrols' value='1'>" +
	"<param name='showdisplay' value='0'>" +
	"<param name='ShowStatusBar' value='0'>" +
	"<param name='EnableContextMenu' value='1'>" +
	"<param name='TransparentAtStart' value='1'>" +
	"</object>"
	document.write(movieStr);
}


/**
	함수명 : printSecureKeyboard
	설  명 : 보안키보드모듈을 설치한다.
	인  자 : 파일경로, 가로, 세로
	리  턴 : 
	사용법 : 
		<script>printSecureKeyboard();</script>
 */
function printSecureKeyboard(){
	document.write("보안키보드설치");
}