/*==========================================*

투명 png

*==========================================*/



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 ''; 

} 







/*==========================================*

서브 left 메뉴 제어

*==========================================*/



var old_menu = '';

var old_cell = '';

function menuclick(submenu,cellbar)

{

  if( old_menu != submenu ) {

    if( old_menu !='' ) {

      document.getElementById(old_menu).style.display = 'none';

    }

    document.getElementById(submenu).style.display = '';

    old_menu = submenu;

    old_cell = cellbar;



  } else {

    document.getElementById(submenu).style.display = 'none';

    old_menu = '';

    old_cell = '';

  }

}





/*==========================================*

 MS 익스플러 컨트롤 제어

*==========================================*/

//swf

function objectlaunchSwf(width, height, url){

	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=" + width + " height=" + height + ">");

	document.write("<param name=movie value=" + url + ">");

	document.write("<param name=wmode value=transparent>");

	document.write("<param name=quality value=high>");

	document.write("<embed wmode=transparent src=" + url + " quality=high pluginspage=http://www.macromedia.com/go/getflashplayer type=application/x-shockwave-flash width=" + width + " height=" + height + "></embed>");

	document.write("</object>");

}



function objectlaunchSwfn(width, height, url){

	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=" + width + " height=" + height + ">");

	document.write("<param name=movie value=" + url + ">");

	document.write("<param name=quality value=high>");

	document.write("<embed wmode=transparent src=" + url + " quality=high pluginspage=http://www.macromedia.com/go/getflashplayer type=application/x-shockwave-flash width=" + width + " height=" + height + "></embed>");

	document.write("</object>");

}



//player

function objectlaunchPlayer(width, height, url){

	document.write("<OBJECT id=mediaPlayer classid=CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95 type=application/x-oleobject width=" + width + " height=" + height + " space=0 hspace=0 align=middle style=left:0px; top:0px;>");

	document.write("<param name=AllowChangeDisplaySize value=false>");

	document.write("<param name=AllowScan value=true>");

	document.write("<param name=AnimationAtStart value=false>");

	document.write("<param name=AudioStream value=-1>");

	document.write("<param name=AutoRewind value=true>");

	document.write("<param name=AutoSize value=false>");

	document.write("<param name=AutoStart value=true>");

	document.write("<param name=Balance value=0>");

	document.write("<param name=BufferingTime value=5>");

	document.write("<param name=ClickToPlay value=true>");

	document.write("<param name=CurrentMarker value=-1>");

	document.write("<param name=CurrentPosition value=-1>");

	document.write("<param name=CursorType value=0>");

	document.write("<param name=DisplayBackColor value=0>");

	document.write("<param name=DisplayForeColor value=16777215>");

	document.write("<param name=DisplayMode value=0>");

	document.write("<param name=DisplaySize value=0>");

	document.write("<param name=EnableContextMenu value=false>");

	document.write("<param name=Enabled value=true>");

	document.write("<param name=EnableFullScreenControls value=false>");

	document.write("<param name=EnablePositionControls value=true>");

	document.write("<param name=EnableTracker value=true>");

	document.write("<param name=InvokeURLs value=true>");

	document.write("<param name=Language value=-1>");

	document.write("<param name=Mute value=false>");

	document.write("<param name=PlayCount value=1>");

	document.write("<param name=PreviewMode value=false>");

	document.write("<param name=Rate value=1>");

	document.write("<param name=SelectionEnd value=-1>");

	document.write("<param name=SelectionStart value=-1>");

	document.write("<param name=SendErrorEvents value=true>");

	document.write("<param name=SendKeyboardEvents value=false>");

	document.write("<param name=SendMouseClickEvents value=false>");

	document.write("<param name=SendMouseMoveEvents value=false>");

	document.write("<param name=SendOpenStateChangeEvents value=true>");

	document.write("<param name=SendPlayStateChangeEvents value=true>");

	document.write("<param name=SendWarningEvents value=true>");

	document.write("<param name=ShowAudioControls value=false>");

	document.write("<param name=ShowCaptioning value=false>");

	document.write("<param name=ShowControls value=false>");

	document.write("<param name=ShowDisplay value=false>");

	document.write("<param name=ShowGotoBar value=false>");

	document.write("<param name=ShowPositionControls value=false>");

	document.write("<param name=ShowStatusBar value=false>");

	document.write("<param name=ShowTracker value=false>");

	document.write("<param name=TransparentAtStart value=false>");

	document.write("<param name=VideoBorder3D value=true>");

	document.write("<param name=VideoBorderColor value=0>");

	document.write("<param name=VideoBorderWidth value=0>");

	document.write("<param name=Volume value=-400>");

	document.write("<param name=WindowlessVideo value=-1>");



	document.write("<param name=Filename value=" + url + ">");

	document.write("<embed wmode=transparent src=" + url + " type=application/x-mplayer2 width=" + width + " height=" + height + " id=mediaPlayer></embed>");

	document.write("</OBJECT>");

}



//일반

function objectlaunch(val){

	document.write(val);

}







/*==========================================*

엘리먼트 showHide

*==========================================*/

function MM_showHideLayers() { //v9.0

  var i,p=0,v,obj,args=MM_showHideLayers.arguments;

	//alert('args.length : ' + args.length);
  for (i=0; i<args.length; i+=3){ 
	  with (document) {
	  	if (getElementById && ((obj=getElementById(args[i]))!=null)) { 
	  		v=args[i+2];
	  		
	    	if (obj.style) { 
	    		obj=obj.style; 
	    		v=(v=='show')?'block':(v=='hide')?'none':v; 
	    	}
	
		    obj.display =v; 
		    }
	    }
	}	
}







/*==========================================*

셀렉트 박스 이동

*==========================================*/

function openSite(siteSelect) {

  if(siteSelect.value !='') {

		window.open(siteSelect.value,'_blank');

  }

}







/*==========================================*

슬라이딩 움직이는 메뉴

*==========================================*/

var persistclose=0 //set to 0 or 1. 1 means once the bar is manually closed, it will remain closed for browser session

var startX = 868 //set x offset of bar in pixels

var startY = 56 //set y offset of bar in pixels

var verticalpos="fromtop" //enter "fromtop" or "frombottom"



function iecompattest(){

return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body

}



function get_cookie(Name) {

var search = Name + "="

var returnvalue = "";

if (document.cookie.length > 0) {

offset = document.cookie.indexOf(search)

if (offset != -1) {

offset += search.length

end = document.cookie.indexOf(";", offset);

if (end == -1) end = document.cookie.length;

returnvalue=unescape(document.cookie.substring(offset, end))

}

}

return returnvalue;

}



function closebar(){

if (persistclose)

document.cookie="remainclosed=1"

document.getElementById("topbar").style.visibility="hidden"

}



function staticbar(){

 barheight=document.getElementById("topbar").offsetHeight

 var ns = (navigator.appName.indexOf("Netscape") != -1) || window.opera;

 var d = document;

 function ml(id){

  var el=d.getElementById(id);

  if (!persistclose || persistclose && get_cookie("remainclosed")=="")

  el.style.visibility="visible"

  if(d.layers)el.style=el;

  el.sP=function(x,y){this.style.left=x+"px";this.style.top=y+"px";};

  el.x = startX;

  if (verticalpos=="fromtop")

  el.y = startY;

  else{

  el.y = ns ? pageYOffset + innerHeight : iecompattest().scrollTop + iecompattest().clientHeight;

  el.y -= startY;

  }

  return el;

 }

 window.stayTopLeft=function(){

  if (verticalpos=="fromtop"){

  var pY = ns ? pageYOffset : iecompattest().scrollTop;

  ftlObj.y += (pY + startY - ftlObj.y)/8;

  }

  else{

  var pY = ns ? pageYOffset + innerHeight - barheight: iecompattest().scrollTop + iecompattest().clientHeight - barheight;

  ftlObj.y += (pY - startY - ftlObj.y)/8;

  }

  ftlObj.sP(ftlObj.x, ftlObj.y);

  setTimeout("stayTopLeft()", 10);

 }

 ftlObj = ml("topbar");

 stayTopLeft();

}



if (window.addEventListener)

window.addEventListener("load", staticbar, false)

else if (window.attachEvent)

window.attachEvent("onload", staticbar)

else if (document.getElementById)

window.onload=staticbar



