

/********************************* tab ***************************/
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];}
}


function MM_showHideLayers() { //v6.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; }
}
/********************************* tab ***************************/




/********************************* pngÆÄÀÏ½ºÅ©¸³Æ®// ***************************/
//PNG  ÆÄÀÏ Ã³¸®
function fixPNG(obj) 
{ 
//    var blankImg = "/images/common/blank.gif";
//    var Src, Width, Height; 

//    if ( !(typeof obj.style.filter == 'string' && obj.src.substr(obj.src.lastIndexOf(".")+1).toLowerCase() == 'png') ) return; 

//    Src = obj.src; 
//    Width = obj.width; 
//    Height = obj.height; 

//    obj.src = blankImg; 
//    obj.width = Width; 
//    obj.height = Height; 
//    obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+Src+"', sizingMethod='scale')"; 
    
    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 ''; 
} 
/********************************* pngÆÄÀÏ½ºÅ©¸³Æ®// ***************************/


// Tab Content
function initTabMenu(tabContainerID) {
	var tabContainer = document.getElementById(tabContainerID);
	var tabAnchor = tabContainer.getElementsByTagName("a");
	var i = 0;

	for(i=0; i<tabAnchor.length; i++) {
		if (tabAnchor.item(i).className == "tab")
			thismenu = tabAnchor.item(i);
		else
			continue;

		thismenu.container = tabContainer;
		thismenu.targetEl = document.getElementById(tabAnchor.item(i).href.split("#")[1]);
		thismenu.targetEl.style.display = "none";
		thismenu.imgEl = thismenu.getElementsByTagName("img").item(0);
		thismenu.onclick = function tabMenuClick() {
			currentmenu = this.container.current;
			if (currentmenu == this)
				return;

			if (currentmenu) {
				currentmenu.targetEl.style.display = "none";
				if (currentmenu.imgEl) {
					currentmenu.imgEl.src = currentmenu.imgEl.src.replace("_on.gif", ".gif");
				} else {
					currentmenu.className = currentmenu.className.replace(" on", "");
				}
			}

			this.targetEl.style.display = "block";
			if (this.imgEl) {
				this.imgEl.src = this.imgEl.src.replace(".gif", "_on.gif");
			} else {
				this.className += " on";
			}
			this.container.current = this;

			return false;
		};

		if (!thismenu.container.first)
			thismenu.container.first = thismenu;
	}
	if (tabContainer.first)
		tabContainer.first.onclick();
}



/********************************* °Ô½ÃÆÇ tr·Ñ¿À¹ö ***************************/
function list_up(menuId)
{
    if( document.getElementById ( menuId ) != null )
    {
        var menulistup = document.getElementById(menuId);
        menulistup.style.background = "#edf7f6";
        menulistup.style.cursor = 'hand';
    }
}

function list_out(menuId)
{
    if( document.getElementById ( menuId ) != null )
    {
        var menulistout = document.getElementById( menuId ) ;    
        menulistout.style.background = "#FFFFFF" ;
    }
}
/********************************* ///°Ô½ÃÆÇ tr·Ñ¿À¹ö ***************************/

/* RollOver */
function ImageOver(imgEL){
	imgEL.src = imgEL.src.replace(".gif", "_.gif");
}
function ImageOut(imgEL){
	imgEL.src = imgEL.src.replace("_.gif", ".gif");
}

//FlashInsert
var flagIE;
var swfObj;
function inputSWF (s, w, h, i, v) {
	i = (i) ? i : "swfMain";
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="'+i+'" width="'+w+'" height="'+h+'"><param name=movie value="'+s+'"><param name=quality value="high"><param name="wmode" value="transparent"><param name=allowScriptAccess value="always">');
	document.write('<embed allowScriptAccess="always" name="'+i+'" src="'+s+'" width="'+w+'" height="'+h+'" flashVars="'+v+'" type="application/x-shockwave-flash" quality=high pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object>');

	flagIE = navigator.appName.indexOf("Microsoft") != -1;
	swfObj = flagIE ? document.all.swfMain : document.swfMain;
};

function inputEMB (s, w, h, i, v, e) {
	if ( navigator.appName == "Netscape" )
	{
	navigator.plugins.refresh();
	document.write("<" + "applet MAYSCRIPT Code=NPDS.npDSEvtObsProxy.class" )
	document.writeln(" WIDTH=5 HEIGHT=5 NAME=appObs> </applet>")
	} 
	document.write('<OBJECT id="'+i+'" width="'+w+'" height="'+h+'" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" VIEWASTEXT>')
	document.write('<param name="filename" value="'+s+'">')
		document.write('<param name="AutoStart" value="true">')
	//document.write('<param name="AutoStart" value=""'+v+'"">')
	document.write(e)
	document.write('</OBJECT>')
	
};

//FS_Command
function swfMain_DoFSCommand(command, args) {
	var swfMainObj = swfObj;
	switch (command){
		case "set_subjct":
			//a = args.split(",");
			alert(args);
			break;

		default :
			break;
	}
};

if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub swfMain_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call swfMain_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}


function trim(Str){
var tempStr = "";  
	for (i = 0 ; i < Str.length; i++){
		if(Str.charAt(i) == " "){
			tempStr = tempStr;  
		}else{
			tempStr = tempStr + Str.charAt(i);
		} 
	}  
	return tempStr;
}

//iframe

function initsize() { 
ddalchi.resizeTo(ddalchi.document.body.scrollWidth, ddalchi.document.body.scrollHeight); 
} 

window.attachEvent("onload",function() {
  var arr=document.all.tags("a");
  for (var i=0; i<arr.length; i++) {
    arr[i].onmouseover=function() {
      return true;
    }
  }
});

function statusLocation(str){
	window.open(str,"_blank");
}

function CheckSql(str){
	// ¹Ýº¹ÀûÀ¸·Î ¸ðµç ¹®ÀÚ¸¦ ÇÏ³ª¾¿ À¯È¿¼º °Ë»ç
	if(str.length > 0){
		for (k=0 ; k < str.length ; k++) {
			if ((str.charAt(k)=="--") || (str.charAt(k)=="'") || (str.charAt(k)=="<") || (str.charAt(k)==">") || (str.charAt(k)=="&") || (str.charAt(k)=="script")) {
				alert("´ÙÀ½ÀÇ ¹®ÀÚ´Â »ç¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.\n -- ' < > &");
				return false;
			}
		}
	}
	return true;
}


function resizeimg(targetimage)
{
   varWidth = 650;
   if(varWidth < targetimage.width+8){
	   varWidth=650;
	}else{
		varWidth = targetimage.width;
	}
	targetimage.width = varWidth;
   
}


function openWin(u, w, h, x, y,e) {
	var props = "top=" + x + ", left=" + y + ", width=" + w + ",height=" + h + ", "+e+", resizable=no, status=yes";
	var popup = window.open(u,"popupwin", props);
	popup.focus();
};

//open_window
function pop_window(url, winName, winW, winH, top, left, tools, menu, scroll, resize, status, directory, loca, return_msg) {
  window.open(url,winName,"width="+winW+",height="+winH+",top="+top+",left="+left+",toolbar="+tools+",scrollbars="+scroll+",resizable="+resize+",menubar="+menu+",status="+status+",directories='"+directory+"',location='"+loca+"'");
 //alert(top);
  // self.opener = self
 // window.close('launcher.html');
   //  window.opener.opener = window;
   //  window.opener.close();
  return return_msg;
}
