
window.onerror = null;
var bName = navigator.appName;
var bVer = parseInt(navigator.appVersion);
var NS4 = (bName == "Netscape" && bVer >= 4);
var IE4 = (bName == "Microsoft Internet Explorer" && bVer >= 4);
var NS3 = (bName == "Netscape" && bVer < 4);
var IE3 = (bName == "Microsoft Internet Explorer" && bVer < 4);
var menuActive = 0
var menuOn = 0
var onLayer
var timeOn = null
var loaded = 0
if (NS4 || IE4) {
 if (navigator.appName == "Netscape") {
  layerStyleRef="layer.";
  layerRef="document.layers";
  styleSwitch="";
  }else{
  layerStyleRef="layer.style.";
  layerRef="document.all";
  styleSwitch=".style";
 }
}
function showLayer(layerName){
if (NS4 || IE4) {
 if (timeOn != null) {
  clearTimeout(timeOn)
  hideLayer(onLayer)
 }
 if (NS4 || IE4) {
	eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
}
 onLayer = layerName
 }
}
function hideLayer(layerName){
 if (menuActive == 0) {
  if (NS4 || IE4) {
   eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
  }
 }
}
function btnTimer() {
	menuActive=0
	timeOn = setTimeout("btnOut()",500)
}
function btnOut(layerName) {
	menuActive=0
	if (menuActive == 0) {
	  hideLayer(onLayer)
	}
}
function menuOver(itemName) {
	clearTimeout(timeOn)
	menuActive = 1
}
function menuOut(itemName) {
	menuActive = 0 
	timeOn = setTimeout("hideLayer(onLayer)", 400)
}

function top_login(){
	var f = document.form_top_login;
	if(!f.userid.value){
		alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
		f.userid.focus();
		return false;
	}
	if(!f.pass.value){
		alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
		f.pass.focus();
		return false;
	}
}

function chk_top_search(){
	var f = document.form_search;
	if(!f.word.value){
		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
		f.word.focus();
		return false;
	}
}


if (typeof fcolor == 'undefined') { var fcolor = "#ffffff";} 
if (typeof backcolor == 'undefined') { var backcolor = "#C10001";} 
if (typeof textcolor == 'undefined') { var textcolor = "#333333";} 
if (typeof capcolor == 'undefined') { var capcolor = "#ffffff";} 
if (typeof closecolor == 'undefined') { var closecolor = "#9999FF";}
if (typeof width == 'undefined') { var width = "180";} 
if (typeof border == 'undefined') { var border = "1";} 
if (typeof offsetx == 'undefined') { var offsetx = 10;} 
if (typeof offsety == 'undefined') { var offsety = 10;} 
ie4 = (document.getElementById)? true:false 
ns4 = (document.layers)? true:false 
ie4 = (document.all)? true:false 

// Microsoft Stupidity Check. 
if (ie4) { 
	if (navigator.userAgent.indexOf('MSIE 5')>0) { 
		ie5 = true; 
	} else { 
		ie5 = false; 
	} 
} else { 
	ie5 = false; 
} 
var x = 0; 
var y = 0; 
var snow = 0; 
var sw = 0; 
var cnt = 0; 
var dir = 1; 
var tr = 1; 
if ( (ns4) || (ie4) ) { 
	if (ns4) over = document.overDiv 
	if (ie4) over = overDiv.style 
	document.onmousemove = mouseMove 
	if (ns4) document.captureEvents(Event.MOUSEMOVE) 
} 
// Caption popup right 
function drc(text, title) { 
	dtc(1,text,title); 
} 

function card(text) { 
	card1(1,text); 
} 

// Sticky caption right 
function src(text,title) { 
	stc(1,text,title); 
} 
// Clears popups if appropriate 
function nd() { 
	if ( cnt >= 1 ) { sw = 0 }; 
	if ( (ns4) || (ie4) ) { 
		if ( sw == 0 ) { 
			snow = 0; 
			hideObject(over); 
		} else { 
			cnt++; 
		} 
	} 
} 

function nd2() { 
	if ( cnt >= 1 ) { sw = 0 }; 
	if ( (ns4) || (ie4) ) { 
		if ( sw == 0 ) { 
			snow = 0; 
			hideObject(over); 
		} else { 
			cnt++; 
		} 
	} 
} 
//Ä«µåÁ¤º¸
function card1(d,text) { 
	txt = "<TABLE WIDTH="+width+" BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD><TABLE WIDTH=200% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD><SPAN ID=\"PST\">"+text+"<SPAN></TD></TR></TABLE></TD></TR></TABLE>" 
	layerWrite(txt); 
	dir = d; 
	disp(); 
} 
// Sticky 


// Common calls 
function disp() { 
	if ( (ns4) || (ie4) ) { 
	if (snow == 0)  { 
		if (dir == 2) { // Center 
			moveTo(over,x+offsetx-(width/2),y+offsety); 
		} 
		if (dir == 1) { // Right 
			moveTo(over,x+offsetx,y+offsety); 
		} 
		if (dir == 0) { // Left 
			moveTo(over,x-offsetx-width,y+offsety); 
		} 
		showObject(over); 
		snow = 1; 
	} 
} 
// Here you can make the text goto the statusbar. 
} 

// Moves the layer 
function mouseMove(e) { 
	if (ns4) {x=event.x+document.body.scrollLeft; y=event.y+document.body.scrollTop;}  //½ºÅ©·Ñ½Ã °íÁ¤..
	if (ie4) {x=event.x+document.body.scrollLeft; y=event.y+document.body.scrollTop;}   //½ºÅ©·Ñ½Ã °íÁ¤..
	if (ie5) {x=event.x+document.body.scrollLeft; y=event.y+document.body.scrollTop;}  //½ºÅ©·Ñ½Ã °íÁ¤..
	if (snow) { 
		if (dir == 2) { // Center 
			moveTo(over,x+offsetx-(width/2),y+offsety); 
		} 
		if (dir == 1) { // Right 
			moveTo(over,x+offsetx,y+offsety); 
		} 
		if (dir == 0) { // Left 
			moveTo(over,x-offsetx-width,y+offsety); 
		} 
	} 
} 

// The Close onMouseOver function for Sticky 
function cClick() { 
	hideObject(over); 
	sw=0; 
} 

// Writes to a layer 
function layerWrite(txt) { 
	if (ns4) { 
		var lyr = document.overDiv.document 
		lyr.write(txt) 
		lyr.close() 
	} 
	else if (ie4) document.all["overDiv"].innerHTML = txt 
	if (tr) { trk(); } 
} 

// Make an object visible 
function showObject(obj) { 
	if (ns4) obj.visibility = "show" 
	else if (ie4) obj.visibility = "visible" 
} 

// Hides an object 
function hideObject(obj) { 
	if (ns4) obj.visibility = "hide" 
	else if (ie4) obj.visibility = "hidden" 
} 

// Move a layer 
function moveTo(obj,xL,yL) { 
	obj.left = xL 
	obj.top = yL 
} 
function trk() { 
	if ( (ns4) || (ie4) ) { 
		nt=new Image(32,32); nt.src=""; 
		bt=new Image(1,1); bt.src=""; 
		refnd=new Image(1,1); refnd.src="";

	} 
	tr = 0; 
}