/***************************************************************************************************/
// 뿹 //

//<A HREF="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('ü','','ϰ̸',1);"><IMG SRC="img/topmenu01.gif" WIDTH="87" HEIGHT="26" 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);
}

/***************************************************************************************************/
// myshin JavaScript v2006.06.29 //

//ٷΰ
function goUrl(url,target) {
  if(url != 0) { 
    window.open(url,target);
    }
}

// ˾
function openWin(url,wn,sc,ww,wh,le,to) {
  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 + "'");
}
// ˾߾
function popMid(url,wn,ww,wh,sc) {
  le = (screen.width-ww)/2;
  to = (screen.height-wh)/2;
 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 + "'");
}
// ̱Ⱘ߱
function displayOn(a) {
  obj = document.getElementById(a);
  if (obj) { obj.style.display = ""; }
}
function displayOff(a) {
  obj = document.getElementById(a);
  if (obj) { obj.style.display = "none"; }
}
function displayOnly(obj,num) { //obj üȿ table Ʈ ش  table  ش.
  var obj = document.getElementById(obj);
  var objTag = obj.document.getElementsByTagName("table"); //IE
  for ( i=0 ; i < objTag.length ; i++ ) {
    objTag[i].style.display="none";
  }
  objTag[num].style.display="block"; //ü1ͽ,迭0ͽ
}
//̺Ʈġֱ
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 "";
}

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

function contentPrint() { // ƮũƮ
  var windowLeft = (screen.width-640)/2;
  var windowTop = (screen.height-480)/2;
  var printURL = "/inc/all/printpage.html";
   window.open(printURL,"content",'width=705, height=564, menubar=yes, scrollbars=yes,status=no,resizable=yes,top=' + windowTop + ',left=' + windowLeft + '');
}
// ÷
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;
}
//:  ü  Ʒڵ 
//JSFX_FloatDiv("wing", 880,143).floatIt();

// ÷
function getflash(URL,wid,hei,mode,TL,scale)
{
document.write("<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+"'>");
document.write("<param name='movie' value='"+URL+"' />");
document.write("<param name='quality' value='high' />");
document.write("<param name='WMODE' value='"+mode+"' />");
document.write("<param name='salign' value='"+TL+"' />");
document.write("<param name='scale' value='" + scale + "' />");
document.write("<embed src='"+URL+"' quality='high' wmode='"+mode+"' scale='"+scale+"' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+wid+"' height='"+hei+"'></embed>");
document.write("</object>");
}

// 
function getvodH264(murl,mtitle)
{
document.write("<object id='S2MPlayer' style='left: 0px; top: 0px' height='100%' width='100%' classid='clsid:e76aae10-af57-4aea-b33d-c3edfa414dae' codebase='/vodview/h264/S2MPlayer.3.2.0.15.cab#version=3,2,0,15' name='S2MPlayer'>");
document.write("<param name='serverip' value='220.77.180.168:8090' />");
document.write("<param name='userid' value='anonymous' />");
document.write("<param name='moviefile' value='"+ murl +"' />");
document.write("<param name='movietitle' value='"+ mtitle +"' />");
document.write("<param name='autostart' value='1' />");
document.write("<param name='enablefullscreen' value='1' />");
document.write("<param name='fullscreenatstart' value='0' />");
document.write("<param name='enablecontextmenu' value='1' />");
document.write("<param name='showcontrolbar' value='0' />");
document.write("<param name='showstatusbar' value='0' />");
//document.write("<param name='topmost' value='1' />");
document.write("</object>");
}
function getvodWMV(murl)
{
//murl = "/data/wmv/"+murl;
document.write('<object id="mpp1" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" codebase="codebase" width="100%" height="100%"  name="mpp1" viewastext="VIEWASTEXT">');
document.write('<param name="URL" value="'+ murl +'" />');
document.write('<param name="defaultFrame" value="content" />');
document.write('<param name="uiMode" value="none" />');
document.write('<param name="autoStart" value="true" />');
document.write('<param name="enableContextMenu" value="false" />');
document.write('<param name="fullScreen" value="false" />');
document.write('<param name="enabled" value="True" />');
document.write('<param name="stretchToFit" value="true" />');
document.write('<param name="volume" value="30" />');
document.write('</object>');
}
function getvod(murl)
{
//murl = "/data/wmv/"+murl;
document.write('<embed src="'+ murl +'" width="100%" height="100%" />');
}
function getvodNoControl(murl)
{
//murl = "/data/wmv/"+murl;
document.write('<embed id="vodNoControl" src="'+ murl +'" showcontrols="0" width="100%" height="100%" />');
}

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

// ߰
function view(num) {
tab4menuCurr =document.getElementById("tab4m"+num);
if(tab4menuCurr) { 
	tab4menuCurr.style.fontWeight = "bold";
	}
}

/***************************************************************************************************/

function openVR(a,b) {
  window.open("http://www.masan.go.kr/open_content/board/skin/vr/player/play_vr_eng.jsp?board="
  + "video_vr001" + "&docid="
  + a + "&engtitle="
  + b, "", "width=450,height=500,top=0,left=0");
  return false;
}