

function getflash(getpath,w,h)
{
	document.write ('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="'+w+'" HEIGHT="'+h+'" ALIGN="">');
	document.write (' <PARAM NAME=movie VALUE="'+getpath+'">');
	document.write (' <PARAM NAME=quality VALUE=high>');
	document.write('	<param name="Menu" value="false">');
	document.write (' <PARAM NAME=wmode value=transparent>');
	document.write (' <EMBED src="'+getpath+'" quality=high wmode="transparent" bgcolor=#D0D9DD  WIDTH="'+w+'" HEIGHT="'+h+'" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>');
	document.write ('</OBJECT>');
}

function ImageChange(id,after) 
{ 
	eval(id+'.src="'+after+'";'); 
}



//ÀÌ¹ÌÁö¸µÅ©Á¡¼±¾ø¾Ö±â

function bluring(){ 
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus(); 
} 
document.onfocusin=bluring; 



//·Ñ¿À¹ö¸Þ´º
function na_restore_img_src(name, nsdoc)
{
  var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
  if (name == '')
    return;
  if (img && img.altsrc) {
    img.src    = img.altsrc;
    img.altsrc = null;
  } 
}

function na_preload_img()
{ 
  var img_list = na_preload_img.arguments;
  if (document.preloadlist == null) 
    document.preloadlist = new Array();
  var top = document.preloadlist.length;
  for (var i=0; i < img_list.length; i++) {
    document.preloadlist[top+i]     = new Image;
    document.preloadlist[top+i].src = img_list[i+1];
  } 
}

function na_change_img_src(name, nsdoc, rpath, preload)
{ 
  var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
  if (name == '')
    return;
  if (img) {
    img.altsrc = img.src;
    img.src    = rpath;
  } 
}



// ÆîÄ§

var old_menu = '';
function menuclick(submenu) 
{

    if( old_menu != submenu ) {
    
                            if( old_menu !='' ) {
                                old_menu.style.display = 'none';
                                }
                                
                            submenu.style.display = 'block';
                            old_menu = submenu;
    } else {
        submenu.style.display = 'none';
        old_menu = '';
    }
}

/*==========================================================================================
		ÄíÅ° À¯Æ¿¸®Æ¼
		»çÀÌÆ® ³»¿¡ Cookie¸¦ Àü¹ÝÀûÀ¸·Î »ç¿ë ÇÏ¹Ç·Î ...
		2009.06.08(¿ù)
		¹èÂùµÎ
------------------------------------------------------------------------------------------*/
function getCookieVal (offset) {
   var endstr = document.cookie.indexOf (";", offset);
   if (endstr == -1) endstr = document.cookie.length;
   return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie(name) {
   var arg = name + "=";
   var alen = arg.length;
   var clen = document.cookie.length;
   var i = 0;
   while (i < clen) {
      var j = i + alen;
      if (document.cookie.substring(i, j) == arg)
         return getCookieVal (j);
      i = document.cookie.indexOf(" ", i) + 1;
      if (i == 0) break; 
   }
   return null;
}

function SetCookie (name, value) {
   var argv = SetCookie.arguments;
   var argc = SetCookie.arguments.length;
   var expires = (2 < argc) ? argv[2] : null;
   var path = (3 < argc) ? argv[3] : null;
   var domain = (4 < argc) ? argv[4] : null;
   var secure = (5 < argc) ? argv[5] : false;
   document.cookie = name + "=" + escape (value) +
      ((expires == null) ? "" : 
         ("; expires=" + expires.toGMTString())) +
      ((path == null) ? "" : ("; path=" + path)) +
      ((domain == null) ? "" : ("; domain=" + domain)) +
      ((secure == true) ? "; secure" : "");
} 




// sub_menu
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_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_findObj(n, d) { //v4.01
  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);
  if(!x && d.getElementById) x=d.getElementById(n); 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];}
}

//sitemap toggle

var LayerToggleClass = function(ObjName){
	this.SelectedObjs = null;
	this.Obj = null;
	this.ObjName = ObjName;
	this.isIE6 = this.init();
}
LayerToggleClass.prototype.init=function(){ // IE6Ã¼Å©
	var AgntUsr=navigator.userAgent.toLowerCase();
	var isIE6 = false;
	if(AgntUsr.indexOf('msie')!=-1){ // IEÀÌ¸é
		var ptr = AgntUsr.indexOf('msie');
		var ptr1 = AgntUsr.indexOf('.', ptr);
		var version = parseInt(AgntUsr.substring(ptr+5, ptr1));
		if(version<=6){
			isIE6 = true;
		}
	}
	return isIE6;
}
LayerToggleClass.prototype.toggle=function(){
	if(this.isAction) return;
	this.Obj = document.getElementById(this.ObjName);
	if(this.Obj){
		this.Height = this.Obj.offsetHeight;
		this.Width  = this.Obj.offsetWidth;
		if(this.Obj.style.visibility!='hidden'){
			this.Obj.style.visibility = 'hidden';
			if(this.isIE6) this.RestoreSelect();
		}else{
			this.Obj.style.visibility = 'visible';
			if(this.isIE6) this.HideSelect();
		}
	}
}
LayerToggleClass.prototype.HideSelect=function(){
	var select_tags = document.getElementsByTagName('select');
	var BoxObjPos = this.GetPos(this.Obj);
	this.SelectedObjs = new Array();
	for(var s_i=0; s_i<select_tags.length; s_i++){
		var EleObjPos = this.GetPos(select_tags[s_i]);
		var x1,x2,y1,y2,w1,w2,h1,h2;
		if(BoxObjPos['left']>EleObjPos['left']){
			x1 = EleObjPos['left'];  x2 = BoxObjPos['left'];
			w1 = EleObjPos['width']; w2 = BoxObjPos['width'];
		} else {
			x1 = BoxObjPos['left'];  x2 = EleObjPos['left'];
			w1 = BoxObjPos['width']; w2 = EleObjPos['width'];
		}
		if(BoxObjPos['top']>EleObjPos['top']) {
			y1 = EleObjPos['top'];    y2 = BoxObjPos['top'];
			h1 = EleObjPos['height']; h2 = BoxObjPos['height'];
		} else {
			y1 = BoxObjPos['top'];    y2 = EleObjPos['top'];
			h1 = BoxObjPos['height']; h2 = EleObjPos['height'];
		}
		if(select_tags[s_i].style.visibility != 'hidden'){
			if(x1 <= x2 + w2 &&
				y1 <= y2 + h2 &&
				x1 + w1 >= x2 &&
				y1 + h1 >= y2
			) {
				this.SelectedObjs[this.SelectedObjs.length] = select_tags[s_i];
				select_tags[s_i].style.visibility = 'hidden';
			}
		}
	}
}
LayerToggleClass.prototype.RestoreSelect=function(){
	var bakLen = 0;
	try{ bakLen = this.SelectedObjs.length; } catch(e){ }
	for(var i=0; i<bakLen; i++){
		this.SelectedObjs[i].style.visibility = 'visible';
	}
	this.SelectedObjs = null
}
LayerToggleClass.prototype.GetPos=function(obj){
	var tmp_obj;
	var curLeft = 0;
	var curTop = 0;
	tmp_obj = obj;
	if(tmp_obj.offsetParent){
		while(tmp_obj.offsetParent){
			curLeft += tmp_obj.offsetLeft;
			curTop += tmp_obj.offsetTop;
			tmp_obj = tmp_obj.offsetParent;
		}
	}else{
		curLeft = +tmp_obj.offsetLeft;
		curTop = +tmp_obj.offsetTop;
	}
	var ret = {'left':curLeft, 'top':curTop, 'width':obj.offsetWidth, 'height':obj.offsetHeight};
	return ret;
}

