﻿/**
 * 입력값이  null 인지 체크한다
 */
function isNull(input){
       if (input.value == null || input.value == ""){
             return true;
       }else{
             return false;
       }
}
/**
 * 입력값이 스페이스 이외의 의미있는 값이 있는지 체크한다
 * if (isEmpty(form.keyword)){
 *       alert('값을 입력하여주세요');
 * }
 */
function isEmpty(input){
       if (input.value == null || input.value.replace(/ /gi,"") == ""){
             return true;
       }else{
             return false;
       }
}
/**
 * 입력값에 특정 문자가 있는지 체크하는 로직이며 
 * 특정문자를 허용하고 싶지 않을때 사용할수도 있다
 * if (containsChars(form.name, "!,*&^%$#@~;")){
 *       alert("특수문자를 사용할수 없습니다");
 * }
 */
function containsChars(input, chars){
       for (var i=0; i < input.value.length; i++){
             if (chars.indexOf(input.value.charAt(i)) != -1){
                    return true;
             }
       }
       return false;
}
/**
 * 입력값이 특정 문자만으로 되어있는지 체크하며 
 * 특정문자만을 허용하려 할때 사용한다.
 * if (containsChars(form.name, "ABO")){
 *    alert("혈액형 필드에는 A,B,O 문자만 사용할수 있습니다.");
 * }
 */
function containsCharsOnly(input, chars){
       for (var i=0; i < input.value.length; i++){
             if (chars.indexOf(input.value.charAt(i)) == -1){
                    return false;
             }
       }
       return true;
}
/**
 * 입력값이 알파벳인지 체크
 * 아래 isAlphabet() 부터 isNumComma()까지의 메소드가 자주 쓰이는 경우에는
 * var chars 변수를 global 변수로 선언하고 사용하도록 한다.
 * var uppercase = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
 * var lowercase = "abcdefghijklmnopqrstuvwxyz";
 * var number = "0123456789";
 * function isAlphaNum(input){
 *       var chars = uppercase + lowercase + number;
 *    return containsCharsOnly(input, chars);
 * }
 */
function isAlphabet(input){
       var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
       if(!containsCharsOnly(input, chars)){
		   alert('영문만 입력하세요');
		   input.value="";
		   input.focus();
	   }
}
/**
 * 입력값이 알파벳 대문자인지 체크한다
 */
 function isUpperCase(input){
       var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
       if(!containsCharsOnly(input, chars)){
		   alert('대문자만 입력하세요');
		   input.value="";
		   input.focus();
	   }
 }
/**
 * 입력값이 알파벳 소문자인지 체크한다
 */
function isLowerCase(input){
       var chars = "abcdefghijklmnopqrstuvwxyz";
       if(!containsCharsOnly(input, chars)){
		   alert('소문자만 입력하세요');
		   input.value="";
		   input.focus();
	   }
}
/**
 * 입력값이 숫자만 있는지 체크한다.
 */
function isNumer(input){
       var chars = "0123456789";
       if(!containsCharsOnly(input, chars)){
		   alert('숫자만 입력하세요');
		   input.value="";
		   input.focus();
	   }
}
/**
 * 입려값이 알파벳, 숫자로 되어있는지 체크한다
 */
function isAlphaNum(input){
       var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
       if(!containsCharsOnly(input, chars)){
		   alert('영문과 숫자만 입력하세요');
		   input.value="";
		   input.focus();
	   }
}
/**
 * 입력값이 숫자, 대시"-" 로 되어있는지 체크한다
 * 전화번호나 우편번호, 계좌번호에 -  체크할때 유용하다
 */
function isNumDash(input){
       var chars = "-0123456789";
       return containsCharsOnly(input, chars);
}
/**
 * 입력값이 숫자, 콤마',' 로 되어있는지 체크한다
 */
function isNumComma(input){
       var chars = ",0123456789";
       return containsCharsOnly(input, chars);
}
/**
 * 입력값이 사용자가 정의한 포맷 형식인지 체크
 * 자세한 format 형식은 자바스크립트의 'reqular expression' 참고한다
 */
function isValidFormat(input, format){
       if (input.value.search(format) != -1){
             return true; // 올바른 포멧형식
       }      
       return false;
}
/**
 * 입력값이 이메일 형식인지 체크한다
 * if (!isValidEmail(form.email)){
 *       alert("올바른 이메일 주소가 아닙니다");
 * }
 */
function isValidEmail(input){
       var format = /^((\w|[\-\.])+)@((\w|[\-\.])+)\.([A-Za-z]+)$/;
       return isValidFormat(input, format);
}
/**
 * 입력값이 전화번호 형식(숫자-숫자-숫자)인지 체크한다
 */
function isValidPhone(input){
       var format = /^(\d+)-(\d+)-(\d+)$/;
       return isValidFormat(input, format);
}
/**
 * 입력값의 바이트 길이를 리턴한다.
 * if (getByteLength(form.title) > 100){
 *    alert("제목은 한글 50자 (영문 100자) 이상 입력할수 없습니다");
 * }
 */
function getByteLength(input){
       var byteLength = 0;
       for (var inx = 0; inx < input.value.charAt(inx); inx++)     {
             var oneChar = escape(input.value.charAt(inx));
             if (oneChar.length == 1){
                    byteLength++;
             }else if (oneChar.indexOf("%u") != -1){
                    byteLength += 2;
             }else if (oneChar.indexOf("%") != -1){
                    byteLength += oneChar.length / 3;
             }
       }
       return byteLength;
}
/**
 * 입력값에서 콤마를 없앤다
 */
function removeComma(input){
       return input.value.replace(/,/gi,"");
}
/**
 * 선택된 라디오버튼이 있는지 체크한다
 */
function hasCheckedRadio(input){
       if (input.length > 1){
             for (var inx = 0; inx < input.length; inx++){
                    if (input[inx].checked) return true;
             }
       }else{
             if (input.checked) return true;
       }
       return false;
}
/**
 * 선택된 체크박스가 있는지 체크
 */
function hasCheckedBox(input){
       return hasCheckedRadio(input);
}



//////////////////////////////////////////// 큰 사이즈의 이미지 줄이기 //////////////////////////////////////////////////
//////////////////////////////////////////// 큰 사이즈의 이미지 줄이기 //////////////////////////////////////////////////
//////////////////////////////////////////// 큰 사이즈의 이미지 줄이기 //////////////////////////////////////////////////
function image_auto_resize(this_s,width,height) {
	var ta_image = new Image();
		ta_image.src = this_s.src;

	if (ta_image.height >= height){

		if(height < ta_image.height) {
			this_s.style.height = height;
		} else {
			this_s.style.height = ta_image.height;
		}

	}else if (ta_image.width >= width){

		if(width < ta_image.width) {
			this_s.style.width = width;
		} else {
			this_s.style.width = ta_image.width;
		}

	}
	
}

// 사용법 onload='image_auto_resize(this,가로사이즈,세로사이즈)
//////////////////////////////////////////// 큰 사이즈의 이미지 줄이기 //////////////////////////////////////////////////
//////////////////////////////////////////// 큰 사이즈의 이미지 줄이기 //////////////////////////////////////////////////
//////////////////////////////////////////// 큰 사이즈의 이미지 줄이기 //////////////////////////////////////////////////



// 글자수 제한
var char_min = parseInt(10); // 최소
var char_max = parseInt(1000); // 최대

function check_byte(content, target)
{// 글숫자 검사
	var i = 0;
	var cnt = 0;
	var ch = '';
	var cont = document.getElementById(content).value;

	for (i=0; i<cont.length; i++) {
		ch = cont.charAt(i);
		if (escape(ch).length > 4) {
			cnt += 2;
		} else {
			cnt += 1;
		}
	}
	// 숫자를 출력
	document.getElementById(target).innerHTML = cnt;

	return cnt;
}





///////////////////////////////////////////////////////////////////마우스 업 했을때 설명 보여주기///////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////마우스 업 했을때 설명 보여주기///////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////마우스 업 했을때 설명 보여주기///////////////////////////////////////////////////////
//마우스가올라가 곳에 ex  onMouseOver="NXTT.Show(event,this,nxtt_slui_kin,'tt_kin_<%=id%>');"
//보여질것ex <SPAN style="DISPLAY: none"><DIV id="tt_kin_<%=id%>"><br>내용</DIV></span>
var nxtt_slui_kin =
{
	type:"id.html", followMouse:true, mouseontooltip:false, delay:0.01, offset:[1,7,7,1], padding:[0,0,0,10], maxWidth:0,
	head:"<table cellspacing=0 cellpadding=3 border=0><tr><td height=5></td></tr><tr><td bgcolor=#CCFFFF  style='border:1px solid #FFCAFF;' class='blist'>",
	tail:"</td></tr><tr><td height=5></td></tr></table>"
} ;

function	document_write(s)
{
	document.write(s) ;
}

/******************************************************************************/
function	NXTT_Display (a)
{
	var	div = NXTT.div ;
	var	top, left, maxLeft ;

	if (a>1 && div.style.display=="none")
	{
		div.style.left = div.style.right = "" ;
		div.style.width = "" ;
		div.style.visibility = "hidden" ;
		div.style.display = "block" ;

		NXTT.width = div.scrollWidth ;
		if (NXTT.env.maxWidth && NXTT.env.maxWidth<NXTT.width)
		{
			div.style.width = NXTT.env.maxWidth ;
			if (div.firstChild) NXTT.width = Math.max(div.scrollWidth, div.firstChild.scrollWidth) ;
		}

		div.style.display = "none" ;
		div.style.visibility = "visible" ;
	}

	if (! NXTT.show) return ;

	maxLeft = document.body.scrollWidth-NXTT.env.padding[1]-NXTT.width ;
	left = NXTT.px + NXTT.env.offset[1] ;
	if (left > maxLeft)
		if (NXTT.px-NXTT.env.offset[3] >= NXTT.env.padding[3]+NXTT.width)
			left -= NXTT.width + NXTT.env.offset[1] + NXTT.env.offset[3] ;
		else	left = maxLeft ;

	if (NXTT.py+NXTT.env.offset[2]+div.scrollHeight > document.body.scrollTop+document.body.clientHeight)
	{
		if (left == maxLeft)
			if (NXTT.py-NXTT.env.offset[0]-div.clientHeight > document.body.scrollTop)
				top = NXTT.py - NXTT.env.offset[0] - div.clientHeight ;
			else	top = NXTT.py + NXTT.env.offset[2] ;
		else	top = document.body.scrollTop + document.body.clientHeight - div.clientHeight ;
	}
	else	top = NXTT.py + NXTT.env.offset[2] ;

	div.style.top = top, div.style.left = left ;
	if (a)	div.style.display = "" ;
}
function	NXTT_SetHTML (s)
{
	NXTT.div.innerHTML = "" + (NXTT.env.head?NXTT.env.head:"") + s + (NXTT.env.tail?NXTT.env.tail:"") ;
	NXTT.ready = true ;
	NXTT_Display(2) ;
}
function	NXTT_onload (e)
{
	if (! e) e = window.event ;
	if (NXTT.env.type=="url" && (e.currentTarget?e.currentTarget:e.srcElement).id==NXTT.env.frameId)
		NXTT_SetHTML(document.getElementById(NXTT.env.frameId).contentWindow.document.body.innerHTML) ;
}
function	NXTT_Load ()
{
	switch (NXTT.env.type)
	{
	case	"id.value":
		NXTT_SetHTML(document.getElementById(NXTT.id).value) ;
		break ;
	case	"id.html":
		NXTT_SetHTML(document.getElementById(NXTT.id).innerHTML) ;
		break ;
	case	"html":
		NXTT_SetHTML(NXTT.id) ;
		break ;
	case	"url":
		NXTT.ready = false ;
		var	si = document.getElementById(NXTT.env.frameId) ;
		if (si.attachEvent)
		{
			si.detachEvent("onload", NXTT_onload) ;
			si.attachEvent("onload", NXTT_onload) ;
		}
		else si.onload = NXTT_onload ;
		si.src = NXTT.id ;
		break ;
	}
}
function	NXTT_HideDisplay ()
{
	if (! NXTT.show) NXTT.div.style.display = "none" ;
}
function	NXTT_HideRequest ()
{
	NXTT.show = false ;
	if (NXTT.env.delay)	
		setTimeout("NXTT_HideDisplay()", NXTT.env.delay*1000) ;
	else	NXTT_HideDisplay() ;
}
function	NXTT_HideNow ()
{
	NXTT.show = false ;
	NXTT_HideDisplay() ;
}
function	NXTT_Move (e)
{
	if (! e) e = window.event ;
	NXTT.px = e.pageX ? e.pageX : document.body.scrollLeft+e.clientX-document.body.clientLeft ;
	NXTT.py = e.pageY ? e.pageY : document.body.scrollTop+e.clientY-document.body.clientTop-1 ;
	if (NXTT.ready) NXTT_Display(0) ;
}
function	NXTT_Show (e, o, env, id)
{
	if (! e) e = window.event ;
	var	UserAgent = navigator.userAgent ;
	var	AppVersion = (((navigator.appVersion.split('; '))[1].split(' '))[1]) ;
	if (UserAgent.indexOf("MSIE") >= 0 && AppVersion < 5) return ;

	NXTT.px = e.pageX ? e.pageX : document.body.scrollLeft+e.clientX-document.body.clientLeft ;
	NXTT.py = e.pageY ? e.pageY : document.body.scrollTop+e.clientY-document.body.clientTop-1 ;

	if (env==NXTT.env && id==NXTT.id)
	{
		NXTT.show = true ;
		if (NXTT.ready) NXTT_Display(1) ;
		return ;
	}

	if (! NXTT.div)
	{
		NXTT.div = document.createElement("div") ;
		NXTT.div.style.display = "none", NXTT.div.style.position = "absolute" ;
		NXTT.div.style.borderWidth = 0, NXTT.div.style.zIndex = env.zIndex ? env.zIndex : 1 ;
		if (document.body.firstChild.insertAdjacentElement)
			document.body.firstChild.insertAdjacentElement("BeforeBegin", NXTT.div) ;
		else	document.body.appendChild(NXTT.div) ;
	}
	else	NXTT_HideNow() ;

	NXTT.env = env, NXTT.id = id ;

	if (NXTT.env.mouseontooltip)
		NXTT.div.onmouseover = NXTT.div.onmousemove = function () { NXTT.show = true ; } ;
	else	NXTT.div.onmouseover = NXTT.div.onmousemove = function (e) { NXTT.show = true ; NXTT_Move(e) ; } ;
	NXTT.div.onmouseout = NXTT_HideRequest ;

	if (NXTT.env.followMouse) o.onmousemove = NXTT_Move ;
	o.onmouseout = NXTT_HideRequest ;

	NXTT.show = true ;
	NXTT_Load(id) ;
}
var	NXTT = { div:null, ready:false, show:false, env:0, id:null, px:0, py:0, width:0, Show:NXTT_Show, Hide:NXTT_HideNow } ;
///////////////////////////////////////////////////////////////////마우스 업 했을때 설명 보여주기///////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////마우스 업 했을때 설명 보여주기///////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////마우스 업 했을때 설명 보여주기///////////////////////////////////////////////////////




//////////////////////////////////////////////////////자바스크립트로 asp의 left, right함수효과///////////////////////////////////////////////////////
//////////////////////////////////////////////////////자바스크립트로 asp의 left, right함수효과///////////////////////////////////////////////////////
//////////////////////////////////////////////////////자바스크립트로 asp의 left, right함수효과///////////////////////////////////////////////////////
function Left(str, n){
if (n <= 0)
    return "";
else if (n > String(str).length)
    return str;
else
    return String(str).substring(0,n);
}

function Right(str, n){
    if (n <= 0)
       return "";
    else if (n > String(str).length)
       return str;
    else {
       var iLen = String(str).length;
       return String(str).substring(iLen, iLen - n);
    }
}
//////////////////////////////////////////////////////자바스크립트로 asp의 left, right함수효과///////////////////////////////////////////////////////
//////////////////////////////////////////////////////자바스크립트로 asp의 left, right함수효과///////////////////////////////////////////////////////
//////////////////////////////////////////////////////자바스크립트로 asp의 left, right함수효과///////////////////////////////////////////////////////









//////////////////////////////////////////////////////자바스크립트로 테이블 테두리 둥글게 하기///////////////////////////////////////////////////////
//////////////////////////////////////////////////////자바스크립트로 테이블 테두리 둥글게 하기///////////////////////////////////////////////////////

function roundTable(objID) {
	var obj = document.getElementById(objID);
	var Parent, objTmp, Table, TBody, TR, TD;
	var bdcolor, bgcolor, Space;
	var trIDX, tdIDX, MAX;
	var styleWidth, styleHeight;

	// get parent node
	Parent = obj.parentNode;
	objTmp = document.createElement('SPAN');
	Parent.insertBefore(objTmp, obj);
	Parent.removeChild(obj);

	// get attribute
	bdcolor = obj.getAttribute('rborder');
	bgcolor = obj.getAttribute('rbgcolor');
	radius = parseInt(obj.getAttribute('radius'));
	if (radius == null || radius < 1) radius = 1;
	else if (radius > 6) radius = 6;

	MAX = radius * 2 + 1;

	/*
	create table {{
	*/
	Table = document.createElement('TABLE');
	TBody = document.createElement('TBODY');

	Table.cellSpacing = 0;
	Table.cellPadding = 0;

	for (trIDX=0; trIDX < MAX; trIDX++) {
		TR = document.createElement('TR');
		Space = Math.abs(trIDX - parseInt(radius));
		for (tdIDX=0; tdIDX < MAX; tdIDX++) {
			TD = document.createElement('TD');

			styleWidth = '1px'; styleHeight = '1px';
			if (tdIDX == 0 || tdIDX == MAX - 1) styleHeight = null;
			else if (trIDX == 0 || trIDX == MAX - 1) styleWidth = null;
			else if (radius > 2) {
				if (Math.abs(tdIDX - radius) == 1) styleWidth = '2px';
				if (Math.abs(trIDX - radius) == 1) styleHeight = '2px';
			}

			if (styleWidth != null) TD.style.width = styleWidth;
			if (styleHeight != null) TD.style.height = styleHeight;

			if (Space == tdIDX || Space == MAX - tdIDX - 1) TD.style.backgroundColor = bdcolor;
			else if (tdIDX > Space && Space < MAX - tdIDX - 1) TD.style.backgroundColor = bgcolor;

			if (Space == 0 && tdIDX == radius) TD.appendChild(obj);
			TR.appendChild(TD);
		}
		TBody.appendChild(TR);
	}

	/*
	}}
	*/

	Table.appendChild(TBody);

	// insert table and remove original table
	Parent.insertBefore(Table, objTmp);
}
//실행법
//<table id="ta" radius="3" rborder="#999999" rbgcolor="#F8F8F8">
//roundTable("ta");
//
//////////////////////////////////////////////////////자바스크립트로 테이블 테두리 둥글게 하기///////////////////////////////////////////////////////
//////////////////////////////////////////////////////자바스크립트로 테이블 테두리 둥글게 하기///////////////////////////////////////////////////////



///////////////////////////////////////////////// 이미지나 링크의 클릭했을때 테두리없애기 /////////////////////////////////////////////
///////////////////////////////////////////////// 이미지나 링크의 클릭했을때 테두리없애기 /////////////////////////////////////////////

function bluring(){
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
}
//document.onfocusin = bluring;

///////////////////////////////////////////////// 이미지나 링크의 클릭했을때 테두리없애기 /////////////////////////////////////////////
///////////////////////////////////////////////// 이미지나 링크의 클릭했을때 테두리없애기 /////////////////////////////////////////////




///////////////////////////////////////////////// 플래시 불러오기 //////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////// 플래시 불러오기 //////////////////////////////////////////////////////////////////////
function write_swf(src,w,h) {
 html = '';
 html += '<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" id="param" width="'+w+'" height="'+h+'">';
 html += '<param name="movie" value="'+src+'">';
 html += '<param name="quality" value="high">';
 html += '<param name="bgcolor" value="#ffffff">';
 html += '<param name="swliveconnect" value="true">';
 html += '<param name="menu" value="false">';
 html += '<param name="wmode" value="transparent">';
 html += '<embed src="'+src+'" quality=high bgcolor="#ffffff" width="'+w+'" height="'+h+'" swliveconnect="true" id="param" name="param" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"><\/embed>';
 html += '<\/object>';
 document.write(html);
}

function write_embed(src,w,h,autostart,loop) {
 html = '';
 html += '<embed autostart="'+autostart+'" AllowScriptAccess="never" style="width:'+w+'px; height:'+h+'px;" type="application\/x-mplayer2" EnableContextMenu="false" loop="'+loop+'" autosize="0" src="'+src+'">';
 html += '<\/embed>';
 document.write(html);
}
///////////////////////////////////////////////// 플래시 불러오기 //////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////// 플래시 불러오기 //////////////////////////////////////////////////////////////////////







///////////////////////////////////////////////////////////////////마우스 업 했을때 설명 보여주기///////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////마우스 업 했을때 설명 보여주기///////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////마우스 업 했을때 설명 보여주기///////////////////////////////////////////////////////
//사용법 : <a title="여기에 쓰면됨."></a>
//스타일에
/*
	#qTip {
	padding: 3px;
	border: 1px solid #666;
	display: none;
	background: #75BABF;
	color: #FFF;
	font:  11px Verdana, Arial, Helvetica, sans-serif;
	text-align: left;
	position: absolute;
	z-index: 1000;
	}

	i {
	  font-style: normal;
	  text-decoration: underline;
	}
 이게 있어야함*/
/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Craig Erskine | http://qrayg.com/ */

//////////////////////////////////////////////////////////////////
// qTip - CSS Tool Tips - by Craig Erskine
// http://qrayg.com
//
// Multi-tag support by James Crooke
// http://www.cj-design.com
//
// Inspired by code from Travis Beckham
// http://www.squidfingers.com | http://www.podlob.com
//////////////////////////////////////////////////////////////////

var qTipTag = "i,a"; //Which tags do you want to qTip-ize? Keep it lowercase!//
var qTipX = 0; //This is qTip's X offset//
var qTipY = 15; //This is qTip's Y offset//

//There's no need to edit anything below this line//
tooltip = {
  name : "qTip",
  offsetX : qTipX,
  offsetY : qTipY,
  tip : null
}

tooltip.init = function () {
    var tipNameSpaceURI = "http://www.w3.org/1999/xhtml";
    if(!tipContainerID){ var tipContainerID = "qTip";}
    var tipContainer = document.getElementById(tipContainerID);

    if(!tipContainer) {
      tipContainer = document.createElementNS ? document.createElementNS(tipNameSpaceURI, "div") : document.createElement("div");
        tipContainer.setAttribute("id", tipContainerID);
      document.getElementsByTagName("body").item(0).appendChild(tipContainer);
    }

    if (!document.getElementById) return;
    this.tip = document.getElementById (this.name);
    if (this.tip) document.onmousemove = function (evt) {tooltip.move (evt)};

    var a, sTitle, elements;
    
    var elementList = qTipTag.split(",");
    for(var j = 0; j < elementList.length; j++)
    {    
        elements = document.getElementsByTagName(elementList[j]);
        if(elements)
        {
            for (var i = 0; i < elements.length; i ++)
            {
                a = elements[i];
                sTitle = a.getAttribute("title");                
                if(sTitle)
                {
                    a.setAttribute("tiptitle", sTitle);
                    a.removeAttribute("title");
                    a.removeAttribute("alt");
                    a.onmouseover = function() {tooltip.show(this.getAttribute('tiptitle'))};
                    a.onmouseout = function() {tooltip.hide()};
                }
            }
        }
    }
}

tooltip.move = function (evt) {
    var x=0, y=0;
    if (document.all) {//IE
        x = (document.documentElement && document.documentElement.scrollLeft) ? document.documentElement.scrollLeft : document.body.scrollLeft;
        y = (document.documentElement && document.documentElement.scrollTop) ? document.documentElement.scrollTop : document.body.scrollTop;
        x += window.event.clientX;
        y += window.event.clientY;
        
    } else {//Good Browsers
        x = evt.pageX;
        y = evt.pageY;
    }
    this.tip.style.left = (x + this.offsetX) + "px";
    this.tip.style.top = (y + this.offsetY) + "px";
}

tooltip.show = function (text) {
    if (!this.tip) return;
    this.tip.innerHTML = text;
    this.tip.style.display = "block";
}

tooltip.hide = function () {
    if (!this.tip) return;
    this.tip.innerHTML = "";
    this.tip.style.display = "none";
}

// Multiple onload function created by: Simon Willison
// http://simonwillison.net/2004/May/26/addLoadEvent/
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

addLoadEvent(function() {
//  tooltip.init (); 이거풀어야 사용가능함 현재는 다른 스크립트와 충돌
});

///////////////////////////////////////////////////////////////////마우스 업 했을때 설명 보여주기///////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////마우스 업 했을때 설명 보여주기///////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////마우스 업 했을때 설명 보여주기///////////////////////////////////////////////////////