﻿// 플래쉬
function fnFlashPlay(strUrl, numWidth, numHeight)     
{
    document.write('<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="'+ numWidth +'" height="'+ numHeight +'" VIEWASTEXT><param name="movie" value="'+ strUrl +'"><param name="quality" value="high"><param name="wmode" value="transparent"><embed src="'+ strUrl +'" quality="high" align="right" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ numWidth +'" height="'+ numHeight +'" wmode="transparent"></embed></object>');
}
function statusHide(){
window.status = '장로회신학대학교 도서관';
return true;
}

//추천도서목록 팝업
function BestBookSub()
{
    var optstr = "scrollbars=yes,toolbar=no,width=200,height=200,location=no,status=no,directory=no,menubar=no,resizable=no,top=100,left=400";
	window.open("/WebPCTS/aspx/BestBookPopup.aspx","bestbook",optstr);	
}

/* 특정 부분을 출력할때 쓰임 */
function print_content(width,height){
 //alert("dfdf");
 window.open("/WebPCTS/aspx/print_content.htm","","width="+width+",height="+height+",scrollbars=1,resizable=1,directories=0,menubar=0");

}

//main 플래쉬 박스표시제거
function DisplayFlashBox()
{
var __embed_target_id = null;
var __embed_tags = {object:true,embed:true,applet:true}

if(document.attachEvent){
	document.attachEvent('onreadystatechange',
		function embed_patch(){
			if(__embed_target_id===null){
				var __target = document;
			}else{
				var __target = document.getElementById(__embed_target_id);
			}
			if (document.readyState == "complete"){
				function _replace(obj){
					var obj_re = document.createElement(obj.outerHTML);
					obj.parentNode.replaceChild(obj_re,obj);
				}
				function _inner(obj){
					obj.insertAdjacentHTML('beforeBegin',obj.outerHTML);			
					obj.parentNode.removeChild(obj);
				}
				if(__embed_tags.object===true){
					//object 패치
					var objs = __target.getElementsByTagName('object');
					var i = objs.length;
					while(i-->0){
						_inner(objs[i]);
					}
				}
				if(__embed_tags.embed===true){
					//embed 패치
					var objs = __target.getElementsByTagName('embed');
					var i = objs.length;
					while(i-->0){
						_replace(objs[i])
					}
				}
				if(__embed_tags.applet===true){
					//applet 패치
					var objs = __target.getElementsByTagName('applet');
					var i = objs.length;
					while(i-->0){
						_replace(objs[i])
					}
				}
			}
		}
	)
}
}
