/***************************************************************************************************/
// 사용예시 //

//<a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('객체명','','파일경로이름',1);"><img src="img/topmenu01.gif" width="87px" height="26px" name="객체명"></a>

/***************************************************************************************************/
// Dreamweaver //

function MM_preloadImages() { //v3.0
	var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
		var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
		if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
	var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v3.0
	var p,i,x;	if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_swapImage() { //v3.0
	var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
	 if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_showHideLayers() { //v3.0
	var i,p,v,obj,args=MM_showHideLayers.arguments;
	for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
		if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
		obj.visibility=v; }
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	if (restore) selObj.selectedIndex=0;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
	window.open(theURL,winName,features);
}
//08.04.20,추가
//function MM_openBrWindow_weather() { //v2.0
	//window.open('/weather/01.jsp','Weather','left=0,top=0,width=669,height=569,scrollbars=no,resizable=no');

//2009.01.19, 날씨 링크 팝업창 사이즈 수정 추가
function MM_openBrWindow_weather() { //v2.0
	window.open('/weather/01.jsp','Weather','left=0,top=0,width=745,height=569,scrollbars=no,resizable=no');
	
}


function SelectOpen(theURL) { //v2.0
     if(!theURL){ 
	 }else {
		 window.open(theURL);
	 }
}

/***************************************************************************************************/
// DOMScript //

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}

function insertAfter(newElement,targetElement) {
  var parent = targetElement.parentNode;
  if (parent.lastChild == targetElement) {
    parent.appendChild(newElement);
  } else {
    parent.insertBefore(newElement,targetElement.nextSibling);
  }
}

function addClass(element,value) {
  if (!element.className) {
    element.className = value;
  } else {
    newClassName = element.className;
    newClassName+= " ";
    newClassName+= value;
    element.className = newClassName;
  }
}

/***************************************************************************************************/
// myshin JavaScript v2006.12.02 // 개별사용



/***************************************************************************************************/
// myshin JavaScript v2007.07.10 // 공통사용

//IE6 png 사용
//ex).png24 { tmp:expression(setPng24(this)); }
function setPng24(obj) {
		obj.width=obj.height="1";
		obj.className=obj.className.replace(/\bpng24\b/i,"");
		obj.style.filter=	"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');"
		obj.src=""; 
		return "";
}

/* IE HTML rewrite */
//ex) IE_HtmlRewrite(document.getElementById("object요소부모id이름"));
function IE_HtmlRewrite(objParent) {
	if (window.ActiveXObject && objParent) {
		objParent.innerHTML = objParent.innerHTML;
	}
}

//도메인 미정 링크
//ex) <a href="/korea/data/information/info/1/week/101.html" onclick="domainLink(this.href); return false;" onkeypress="">a</a>
function domainLink(url) {
	var url = url.replace("http://"+document.domain, "");
	url = "/korea/data/information/subway_schedule.php?url=" + url;
	window.open(url,'','width=550,height=550,scrollbars=yes,left=20,top=20');
}

//컨텐츠체인지
//ex) rotate(5);
function change(changeid,a,rcnt) {
//  var changeid = 1;
//  var a = 1;

  for (i=1;i<=rcnt;i++) {
    if(i<10){inn="0"+i;} else {inn=""+i;}
    changeMenu = document.getElementById("change"+changeid+"m"+i);
    changeContent = document.getElementById("change"+changeid+"c"+i);
    if (changeMenu) { changeMenu.src="/img/main/"+"change"+changeid+"m"+ann+".gif"; }
    if (changeContent) { changeContent.style.display="none"; }
    if (changeContent) { changeContent.style.visibility="hidden"; }
  }
  if(a<10){ann="0"+a;} else {ann=""+a;}
  changeContent = document.getElementById("change"+changeid+"c"+a);
  changeMenu = document.getElementById("change"+changeid+"m"+a);
  if (changeMenu) { changeMenu.src="/img/main/"+"change"+changeid+"m"+ann+"on.gif"; }
  if (changeContent) { changeContent.style.display="block"; }
  if (changeContent) { changeContent.style.visibility="visible"; }
}
//로테이트
var rotate_count = 1;
var interval = 5000;
var timer = '';
var cMouseOver = false;

function rotate(rcnt) {
  if (rotate_count > rcnt) rotate_count = 1;
  if (!cMouseOver) {
		change(1,rotate_count,rcnt);
		++rotate_count;
		}
	timer = setTimeout("rotate("+rcnt+");",interval);
}
function rotatePause() {
  clearTimeout(timer);
}


//컨텐츠탭4차메뉴보기
//ex) initContentTabMenu(4차인덱스);
function initContentTabMenu(d)
{
	var obj = document.getElementById("contenttabmenu").getElementsByTagName("li");
	for (i=0; i<obj.length; i++) {
	ctab4Menu = document.getElementById("ctab4m"+(i+1));
	ctab4MenuA = ctab4Menu.getElementsByTagName("a")[0];
	ctab4MenuImg = ctab4Menu.getElementsByTagName("img")[0];
		if(ctab4Menu){
			ctab4MenuA.style.color="#555";
			ctab4Menu.style.backgroundPosition="0 0";
			ctab4MenuA.style.backgroundPosition="100% 0";
			if(ctab4MenuImg){ ctab4MenuImg.src = ctab4MenuImg.src.replace("on.gif", ".gif");	}
		}
	}
	ctab4MenuCurr = document.getElementById("ctab4m" + d);
	ctab4MenuCurrA = ctab4MenuCurr.getElementsByTagName("a")[0];
	ctab4MenuCurrImg = ctab4MenuCurr.getElementsByTagName("img")[0];
	if(ctab4MenuCurr){
		ctab4MenuCurrA.style.color="#fff";
//		ctab4MenuCurrA.style.background="#6295ca";
//		ctab4MenuCurr.style.borderColor="#6295ca";
		ctab4MenuCurr.style.backgroundPosition="0 -100px";
		ctab4MenuCurrA.style.backgroundPosition="100% -100px";
		if(ctab4MenuCurrImg){ ctab4MenuCurrImg.src = ctab4MenuCurrImg.src.replace(".gif", "on.gif");	}
	}
}
//컨텐츠메뉴보기
//ex) initContentMenu(4차인덱스);
function initContentMenu(d)
{
	var obj = document.getElementById("contentmenu").getElementsByTagName("li");
	for (i=0; i<obj.length; i++) {
		c4Menu = obj[i];
		c4MenuA = c4Menu.getElementsByTagName("a")[0];
		if(c4Menu){ c4MenuA.style.color="#666"; c4MenuA.style.fontWeight="normal"; }
	}
	c4MenuCurr = obj[d-1];
	c4MenuCurrA = c4MenuCurr.getElementsByTagName("a")[0];
	if(c4MenuCurr){ c4MenuCurrA.style.color="#000"; c4MenuCurrA.style.fontWeight="bold";	}
}

//바로가기
function goUri(uri,target) { 
	if(uri!="") { window.open(uri,target); }
}
//목록상자바로가기
function goSelect(form,target) {
	var myindex=form.uri.selectedIndex
	myUri = form.uri.options[myindex].value;
	if(myUri!="") { window.open(myUri,target); }
}


// 마우스오버아웃
function imgOver(imgEl) { imgEl.src = imgEl.src.replace(".gif", "on.gif"); }
function imgOut(imgEl) { imgEl.src = imgEl.src.replace("on.gif", ".gif"); }
function menuOver() { this.src = this.src.replace(".gif", "on.gif"); }
function menuOut() { this.src = this.src.replace("on.gif", ".gif"); }

//이미지롤오버함수할당
//ex) initImgRoll("containerId");
function initImgRoll(containerId) { 
 	imgEl = document.getElementById(containerId).getElementsByTagName("img");
	for (i=0; i<imgEl.length; i++) {
		var menuImg = imgEl[i]
		var where = menuImg.src.indexOf("on.gif",0)
		if (where==-1) {
				menuImg.onmouseover = menuOver;
				menuImg.onmouseout = menuOut;
		}
	}
}

//글자크기 
//ex) onclick="setFontSize(+1);"	 onclick="setFontSize(-1);"
function setFontSize(a) {
	var defaultFontSize = 1;//em
	var minFontSize = 1;//em
	var maxFontSize = 2;//em
	obj = document.getElementById("body");
	var objFontSize = obj.style.fontSize;
	if (!objFontSize) { objFontSize = parseFloat(defaultFontSize)+"em"; }
	var checkFontSize = (Math.round(12*parseFloat(objFontSize))+(a*2))/12;
	if (checkFontSize >= maxFontSize) { checkFontSize = maxFontSize; obj.style.fontSize = checkFontSize+"em"; alert("더이상 늘릴 수 없습니다."); }
	else if (checkFontSize <= minFontSize) { checkFontSize = minFontSize; obj.style.fontSize = checkFontSize+"em"; alert("더이상 줄일 수 없습니다."); }
	else { obj.style.fontSize = checkFontSize+"em"; }
//	alert(checkFontSize);
}


//셀렉트롤
//ex) initSelect("selectId","optionId");
function initSelect(selectId,optionId) { 
 	selectEl = document.getElementById(selectId);
 	optionEl = document.getElementById(optionId);
	selectEl.onmouseover = selectEl.getElementsByTagName("a")[0].onfocus = function selectOver() {
		selectEl.style.background = selectEl.style.background.replace(".gif", "on.gif");
		optionEl.style.display = "block";
	}
	option_last_index = selectEl.getElementsByTagName("a").length-1;
	selectEl.onmouseout = selectEl.getElementsByTagName("a")[option_last_index].onblur = function selectOut() {
		selectEl.style.background = selectEl.style.background.replace("on.gif", ".gif");
		optionEl.style.display = "none";
	}
}

// 탭메뉴 공통적으로 사용
//ex) tabOn(1,1);
moreLink = new Array(6);
moreClick = new Array(6);
for (i=0;i<6;i++) {
	moreLink[i] = new Array(6);
	moreClick[i] = new Array(6);
}
moreLink[0][0]="#n"; moreClick[0][0]=""; //
moreLink[0][1]="#n"; moreClick[0][1]=""; //
moreLink[0][2]="#n"; moreClick[0][2]=""; //
moreLink[1][0]="#n"; moreClick[1][0]=""; //
moreLink[1][1]="#n"; moreClick[1][1]=""; //
moreLink[1][2]="#n"; moreClick[1][2]=""; //
moreLink[1][3]="#n"; moreClick[1][3]=""; //

function tabOn(tabid,a) {
	for (i=1;i<=10;i++) {
		if(i<10){inn="0"+i;} else {inn=""+i;}
		tabMenu = document.getElementById("tab"+tabid+"m"+i);
		tabContent = document.getElementById("tab"+tabid+"c"+i);
		if (tabMenu) { //객체가존재하면
			if (tabMenu.tagName=="IMG") { tabMenu.src="/img/main/"+"tab"+tabid+"m"+inn+".gif"; } //이미지일때
			if (tabMenu.tagName=="A") { //앵커일때
				tabMenu.style.background="transparent url(/img/main/tab"+tabid+"mbg.gif) no-repeat";
				tabMenu.style.padding="1px 0 0 0";
				tabMenu.style.fontWeight="normal";
				}
		}
		if (tabContent) { tabContent.style.display="none"; }
	}
	if(a<10){ann="0"+a;} else {ann=""+a;}
	tabMenu = document.getElementById("tab"+tabid+"m"+a);
	tabContent = document.getElementById("tab"+tabid+"c"+a);
//	alert(tabMenu.tagName);
	if (tabMenu) { //객체가존재하면
		if (tabMenu.tagName=="IMG") { tabMenu.src="/img/main/"+"tab"+tabid+"m"+ann+"on.gif"; } //이미지일때
		if (tabMenu.tagName=="A") { //앵커일때
			tabMenu.style.background="transparent url(/img/main/tab"+tabid+"mbgon.gif) no-repeat";
			tabMenu.style.padding="2px 0 0 0";
			tabMenu.style.fontWeight="bold";
			}
	}
	if (tabContent) { tabContent.style.display="block"; }
	tabMore = document.getElementById("tab"+tabid+"more");
	if (tabMore) { 
		tabMore.href = moreLink[tabid-1][a-1];
		tabMore.onclick = moreClick[tabid-1][a-1];
	}
}


// 팝업
function openWin(url,wn,sc,ww,wh,le,to) {
	openwin = window.open(url,wn,"'" + "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=" + sc + ",resizable=yes,width=" + ww + " ,height=" + wh + ",left=" + le + ",top=" + to + "'");
	return false;
}
// 팝업모니터중앙
function popMid(url,wn,ww,wh,sc) {
	le = (screen.width-ww)/2;
	to = (screen.height-wh)/2;
	openwin = window.open(url,wn,"'" + "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=" + sc + ",resizable=yes,width=" + ww + " ,height=" + wh + ",left=" + le + ",top=" + to + "'");
	return false;
}

// 보이기감추기토글
//ex) displayToggle('t01');
function displayToggle(arg) {
	obj = document.getElementById(arg);
	if(obj.style.display == "block") obj.style.display = "none";
	else obj.style.display = "block";
}

// 보이기감추기
//ex) displayOff('idName','idName'); displayOn('idName','idName'); //인수 개수에 상관없다.
function displayOn() {
	var i,j,a=displayOn.arguments;
	for(i=0;i<a.length;i++) {
		obj = document.getElementById(a[i]);
		if (obj) { obj.style.display = "block"; }
	}
}
function displayOff() {
	var i,j,a=displayOff.arguments;
	for(i=0;i<a.length;i++) {
		obj = document.getElementById(a[i]);
		if (obj) { obj.style.display = "none"; }
	}
}

// 나만보이기
//ex) displayOnly('id이름중공통되는부분',전체수,현재순번); //현재순번의 객체만 보여준다
function displayOnly(coId,num,curr) {
	for (i=1;i<= num;i++) {
		var obj = document.getElementById(coId+i);
		if (obj) { obj.style.display = "none"; }
	}
	var obj = document.getElementById(coId+curr);
	if (obj) { obj.style.display = "block"; }
}
// class="Value" 정확히 일치시 보이기감추기
//ex) classDisplay('item restaurant','block');classDisplay('item lodging','none');
function classDisplay(tagClassVal,val) {
	var objs = getElementsByClassName(tagClassVal);
	for(var i=0; i<objs.length; i++) {
		objs[i].style.display = val;
	}
}
//모든 태그를 배열에 넣고 인수로 받아온 클래스이름과 일치하는 태그의 배열값을 배열로 리턴
function getElementsByClassName(clsName) { 
var arr = new Array(); 
	var elems = document.getElementsByTagName("*");
	for ( var i = 0; ( elem = elems[i] ); i++ ) {
		if ( elem.className == clsName ) {
			arr[arr.length] = elem;
		}
	}
	return arr;
}
// selector 일치시 보이기감추기
//ex) selectorDisplay('#business_register div.restaurant','block');selectorDisplay('#business_register div.lodging','none');
function selectorDisplay(selector,val) {
	var objs = document.getElementsBySelector(selector);
	for(var i=0; i<objs.length; i++) {
		objs[i].style.display = val;
	}
}

// 활성표시
//ex) activeOnly('id이름중공통되는부분',전체수,현재순번); //현재순번의 객체만 활성화한다.
function activeOnly(coId,num,curr) {
	for (i=1;i<= num;i++) {
		var obj = document.getElementById(coId+i);
		if (obj) { obj.style.fontWeight = "normal"; }
		if (obj) { obj.style.backgroundColor = "#fff"; }
		if (obj) { obj.style.letterSpacing = "-1px"; }
		if (obj) { obj.getElementsByTagName("a")[0].style.color = "#666"; }
	}
	var obj = document.getElementById(coId+curr);
	if (obj) { obj.style.fontWeight = "bold"; }
	if (obj) { obj.style.backgroundColor = "#fa4"; }
	if (obj) { obj.style.letterSpacing = "-2px"; }
	if (obj) { obj.getElementsByTagName("a")[0].style.color = "#fff"; }
}

//이벤트위치에보여주기
function eventOnOff(a) {
	eventX = event.x;
	eventY = event.y;
	obj = document.getElementById(a);
	obj.style.left = eventX;
	obj.style.top = eventY;
	obj.style.visibility = "visible";
}

//쿠키
function setCookie( name, value, expiredays )
{
	var todayDate = new Date();
	todayDate.setDate( todayDate.getDate() + expiredays );
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

function getCookie( name )
{
	var nameOfCookie = name + "=";
	var x = 0;
	while ( x <= document.cookie.length )
	{
		var y = (x+nameOfCookie.length);
		if ( document.cookie.substring( x, y ) == nameOfCookie ) {
			if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
				endOfCookie = document.cookie.length;
			return unescape( document.cookie.substring( y, endOfCookie ) );
		}
		x = document.cookie.indexOf( " ", x ) + 1;
		if ( x == 0 )
			break;
	}
	return "";
}

/**
 * ticker effect
 * 
 * ex) initTicker(document.getElementById("banner-scroll"), document.getElementById("banner-content"), 3000);
 */
var tickerEl = new Array();
function initTicker(tickerContainer, tickerContent, delay) {
	tickerEl[tickerEl.length] = tickerContainer;
	tickerContainer.moveOffset = tickerContainer.offsetHeight;
	tickerContainer.count = 0;
	tickerContainer.delay = delay / 20;
	tickerContainer.cont = tickerContent;
	tickerContainer.cont.currentHeight = 0;
	tickerContainer.cont.innerHTML += tickerContainer.cont.innerHTML;
	tickerContainer.move = setInterval("tickerRoll()", 10); //초기값80..작을수록스크롤속도증가
}

function tickerRoll() {
	for (i=0; i<tickerEl.length; i++) {
		if (tickerEl[i].cont.currentHeight % tickerEl[i].moveOffset == 0 && tickerEl[i].count < tickerEl[i].delay) {
			tickerEl[i].count++;
		} else {
			tickerEl[i].count = 0;
			tickerEl[i].cont.currentHeight--;
			tickerEl[i].cont.style.top = tickerEl[i].cont.currentHeight + "px";
			if (tickerEl[i].cont.currentHeight % (tickerEl[i].cont.offsetHeight / 2) == 0) {
				tickerEl[i].cont.currentHeight = 0;
			}
		}
	}
}

//IE Flicker Bug 해결
(function(){
	/*Use Object Detection to detect IE6*/
	var  m = document.uniqueID /*IE*/
	&& document.compatMode  /*>=IE6*/
	&& !window.XMLHttpRequest /*<=IE6*/
	&& document.execCommand ;
	try{
		if(!!m){ m("BackgroundImageCache", false, true) /* = IE6 only */ }
	}catch(oh){};
})();

/***************************************************************************************************/
// iacts JavaScript //

//RSS주소복사
//ex) copyFeed('1');
function copyFeed(Arg){
	var doc = document.body.createTextRange();
	var tmp = document.getElementById("FeedUrl"+Arg);
	doc.moveToElementText(tmp);
	doc.select();
	doc.execCommand("copy");
	alert("RSS 주소가 복사되었습니다.\n다운받은 프로그램을 열고\n붙여넣기 하시면 완료됩니다.");
}

function contentPrint() { // 프린트스크립트
	var windowLeft = (screen.width-700)/2;
//	var windowTop = (screen.height-480)/2;
	var windowTop = 20;
	var printURL = "/share/inc/printpage.html";
	 window.open(printURL,"content",'width=700, height=620, menubar=yes, scrollbars=yes,status=no,resizable=yes,top=' + windowTop + ',left=' + windowLeft + '');
}

// 플로터
//ex) JSFX_FloatDiv("wing",880,143).floatIt(); //플로터 객체 아래에 삽입
var ns = (navigator.appName.indexOf("Netscape") != -1);
var d = document;
function JSFX_FloatDiv(id, sx, sy)
{
	var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
	var px = document.layers ? "" : "px";
	window[id + "_obj"] = el;
	if(d.layers)el.style=el;
	el.cx = el.sx = sx;el.cy = el.sy = sy;
	el.sP=function(x,y){this.style.left=x+px;this.style.top=y+px;};

	el.floatIt=function()
	{
		var pX, pY;
		pX = (this.sx >= 0) ? 0 : ns ? innerWidth : 
		document.documentElement && document.documentElement.clientWidth ? 
		document.documentElement.clientWidth : document.body.clientWidth;
		pY = ns ? pageYOffset : document.documentElement && document.documentElement.scrollTop ? 
		document.documentElement.scrollTop : document.body.scrollTop;
		if(this.sy<0) 
		pY += ns ? innerHeight : document.documentElement && document.documentElement.clientHeight ? 
		document.documentElement.clientHeight : document.body.clientHeight;
		this.cx += (pX + this.sx - this.cx)/8;this.cy += (pY + this.sy - this.cy)/8;
		this.sP(this.cx, this.cy);
		setTimeout(this.id + "_obj.floatIt()", 40);
	}
	return el;
}

// 플로터 - 범위제한
//ex) initMoving("idname",884,500);
function initMoving(id,xleft,ytop) {
	target = document.getElementById(id);
	if (!target) return false;
	var obj = target;
	obj.initLeft = xleft;//절대좌표x
	obj.initTop = ytop;//절대좌표y
	obj.bottomLimit = document.documentElement.scrollHeight - 220;
	obj.topLimit = 550;

	obj.style.position = "absolute";
	obj.top = obj.initTop;
	obj.left = obj.initLeft;
	obj.style.top = obj.top + "px";
	obj.style.left = obj.left + "px";

	obj.getTop = function() {
		if (document.documentElement.scrollTop) {
			return document.documentElement.scrollTop;
		} else if (window.pageYOffset) {
			return window.pageYOffset;
		} else {
			return 0;
		}
	}
	obj.getHeight = function() {
		if (self.innerHeight) {
			return self.innerHeight;
		} else if(document.documentElement.clientHeight) {
			return document.documentElement.clientHeight;
		} else {
			return 500;
		}
	}
	obj.move = setInterval(function() {
		pos = obj.getTop() + obj.getHeight() / 2 - 15;

		if (pos > obj.bottomLimit)
			pos = obj.bottomLimit
		if (pos < obj.topLimit)
			pos = obj.topLimit

		interval = obj.top - pos;
		obj.top = obj.top - interval / 3;
		obj.style.top = obj.top + "px";
	}, 40)
}

// 플래시
function getflash(url,wid,hei,mode,tl,scale) //Flash8
{
	document.writeln('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+ wid +'" height="'+ hei +'">');//IE,Op
	document.writeln('<param name="movie" value="'+ url +'" />');
	document.writeln('<param name="quality" value="high" />');
	document.writeln('<param name="wmode" value="'+ mode +'" />');
	document.writeln('<param name="salign" value="'+ tl +'" />');
	document.writeln('<param name="scale" value="' + scale + '" />');
	document.writeln('<!--[if !IE]> <-->');
	document.writeln('<object type="application/x-shockwave-flash" data="'+ url +'" width="'+ wid +'" height="'+ hei +'">');//FF
	document.writeln('<param name="movie" value="'+ url +'" />');
	document.writeln('<param name="quality" value="high" />');
	document.writeln('<param name="wmode" value="'+ mode +'" />');
	document.writeln('<param name="salign" value="'+ tl +'" />');
	document.writeln('<param name="scale" value="' + scale + '" />');
	document.writeln('<div>이 콘텐츠는 Flash로 제작되었습니다.<br />이 콘텐츠를 보려면 <a tabindex="0" href="http://www.adobe.com/kr/products/flashplayer/">Flash Player</a>(무료)가 필요합니다.</div>');
	document.writeln('</object>');
	document.writeln('<!--> <![endif]-->');
	document.writeln('</object>');
}

// 동영상
function getvodWMV7(murl,mw,mh) //WMPlayer ver7 이상
{
	(mw)? mw = mw : mw = 320;
	(mh)? mh = mh : mh = 310;
	document.writeln('<object classid="clsid:6bf52a52-394a-11d3-b153-00c04f79faa6" type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#version=6,4,7,1112"');//IE 전용 ActiveX
	document.writeln(' id="player" width="'+ mw +'" height="'+ mh +'">');//IE : 크기를 %로 하면 마우스 오버해야 보임.
	document.writeln('<param name="url" value="'+ murl +'" /> ');
	document.writeln('<param name="autoStart" value="false" />');
	document.writeln('<param name="uiMode" value="full" />');
	document.writeln('<param name="stretchToFit" value="true" />');
	document.writeln('<param name="fullScreen" value="false" />');
	document.writeln('<!--[if !IE]>-->');//IE 조건주석문 - 없으면 IE6에서 2번 보임.
	document.writeln('<object type="video/x-ms-wmv" data="'+ murl +'" width="'+ mw +'" height="'+ mh +'">');//FF,Op,Sf 사용.. parameter 부분지원
	document.writeln('<param name="autostart" value="false" />'); //Vista FF, Op WMP11 지원
	document.writeln('<div>동영상파일 : <a tabindex="0" href="'+ murl +'">'+ murl +'</a></div>');//대체콘텐츠
	document.writeln('</object>');
	document.writeln('<!--<![endif]-->');
	document.writeln('');//여기에 대체콘텐츠를 두면 안됨
	document.writeln('</object>');
}
/*
* 테스트
Win2000Pro WMP9: IE, FF, Op 정상동작, 키보드탐색가능
Vista WMP11 : IE 정상동작, FF 플러그인 설치 후 정상동작
Op 플러그인 C:\Program Files\Opera\program\plugins 폴더에 npds.zip npdsplay.dll npwmsdrm.dll 직접 복사 후 재생가능.
Sf 플러그인 설치 후 플레이어 표시되지만 재생불가

* 동영상제어
player.fullScreen = true;
player.controls.play();
player.controls.stop();
player.controls.pause();
player.uiMode = "full"; //value="full|mini|none|invisible|custom"
player.controls.currentPosition += 10;
player.settings.volume += 10;
player.settings.volume -= 10;
player.settings.mute = true;
player.settings.mute = false;
player.style.width="220px";
player.style.height="45px";
*/

function getvodWMV(murl,mw,mh) //WMPlayer ver6.4 이하
{
	(mw)? mw = mw : mw = 320;
	(mh)? mh = mh : mh = 310;
	document.writeln('<object classid="clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95" type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112"');//IE 전용 ActiveX
	document.writeln(' id="player" width="'+ mw +'" height="'+ mh +'">');//IE : 크기를 %로 하면 마우스 오버해야 보임.
	document.writeln('<param name="filename" value="'+ murl +'" /> ');
	document.writeln('<param name="autoStart" value="false" />');
	document.writeln('<!--[if !IE]> <-->');//IE 조건주석문 - 없으면 IE6에서 2번 보임.
	document.writeln('<object type="video/x-ms-wmv" data="'+ murl +'" width="'+ mw +'" height="'+ mh +'">') ;//FF,Op,Sf 사용.. parameter 부분지원
	document.writeln('<param name="autostart" value="false" />'); //Vista FF WMP11 만 지원
	document.writeln('<div>동영상파일 : <a tabindex="0" href="'+ murl +'">'+ murl +'</a></div>');//대체콘텐츠
	document.writeln('</object>');
	document.writeln('<!--> <![endif]-->');
	document.writeln('</object>');
}

function getvodSeeVideo(sip,sport,murl) //H.264 참고 - http://www.seevideo.co.kr/
{
	document.writeln('<object id="SeeLive" width="512px" height="451px" classid="clsid:68253470-5d4f-4cdf-8d9c-353c14a2f013" codebase="http://www.seevideo.co.kr/pub/seevideo2003/svporsche.cab#version=2,5,24,181">');
	// height=451= 384+67
	document.writeln('<param name="ServerIP" value="'+ sip +'" />'); //서버 IP
	document.writeln('<param name="PortNum" value="'+ sport +' /">'); //포트 번호
	document.writeln('<param name="NoTicket" value="1" />'); //티켓 사용 안함
	document.writeln('<param name="MediaItem" value="'+ murl +'" />'); //미디어 ID
	document.writeln('<param name="AutoPlay" value="1" />'); //자동 시작
	document.writeln('<param name="EnableMessage" value="1" />'); //서버 메시지의 수신 여부
	document.writeln('<div>브라우저가 H.264 동영상을 지원하지 않습니다.</div>');//FF, Op
	document.writeln('</object>');
}
function getvodSanView(murl,mtitle) //H.264 참고 - http://www.sanview.co.kr/
{
	document.writeln("<object id='S2MPlayer' name='S2MPlayer' width='100%' height='100%' classid='clsid:e76aae10-af57-4aea-b33d-c3edfa414dae' codebase='http://www.sanview.co.kr/cab_down/sanview/S2MPlayer.3.2.0.15.cab#version=3,2,0,15'>");
	document.writeln("<param name='serverip' value='220.77.180.168:8090' />");
	document.writeln("<param name='userid' value='anonymous' />");
	document.writeln("<param name='moviefile' value='"+ murl +"' />");
	document.writeln("<param name='movietitle' value='"+ mtitle +"' />");
	document.writeln("<param name='autostart' value='1' />");
	document.writeln("<param name='enablefullscreen' value='1' />");
	document.writeln("<param name='fullscreenatstart' value='0' />");
	document.writeln("<param name='enablecontextmenu' value='1' />");
	document.writeln("<param name='showcontrolbar' value='0' />");
	document.writeln("<param name='showstatusbar' value='0' />");
	//document.writeln("<param name='topmost' value='1' />");
	document.writeln("<div>브라우저가 H.264 동영상을 지원하지 않습니다.</div>");//FF, Op
	document.writeln("</object>");
}
function getvod(murl) //WMV-비표준코드
{
//murl = "/data/wmv/"+murl;
	document.writeln('<embed src="'+ murl +'" width="100%" height="100%" showcontrols="1" showstatusbar="1" showdisplay="0" showgotobar="0" autostart="1" playcount="0" />');
}
function getvodNoControl(murl) //WMV-비표준코드
{
//murl = "/data/wmv/"+murl;
	document.writeln('<embed id="vodNoControl" src="'+ murl +'" width="100%" height="100%" showcontrols="0" />');
}

// 파노라마VR
function getpvrt(url,wf,w,h) // PVR180도.. 이거 사용안하고 JavaScript로 구현중..
{
	document.writeln('<applet name="pano-advanced" code="advpanorama.class" width="'+ w +'" height="'+ h +'">');
	document.writeln('<param name="panorama" value="'+ url +'" />');
	document.writeln('<param name="speed" value="1" />');
	document.writeln('<param name="delay" value="40" />');
	document.writeln('<param name="fontsize" value="12" />');
	document.writeln('<param name="bytes" value="108072" />');
	document.writeln('<param name="logo" value="'+ wf +'" />'); //로딩중 이미지
	document.writeln('<param name="buttons" value="n" />');
	document.writeln('<param name="mode" value="4" />');
	document.writeln('<param name="swap" value="y" />');
	document.writeln('<param name="wait" value="'+ wf +'" />');
	document.writeln('<div>Panorama VR 180도는 Java를 사용합니다.<br /><a tabindex="0" href="/data/viewer/jre-1_5_0_11-windows-i586-p-s.exe">J2SE Runtime Environment</a>를 설치하십시오.</div>');
	document.writeln('</applet>');
}

function getpvr(url,wf,w,h) // PVR360도.. url(파노라마 이미지)은 같은 서버에 있어야 됩니다.
{
	document.writeln('<applet name="ptviewer" code="ptviewer.class" archive="ptviewer.jar" width="'+ w +'" height="'+ h +'">');
	document.writeln('<param name="file" value="ptviewer:0" />');
	document.writeln('<param name="view_x" value="0" />');
	document.writeln('<param name="view_y" value="0" />');
	document.writeln('<param name="view_width" value="'+ w +'" />');
	document.writeln('<param name="view_height" value="'+ h +'" />');
	document.writeln('<param name="wait" value="'+ wf +'" />'); //로딩중 이미지
	document.writeln('<param name="pano0" value="{file='+ url +'}" />');
	document.writeln('<param name="pan" value="0" />');
	document.writeln('<param name="quality" value="10" />');
	document.writeln('<param name="antialias" value="true" />');
	document.writeln('<param name="bgcolor" value="FFFFFF" />');
	document.writeln('<param name="auto" value="0.3" />');
	document.writeln('<param name="tilt" value="0" />');
	document.writeln('<param name="fov" value="90.0" />');
	document.writeln('<param name="pan" value="30.0" />');
	document.writeln('<param name="tilt" value="0" />');
	document.writeln('<param name="cursor" value="move" />');
	document.writeln('<param name="frame" value="" />');
	document.writeln('<param name="barcolor" value="000000" />');
	document.writeln('<param name="bar_x" value="35" />');
	document.writeln('<param name="bar_y" value="300" />');
	document.writeln('<param name="bar_width" value="460" />');
	document.writeln('<param name="bar_height" value="3" />');
	document.writeln('<div>Panorama VR 360도는 Java를 사용합니다.<br /><a tabindex="0" href="/data/viewer/jre-1_5_0_11-windows-i586-p-s.exe">J2SE Runtime Environment</a>를 설치하십시오.</div>');
	document.writeln('</applet>');
}

/***************************************************************************************************/
// Menu //
function c0000() { location.href="../main/index.html"; }












/*****************************************************************************************************/
// e-Book //
	var g_dlgEbook = null;

	function StartViewWindow( targetURL, width, height, varArg, pagenum )
	{
		var dlgWin = null;

		var g_fIsSP2 = false;
		g_fIsSP2 = (window.navigator.userAgent.indexOf("SV1") != -1);
		if (g_fIsSP2) { var g_sp2 = "Y" }
		else { var g_sp2 = "N" }
		
		dlgWin = window.open(targetURL+"?"+varArg,"BookMaker","FULLSCREEN");
		dlgWin.blur();
		dlgWin.focus();
		
		return dlgWin;
	}
	
	function viewBookMaker(xName, pagenum, xCtg)
	{
		
		var width =  window.screen.width - 10;
		var height = window.screen.height;// - 34;  
		if ( width > height*2) width = width / 2;
		var title = "부산광역시 e-book";					 //타이틀 네임
		var pname = xName;
		
		var argVar = new Array();
		argVar[0] = window;
		argVar[1] = width;  	       
		argVar[2] = height; 	
		argVar[3] = "";
		argVar[4] = title;
		argVar[5] = pname;
		argVar[6] = pagenum;

	    try {
			if ( g_dlgEbook )  g_dlgEbook.close();
		} catch ( e ) { }


		if(xCtg) {
			g_dlgEbook = StartViewWindow("http://www.busan.go.kr/ebook/prg/"+xCtg+"/ebook.htm", width, height, xName, pagenum);
					}
		else {
			g_dlgEbook = StartViewWindow("http://www.busan.go.kr/ebook/prg/skin01/ebook.htm", width, height, xName, pagenum);
			}
	}

	