/**********************************************************************************
	Layer Show Hide
***********************************************************************************/

function LayerSH(LayerName,Status) {
ns = (document.getElementById)?true:false
ie = (document.all)?true:false

	if (ns) {
		LayerN = document.getElementById(LayerName).style
		if (Status == 'show') LayerN.visibility = 'visible';
		if (Status == 'hide') LayerN.visibility = 'hidden';
	}	
	if (ie) {
		LayerN = document.all[LayerName].style
		if (Status == 'show') LayerN.visibility = 'visible';
		if (Status == 'hide') LayerN.visibility = 'hidden';
	}
}

/**********************************************************************************
	Image Roll Over
***********************************************************************************/

function preload(imgObj,imgSrc) {
	if (document.images) {
		eval(imgObj+' = new Image()')
		eval(imgObj+'.src = "'+imgSrc+'"')
	}
}
function imgChg(imgName,imgObj) {
	if (document.images) {
		document.images[imgName].src = eval(imgObj+".src")
	}
}

/**********************************************************************************
	Pop up Menu
***********************************************************************************/

function popmenu(name) {
	var obj=document.all[name];
	obj.style.posLeft=event.clientX + document.body.scrollLeft + 5; // Æã¼ÇÀÌ ÄÝµÈ ·¹ÀÌ¾îÀÇ °¡·Î À§Ä¡ + ºê¶ó¿ìÀúÀÇ ½ºÅ©·ÑµÈ ±æÀÌ
	obj.style.posTop=event.clientY + document.body.scrollTop + 3; // Æã¼ÇÀÌ ÄÝµÈ ·¹ÀÌ¾îÀÇ ¼¼·Î À§Ä¡ + ºê¶ó¿ìÀúÀÇ ½ºÅ©·ÑµÈ ±æÀÌ
	obj.style.visibility='visible';
	// document.body.clientWidth; ºê¶ó¿ìÀú °¡·ÎÅ©±â
	// parseInt(obj.offsetWidth); ·¹ÀÌ¾î °¡·ÎÅ©±â
}

function popmenu2(name) {
	var obj=document.all[name];
	obj.style.posLeft=event.clientX + document.body.scrollLeft - 5; // Æã¼ÇÀÌ ÄÝµÈ ·¹ÀÌ¾îÀÇ °¡·Î À§Ä¡ + ºê¶ó¿ìÀúÀÇ ½ºÅ©·ÑµÈ ±æÀÌ
	obj.style.posTop=event.clientY + document.body.scrollTop - 5; // Æã¼ÇÀÌ ÄÝµÈ ·¹ÀÌ¾îÀÇ ¼¼·Î À§Ä¡ + ºê¶ó¿ìÀúÀÇ ½ºÅ©·ÑµÈ ±æÀÌ
	obj.style.visibility='visible';
	// document.body.clientWidth; ºê¶ó¿ìÀú °¡·ÎÅ©±â
	// parseInt(obj.offsetWidth); ·¹ÀÌ¾î °¡·ÎÅ©±â
}

/**********************************************************************************
	Checkbox
***********************************************************************************/

function select() {
  var i, chked=0;
  for(i=0;i<document.write.length;i++) {
  if(document.write[i].type=='checkbox') { 
   if(document.write[i].checked) { document.write[i].checked=false; }
   else { document.write[i].checked=true; }
   }
  }
   return false;
 }

/**********************************************************************************
	Pop up Window
***********************************************************************************/

function popwin(pop,width,height)
{
	var url = pop;  
	var wd = width;
	var he = height;
	
	window.open(url,"","left=300;top=300,toolbar=0,menubar=0,scrollbars=no,resizable=no,width=" + wd +",height=" + he + ";")
}

function popwin2(pop,width,height)
{
	var url = pop;  
	var wd = width;
	var he = height;
	
	window.open(url,"","left=300;top=300,toolbar=0,menubar=0,scrollbars=yes,resizable=no,width=" + wd +",height=" + he + ";")
}

function popwin3(pop,width,height)
{
	var url = pop;  
	var wd = width;
	var he = height;
	
	window.open(url,"","left=300;top=300,toolbar=0,menubar=0,scrollbars=yes,resizable=yes,width=" + wd +",height=" + he + ";")
}

/**********************************************************************************
	Pop up Window (±âÁ¸¹öÁ¯)
***********************************************************************************/

function OpenWin(j1,j2,j3,j4){
       newwin=window.open(j1, j2,  "width=" + j3 + "," + "Height=" + j4 + "," + "dependent=no," + "titlebar=yes," + "resizable=yes," +  "location=no," + "directories=no," + "status=no," + "menubar=no," + "scrollbars=no");
}
