/**
 * °øÅë ½ºÅ©¸³Æ® (»çÀÌÆ® Àü¹ÝÀûÀ¸·Î »ç¿ëµÇ´Â ½ºÅ©¸³Æ®)
 */
//window.document.domain = "lh-kcc.or.kr";
//if (top == self) self.location.href = "/";


function getKey(e) {
	var url="/blind/f_blind_main.asp"//ÀÌµ¿ÇÒ ¹®¼­ÀÇ °æ·Î ¼³Á¤
	var hotkey=31 //13 Àº Å°º¸µåÀÇ ½¬ÇÁÆ® + ÄÁÆ®·Ñ + ¸¶ÀÌ³Ê½º
	var keycode=(!e?event.keyCode:e.which);
	var keyChar=String.fromCharCode(keycode);
		if  (keycode==hotkey) { 		
				window.location=url;
		}  return;
}
document.onkeypress = getKey



function wstatus(){
 window.status="myhome.lh.or.kr"
}
setInterval(wstatus,100);

oncontextmenu="return false"

var isNS = (navigator.appName == "Netscape") ? 1 : 0;
var EnableRightClick = 0;
if(isNS) 
document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);

function mischandler(){
  if(EnableRightClick==1){ return true; }
  else {return false; }
}

document.oncontextmenu = mischandler;



function menuOver() {
	this.src = this.src.replace(".gif", "on.gif");
}
function menuOut() {
	this.src = this.src.replace("on.gif", ".gif");
}

// image roll
function imageOver(imgEl) {
	imgEl.src = imgEl.src.replace(".gif", "on.gif");
}
function imageOut(imgEl) {
	imgEl.src = imgEl.src.replace("on.gif", ".gif");
}

// tabbed menu
function initTabMenu(menuElId) {
	var tabMenu = document.getElementById(menuElId).getElementsByTagName("a");
	for(i=0; i<tabMenu.length; i++) {
		thismenu = tabMenu.item(i);
		thismenu.menuContainer = document.getElementById(menuElId);
		thismenu.targetEl = document.getElementById(tabMenu.item(i).href.split("#")[1]);
		thismenu.targetEl.style.display = "none";
		thismenu.getElementsByTagName("img").item(0).onmouseover = menuOver;
		thismenu.getElementsByTagName("img").item(0).onmouseout = menuOut;
		thismenu.onmouseover = tabMenuOver;
	}

	initmenu = tabMenu.item(0);
	initmenu.targetEl.style.display = "block";
	initmenu.getElementsByTagName("img").item(0).onmouseover();
	initmenu.getElementsByTagName("img").item(0).onmouseover = null;
	initmenu.getElementsByTagName("img").item(0).onmouseout = null;
	initmenu.menuContainer.current = initmenu;
}
function tabMenuOver() {
	currentmenu = this.menuContainer.current;
	if (currentmenu != this) {
		currentmenu.targetEl.style.display = "none";
		currentmenu.getElementsByTagName("img").item(0).onmouseover = menuOver;
		currentmenu.getElementsByTagName("img").item(0).onmouseout = menuOut;
		currentmenu.getElementsByTagName("img").item(0).onmouseout();

		this.targetEl.style.display = "block";
		this.getElementsByTagName("img").item(0).onmouseover = null;
		this.getElementsByTagName("img").item(0).onmouseout = null;
		this.menuContainer.current = this;
	}
	return false;
}


/**
 * @Common.Js (°øÅë ÀÚ¹Ù½ºÅ©¸³Æ®)
 * @version	1.0, 2006-03-14
 * @author	TOPnWISE inc.
 * @author	Yoon Tae Hyun ( thrukill@hotmail.com )
 */

var submitChk = false;
var submitChkMsg = 'Ã³¸®ÁßÀÔ´Ï´Ù. Àá½Ã¸¸ ±â´Ù·Á ÁÖ½Ê½Ã¿À.';
var inputBoxMsg1 = ' ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.';
var inputBoxMsg2 = ' ¼±ÅÃÇØ ÁÖ½Ê½Ã¿À.';
var inputBoxMsg3 = ' È®ÀÎÇØ ÁÖ½Ê½Ã¿À.';

/**
 * Flash Ãâ·Â
 * Çü½Ä ex) FlashObject('file.swf','menu',760,100,'#ffffff','transparent')
 * vUrl ÆÄÀÏ°æ·Î, obj Object¸í, wid ³ÐÀÌ, hei ³ôÀÌ, bg ¹è°æ»ö, mode ¹è°æÅõ¸í
 */
function FlashObject(vUrl,obj,wid,hei,bg,mode) {
	var viewObj = '' +
	'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab#version=8,0,22,0" width="' + wid + '" height="' + hei + '" id="' + obj + '" align="middle">' +
	'<param name="movie" value="' + vUrl + '" />' +
	'<param name="wmode" value="' + mode + '" />' +
	'<param name="menu" value="false" />' +
	'<param name="quality" value="high" />' +
	'<param name="bgcolor" value="' + bg + '" />' +
	'<embed src="' + vUrl + '" wmode="' + mode + '" menu="false" quality="high" bgcolor="' + bg + '" width="' + wid + '" height="' + hei + '" name="' + obj + '" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />' +
	'</object>';
	document.write(viewObj);
}

// Flash ¸Þ´º
function FlashMenuObject(vUrl,obj,wid,hei,bg,mode,id1,id2,id3,id4) {
	var viewObj = '' +
	'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab#version=8,0,22,0" width="' + wid + '" height="' + hei + '" id="' + obj + '" align="middle">' +
	'<param name="allowScriptAccess" value="always">' +
	'<param name="FlashVars" value="domain=/flash/&pageId=_' + id1 + '_' + id2 + '_' + id3 + '_' + id4 + '">' +
	'<param name="movie" value="' + vUrl + '" />' +
	'<param name="wmode" value="' + mode + '" />' +
	'<param name="menu" value="false" />' +
	'<param name="quality" value="high" />' +
	'<param name="bgcolor" value="' + bg + '" />' +
	'<embed src="' + vUrl + '" wmode="' + mode + '" menu="false" quality="high" bgcolor="' + bg + '" width="' + wid + '" height="' + hei + '" name="' + obj + '" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />' +
	'</object>';
	document.write(viewObj);
}

function FlashMenuObjectVar(vUrl,obj,wid,hei,bg,mode,vVar) {
	var viewObj = '' +
	'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab#version=8,0,22,0" width="' + wid + '" height="' + hei + '" id="' + obj + '" align="middle">' +
	'<param name="movie" value="' + vUrl + '" />' +
	'<param name="wmode" value="' + mode + '" />' +
	'<param name="allowScriptAccess" value="always">' +
	'<param name="FlashVars" value="' + vVar + '">' +
	'<param name="menu" value="false" />' +
	'<param name="quality" value="high" />' +
	'<param name="bgcolor" value="' + bg + '" />' +
	'<embed src="' + vUrl + '" wmode="' + mode + '" menu="false" quality="high" bgcolor="' + bg + '" width="' + wid + '" height="' + hei + '" name="' + obj + '" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />' +
	'</object>';
	document.write(viewObj);
}

// µ¿¿µ»ó
function EmbedObject(vUrl,obj,wid,hei,auto) {
	var viewObj = '' +
	'<object id="' + obj + '" height="' + hei + '" width="' + wid + '" name="mpp" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">' +
	'<param name="URL" value="' + vUrl + '">' +
	'<param name="rate" value="1">' +
	'<param name="balance" value="0">' +
	'<param name="currentPosition" value="0">' +
	'<param name="defaultFrame" value>' +
	'<param name="playCount" value="1">' +
	'<param name="autoStart" value="' + auto + '">' +
	'<param name="currentMarker" value="0">' +
	'<param name="invokeURLs" value="-1">' +
	'<param name="baseURL" value>' +
	'<param name="volume" value="50">' +
	'<param name="mute" value="0">' +
	'<param name="uiMode" value="full">' +
	'<param name="stretchToFit" value="0">' +
	'<param name="windowlessVideo" value="0">' +
	'<param name="enabled" value="-1">' +
	'<param name="enableContextMenu" value="-1">' +
	'<param name="fullScreen" value="0">' +
	'<param name="SAMIStyle" value>' +
	'<param name="SAMILang" value>' +
	'<param name="SAMIFilename" value>' +
	'<param name="captioningID" value>' +
	'<param name="enableErrorDialogs" value="0">' +
	'<param name="_cx" value="8467">' +
	'<param name="_cy" value="8043">' +
	'</object>';
	return viewObj;
}

// º¸¾ÈÇÁ·Î±×·¥ Ãâ·Â
function XecureWebObject() {
	
	var viewXobj = '' +
	'<OBJECT ID="XecureWeb" CLASSID="CLSID:7E9FDB80-5316-11D4-B02C-00C04F0CD404" CODEBASE="http://download.softforum.co.kr/Published/XecureWeb/v7.2.2.8/xw_install.cab#Version=7,2,2,8" VIEWASTEXT>' +
	'<COMMENT>' +
	'<EMBED type="application/x-SoftForum-XecSSL40" hidden=true name="XecureWeb">' +
	'<NOEMBED>' +
	'</COMMENT>' +
	'No XecureWeb 4.0 PlugIn' +
	'</NOEMBED>' +
	'</EMBED>' +
	'</OBJECT>';
	document.write(viewXobj);
}

// ¼ýÀÚÀÎÁö Ã¼Å©(¼Ò¼öÁ¡±îÁö »ç¿ë°¡´É)
function checkNumber(str) {
	if (isNaN(str)) return false;
}

// onKeyUp½Ã ¼ýÀÚ Ã¼Å©
function number_chk(Obj) {
	if (isNaN(Obj.value)) {
		alert('¼ýÀÚ¸¸ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.');
		Obj.value = Obj.defaultValue;
		Obj.focus();
	}
}

// onKeyUp½Ã ¿µ¹®ÀÚ¿Í ¼ýÀÚ Ã¼Å© 5.6 ¿øÃ¢°æ
function nEng_chk(objtext1) {
  var inText = objtext1.value;
  var deny_pattern = /[^(a-zA-Z0-9)]/;

  if (deny_pattern.test(inText)) {
    alert("¿µ¹®ÀÚ¿Í ¼ýÀÚ¸¸À» ÀÔ·ÂÇÏ¼¼¿ä");
    objtext1.value = "";
    objtext1.focus();
    return false;
  }
  return true;
}


//¼ýÀÚ ÀÎÁö È®ÀÎ ÇÒ¶§ ¼ýÀÚÀÌ¸é true,¾Æ´Ï¸é false ¸®ÅÏ
function isNumber(obj) {
	for(var i = 0; i < obj.value.length; i++) {
		var chr = obj.value.substr(i,1);
		if(chr < '0' || chr > '9') return false;
	}
	return true;
}

// ÀÌ¸ÞÀÏ À¯È¿¼º Ã¼Å©
function checkEmail(str) {
	if (str.search(/(\S+)@(\S+)\.(\S+)/)) {
		return false;
	} else return true;
}

// ¹®ÀÚ ±æÀÌ ¹ÝÈ¯ (¿µ¹® 1byte, ÇÑ±Û 2byte °è»ê)
function getLen(str) {
	var len;
	var temp;
	len = str.length;
	var tot_cnt = 0;
	for (k=0;k < len;k++) {
		temp = str.charAt(k);
		if(escape(temp).length > 4) tot_cnt += 2; else tot_cnt++;
	}
	return tot_cnt;
}

// ÀÔ·Â¹®ÀÚ À¯È¿¼º Ã¼Å©
function containsCharsChk(input,chk) {
	var isChk = false;
	switch (chk) {
		case 1 :
			isChk = true;
			var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`~!@#$%^&*()-_=+{}[]|\:;\"'<>,./?";
			break;
		case 2 :
			var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
			break;
		case 3 :
			var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
			break;
		case 4 :
			var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@.";
			break;
		case 5 :
			var chars = "0123456789.-";
			break;
		case 6 :
			var chars = "0123456789.";
			break;
		case 7 :
			var chars = "0123456789";
			break;
		case 8 :
			var chars = "0123456789-";
			break;
	}
	var len = input.length;
	var chk = true;
	for (var inx = 0; inx < len; inx++) {
		if (isChk == true) {
			if (chars.indexOf(input.charAt(inx)) > -1) chk = true; // ÇØ´ç ¹®ÀÚ°¡ ÀÖÀ» ¶§
		} else {
			if (chars.indexOf(input.charAt(inx)) == -1) chk = false; // ¾ø´Â ¹®ÀÚ°¡ ÀÖÀ» ¶§
		}
	}
	return chk;
}

// ÇØ´ç°ªÀ» replace ÇÑ´Ù
function replaceValue(str,oldStr,newStr) {
	var temp = str.split(oldStr);
	temp = temp.join(newStr);
	return temp;
}

// ÇØ´ç°ªÀ» replace ÇÑ´Ù
function replaceAll(str , sep , pad) {
	while(str.indexOf(sep) > -1) str = str.replace(sep , pad);
	return str;
}

// ³¯Â¥ÇüÅÂ¸¦ Ã¼Å© ÇÑ´Ù
function checkDate(obj) {
	var strDate = obj.value;
	var intYear,intMon,intDay;
	var bFlag = true;
	if(strDate) {
		strDate = replaceValue(strDate,'-','');
		strDate = replaceValue(strDate,'.','');
		strDate = replaceValue(strDate,'/','');

		intYear = parseInt(strDate.substring(0,4),10);
		intMon = parseInt(strDate.substring(4,6),10);
		intDay = parseInt(strDate.substring(6,8),10);

		if (intYear < 1900) bFlag = false;
		if (isNaN(intMon) || intMon<1 || intMon>12) bFlag = false;
		if (isNaN(intDay) || intDay<1 || intDay>31) bFlag = false;

		if (intMon==4 || intMon==6 || intMon==9 || intMon==11) if (intDay==31) bFlag = false;

		if(!bFlag) {
			alert('¿Ã¹Ù¸¥ ³¯Â¥Çü½ÄÀÌ ¾Æ´Õ´Ï´Ù.');
			obj.value = obj.defaultValue;
			obj.focus();
		} else {
			if(intMon.toString().length == 1) intMon = '0' + intMon.toString();
			if(intDay.toString().length == 1) intDay = '0' + intDay.toString();
			obj.value= intYear + '-' + intMon + '-' + intDay;
		}
	}
	return bFlag;
}

/**
 * ÇØ´ç°ªÀÇ ³¯Â¥Â÷ÀÌ¸¦ Ã¼Å© ÇÑ´Ù
 * ³¯Â¥Çü½Ä ex) 2005-12-14
 * fVal ½ÃÀÛ³¯Â¥, tVal Á¾·á³¯Â¥, Bal ³¯Â¥Â÷ÀÌ ÀÓÀÇ Á¶Á¤
 */
function dateDifference(fVal,tVal,Bal) {
	if (fVal && tVal) {
		frDate = fVal.split('-');
		toDate = tVal.split('-');
		tmp1 = new Date(frDate[0],frDate[1],frDate[2]).getTime();
		tmp2 = new Date(toDate[0],toDate[1],toDate[2]).getTime();
		tmp = (tmp2-tmp1) / (1000*60*60*24) + Bal;
	} else tmp = '';
	return tmp;
}

/**
 * strChk Çü½ÄÀº gif|jpg|bmp
 * ÆÄÀÏ È®ÀåÀÚ Ã¼Å© strChk ¿¡ ÇØ´çÇÏ´Â ¹®ÀÚ°¡ ÀÖÀ¸¸é true ¾øÀ¸¸é false.
 */
function isFileChk(strChk,Obj) {
	var str = Obj.value.substring(Obj.value.lastIndexOf('\\')).toLowerCase();
	if (eval('str.match(/\.(' + strChk + ')$/)')) return true; else return false;
}

/**
 * fObj ÁÖ¹Î¹øÈ£ ¾ÕÀÚ¸®, sObj ÁÖ¹Î¹øÈ£ µÞÀÚ¸®
 * ÁÖ¹Î¹øÈ£ Ã¼Å© ¸ÂÀ¸¸é true Æ²¸®¸é false.
 */
function CheckJuminNumber(fObj,sObj) {
	total = 0;
	temp = new Array(13);
	for(i=1; i<=6; i++) temp[i] = fObj.value.charAt(i-1);
	for(i=7; i<=13; i++) temp[i] = sObj.value.charAt(i-7);
	for(i=1; i<=12; i++) total = total + temp[i] * ((i - 1) % 8 + 2);
	mm = temp[3] + temp[4];
	dd = temp[5] + temp[6];
	total = 11 - (total % 11);
	total = total % 10;
	if (!(total == temp[13] && mm < 13 && dd < 32 && (temp[7]==1 || temp[7]==2))) return false; else return true;
}

/**
 * Obj1 »ç¾÷¹øÈ£ ¾ÕÀÚ¸®, Obj2 »ç¾÷¹øÈ£ Áß°£ÀÚ¸®, Obj3 »ç¾÷¹øÈ£ µÞÀÚ¸®
 * »ç¾÷¹øÈ£ Ã¼Å© ¸ÂÀ¸¸é true Æ²¸®¸é false.
 */
function CheckSaupNumber(Obj1,Obj2,Obj3) {
	var digit = '13713713';
	var saup = Obj1.value + Obj2.value + Obj3.value;
	count = saup.length;
	tot = 0;
	for (i=0; i<count-2; i++) tot += eval(saup.charAt(i)) * eval(digit.charAt(i));
	tmp = eval(saup.charAt(8)) * 5;
	tmp1 = parseInt(tmp / 10);
	tmp2 = tmp % 10;
	tot = 10 - ((tot + eval(tmp1) + eval(tmp2)) % 10);
	if (tot != eval(saup.charAt(9))) return false; else return true;
}

/**
 *È­Æó´ÜÀ§·Î ¹Ù²Þ
 *100000-->100,000·Î º¯°æ
 */
function commaSplit(srcNumber) {
	var srcNumber = replaceValue(srcNumber,',','');
    if (!isNaN(srcNumber)) {
        var txtNumber = '' + srcNumber;
        txtNumber = txtNumber.replace(',','');
        var rxSplit = new RegExp('([0-9])([0-9][0-9][0-9][,.])');
        var arrNumber = txtNumber.split('.');
        arrNumber[0] += '.';
        do {
        	arrNumber[0] = arrNumber[0].replace(rxSplit, '$1,$2');
        } while (rxSplit.test(arrNumber[0]));
        if (arrNumber.length > 1) {
        	return arrNumber.join('');
        } else return arrNumber[0].split('.')[0];
    } else return srcNumber;
}

/**
 *È­Æó´ÜÀ§·Î ¹Ù²Þ
 *100000-->100,000·Î º¯°æ
 */
function commaSplitObj(obj) {
	var srcNumber = replaceValue(obj.value,',','');
    if(!isNaN(srcNumber)){
        var txtNumber = '' + srcNumber;
        txtNumber = txtNumber.replace(',','');
        var rxSplit = new RegExp('([0-9])([0-9][0-9][0-9][,.])');
        var arrNumber = txtNumber.split('.');
        arrNumber[0] += '.';
        do {
            arrNumber[0] = arrNumber[0].replace(rxSplit, '$1,$2');
        } while (rxSplit.test(arrNumber[0]));
        if (arrNumber.length > 1) {
            obj.value = arrNumber.join('');
        } else obj.value = arrNumber[0].split('.')[0];
    } else obj.value = srcNumber;
}

/**
 *ÅØ½ºÆ® È¤Àº ÅØ½ºÆ®¿¡¾î¸®¾î È¤Àº È÷µç°ªÀÇ NullÀ» È®ÀÎÇÑ´Ù
 *¹°·Ð °ø¹é¸¸ ÀÔ·ÂÇÑ°Íµµ Ã¼Å©ÇÑ´Ù
 */
function isNull(obj) {
    if (obj.value == '') {
        return true;
    } else {
        for(var i = 0; i < obj.value.length; i++) {
            var chr = obj.value.substring(i,1);
            if(chr != ' ' && obj.value.charCodeAt(i)!=32 ) return false;
        }
        return true;
    }
}

// ÄíÅ°°ªÀ» ¼ÂÆÃÇÔ
function setCookie(name, value, expiredays) {
	var todayDate = new Date();
	todayDate.setDate(todayDate.getDate() + expiredays);
	document.cookie = name + '=' + escape(value) + '; path=/; expires=' + todayDate.toGMTString() + ';'
}

// ÄíÅ°°ªÀ» °¡Á®¿È
function getCookie(name) {
	var nameOfCookie = name + '=';
	var x = 0;
	while (x <= document.cookie.length) {
		var y = (x + nameOfCookie.length);
		if (document.cookie.substring( x, y ) == nameOfCookie) {
			if ((endOfCookie=document.cookie.indexOf(';', y)) == -1) endOfCookie = document.cookie.length;
			return unescape(document.cookie.substring(y, endOfCookie));
		}
		x = document.cookie.indexOf(' ', x) + 1;
		if (x == 0) break;
	}
	return '';
}

// Ã¼Å©¹Ú½º ÀüÃ¼ ¼±ÅÃ,ÇØÁ¦
function checkBox_all(field) {
	var filedName = document.getElementsByName(field);
    for (x=0; x < filedName.length; x++) {
        filedName[x].checked = !filedName[x].checked;
	}
}

// Ã¼Å©¹Ú½º ¼±ÅÃ°ª
function checkBox_value(field) {
	var filedName = document.getElementsByName(field);
	var check_values = '';
	for (x=0; x < filedName.length; x++) {
		check_values += (filedName[x].checked) ? ' ' + filedName[x].value : '';
	}
	return check_values.substring(1);
}

//Return Radio Button Check Value
//¹Ú±ÔÈ« - 06/04/14
function fn_chkRdo(obj)
{
	var i;
	var intLen = obj.length;
	var strValue;

	for(i=0;i<intLen;i++)
		if ( obj[i].checked) strValue = obj[i].value;
	return strValue;
}

//Set Checked Rdio
//¹Ú±ÔÈ« - 06/04/20
function CheckdeRdio_fun(objRdo, strVal)
{
	var intLen = objRdo.length;
	var li;

	for(li=0;li<intLen;li++)
		if(objRdo[li].value == strVal)
			objRdo[li].checked = true;

}

// ÆäÀÌÁö ÀÌµ¿
function goPage(vUrl) {
	window.location = vUrl;
}
//¼¿·ºÆ®¹Ú½º¿¡¼­ ÆäÀÌÁö ÀÌµ¿
function goLinkPage() {
	url = document.all.siteSelect.value;
	if(url!="#"){
		window.open(url);
	}
}


// ÆäÀÌÁö ÀÌµ¿
function goBack() {
	history.back();
}

//ÆË¾÷Ã¢ (È­¸éÁß¾Ó)
function pageOpen(win,newwin,wid,hei,opt) {
	X = Math.ceil((window.screen.width-wid) / 2);
	Y = Math.ceil((window.screen.height-hei) / 2);
	window.open(win,newwin,'left='+X+',top='+Y+',width='+wid+',height='+hei+','+opt);
}

//Å°º¸µå ¿£ÅÍ Ã¼Å©(event.keyCode,ÇÔ¼ö)
function keyEnterCheck(evt,fun) {
	if (evt.keyCode == 13) {
		if (fun) eval(fun);
		evt.returnValue = false;
	}
}

//ÁÖ¼Ò°Ë»ö
function searchAddress(fn,zc1,zc2,ad1,ad2) {
	var vUrl = '/common/common_address.asp?fn=' + fn + '&zip1=' + zc1 + '&zip2=' + zc2 + '&add1=' + ad1 + '&add2=' + ad2;
	pageOpen(vUrl,'address',436,500,'scrollbars=yes,status=no');
}

//´Ù¿î·Îµå
function attachDownload2(vUrl) {
	parent.location.href = '/manage/common/gs_common_download.asp?downpath=' + vUrl;
}

function attachDownload4(vUrl) {
	parent.location.href = '/common/download4.asp?downpath=' + vUrl;
}

//´Ù¿î·Îµå -> »õÃ¢ ¶ç¿ö¼­ ´Ù¿î (ÀÌ¹ÌÁö Å¬¸¯ÈÄ BACK ÇÏ¸é È¨À¸·Î°¨)
function attachDownload(vUrl) {
var ext = vUrl.split(".");
var arrlen = ext.length -1;
//var extname = ext[arrlen].toUpperCase();   //È®ÀåÁö ¶¼¿Â°ÍÀ» ´ë¹®ÀÚÀÚ·Î ¹Ù²Û´Ù
//	if (extname == "JPG" || extname == "GIF" || extname == "BMP" || extname == "PDF" || extname == "HTM" || extname == "HTML"){
 //    	void(window.open('/common/download2.asp?downpath=' + vUrl));
//	}
//	else{
		parent.location.href = '/common/download2.asp?downpath=' + vUrl;
//	}
}
//´Ù¿î·Îµå ¿øº»
//function attachDownload(vUrl) {
//	parent.location.href = '/common/download2.asp?downpath=' + vUrl;
//}

//»õÃ¢À¸·Î ´Ù¿î·Îµå
function attachDownload3(vUrl) {
	void(window.open('/common/download2.asp?downpath=' + vUrl));
}

// ÁÖ¹Îµî·Ï¹øÈ£ Ã¼Å©...
function checkIndNo(strings) {
    var c = new Array(13);
    var i;
    var sum=0, il_y=0, epno_chk=0;
    var li_chkvalue = new Array(2,3,4,5,6,7,8,9,2,3,4,5);

	if(strings.length != 13) {
        return(false);
    }

	for(i=0;i<13;i++) {
        c[i] = strings.charAt(i);
        if(c[i]<'0' || c[i]>'9') {
            return(false);
        }
    }

	for(i=0;i<12;i++) {
        sum += eval(c[i]) * li_chkvalue[i];
    }
    li_y = sum - Math.floor(sum/11)*11;
    li_y = 11 - li_y;
    li_y = li_y - Math.floor(li_y/10)*10;

	if(li_y==eval(c[12])) {
        return(true);
    } else {
        return(false);
    }
    return(false);
}

//È®´ëÀÌ¹ÌÁö ÆË¾÷
function openZoom(path, title) {
	var url = "/pop/pop_img.asp?path=" + path + "&title=" + title;
	pageOpen(url,'popup', '600', '560', 'scrollbars=yes, resizable=yes');
}
//°í°´¼­ºñ½º °ø»çÁøÇàÇöÈ²  ÆË¾÷
function openZoomCl(path, title) {
	var url = "pop_img.asp?path=" + path + "&title=" + title;
	pageOpen(url,'popup', '800', '800', 'scrollbars=yes, resizable=yes');
}

//È®´ëÀÌ¹ÌÁö ÆË¾÷
function openZoom_New(path, title) {
	var url = "/lotout/lotout_pop/airView.asp?path=" + path + "&title=" + title;
	pageOpen(url,'popup', '600', '620', 'scrollbars=yes, resizable=yes');
}

//È®´ëÀÌ¹ÌÁö ÆË¾÷ - ÃÊ±âÃ¢ Å©±â ¼öÁ¤°¡´É
function openZoomReSize(path, title, sWidth, sHeight) {
	var url = "/pop/pop_img.asp?path=" + path + "&title=" + title;
	pageOpen(url,'popup', sWidth, sHeight, 'scrollbars=yes, resizable=yes');
}

//È®´ëÀÌ¹ÌÁö ÆË¾÷ - ÃÊ±âÃ¢ Å©±â ¼öÁ¤°¡´É
function openZoomReSize_New(path, title, sWidth, sHeight) {
	var url = "/lotout/lotout_pop/airView.asp?path=" + path + "&title=" + title;
	pageOpen(url,'popup', sWidth, sHeight, 'scrollbars=yes, resizable=yes');
}

/* ÂòÇÏ±â */
function memberWish(pat, tit, loc) {
	var vUrl = 'part=' + hangleCheck(pat) + '&title=' + hangleCheck(tit) + '&url=' + hangleCheck(loc);
	doRequestUsingPOST('/common/common_wish.asp',vUrl,'eval(xmlHttp.responseText)');
}
/* ÂòÇÏ±â */


/* Æ¯¼ö ¹®ÀÚ Ã¼Å© */
function etc_check(strings)
{
    var c;
    var i;

	for(i=0;i<strings.length;i++)
	{
        c = strings.charAt(i);

		if((c < '0' || c > '9')&&(c < 'a' || c > 'z')&&(c < 'A' || c > 'Z'))
		{
           return(false);
        }
    }
    return(true);
}




//ÀÌ¹ÌÁö ÆË¾÷
function showImgWin(pre_img_src,title) {
	var preHtmlz = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN' 'http://www.w3.org/TR/html4/loose.dtd'>" +
				   "<html id='img-popup'><head>" +
				   "<link rel='stylesheet' type='text/css' href='/css/common.css'><title>ÀÌ¹ÌÁöÅ©°Ôº¸±â</title>" +
				   "<script type='text/javascript'>" +
				   "function imgReSize() {  width1=document.getElementById(\"Timage\").width;if(width1>1024) width1=1024; height1=document.getElementById(\"Timage\").height;if(height1>768) height1=768; top.window.resizeTo(width1+62,height1+128); }" +
				   "</script>" +
				   "</head>" +
				   "<body id='img-popup' onclick='top.window.close();'>" +
				   "<div class='head'><h1>" + title + "</h1><p>* ÀÌ¹ÌÁö¸¦ Å¬¸¯ÇÏ½Ã¸é ÆË¾÷Ã¢ÀÌ ´ÝÈü´Ï´Ù</p></div>" +
				   "<div class='body-area'><div class='body'>" +
				   "<img src='" + pre_img_src + "'  title='Å¬¸¯ÇÏ½Ã¸é ´ÝÈü´Ï´Ù.' name='Timage' id='Timage'>" +
				   "</div><div class='footer'><div class='button'><a href='javascript:window.close();'><img src='/img/common/popup/btn_close02.gif' alt='´Ý±â'></a></div></div>" +
				   "</body></html>";
	var preImagez = window.open('','preview','width=1,height=1,scrollbars=yes');
	preImagez.document.open();
	preImagez.document.write(preHtmlz);
	preImagez.setTimeout('imgReSize()',100);
	preImagez.document.close();
	preImagez.focus();
}


function MM_jumpMenu(targ,selObj,restore){ //v3.0
//targ Å¸°ÙÀÌ µÇ´Â ÇÁ·¹ÀÓ
//selObj ¼¿·ºÆ® °´Ã¼

			window.open(selObj.options[selObj.selectedIndex].value,"newsite","");
	  if (restore) selObj.selectedIndex=0;
}



//ÈÞ¸Õ½Ã¾Æ¼Ò°³ ¸µÅ©
function humanClick(clickNum){
		document.location.href = "/comp/about/d310_e342.asp";
}

//º¸±ÝÀÚ¸® ¸µÅ©
//function goBogum(){
//	var my = window.open ('http://www.bogeumjari.com/');
//	my.window.focus();
//}

//ÇÃ·¡½Ã¹è³Ê ¸µÅ©
function quickClick(clickNum){
//º¸±ÝÀÚ¸®
	if (clickNum == "1"){
		var my = window.open ('http://www.newplus.go.kr/');
		my.window.focus();
	}
//±¹¹ÎÀÓ´ë
	else if (clickNum == "2"){
		var my = window.open ('http://kookmin.jugong.co.kr/');
		my.window.focus();
	}
//»çÀÌ¹ö¸ðµ¨ÇÏ¿ì½º
	else if (clickNum == "3"){
		var my = window.open ('http://vr.jugong.co.kr/');
		my.window.focus();
	}
}
//ÇÃ·¡½Ã¹è³Ê ¸µÅ©
function ClickURL(clickNum){
//°Ç¼³±³ÅëºÎ Çõ½Ãµµ½Ã È¨ÆäÀÌÁö
	if (clickNum == "1"){
		var my = window.open ('http://innocity.moct.go.kr/');
		my.window.focus();
	}
//°Ç¼³±³ÅëºÎ ±â¾÷µµ½Ã È¨ÆäÀÌÁö
	else if (clickNum == "2"){
		var my = window.open ('http://enterprisecity.moct.go.kr/');
		my.window.focus();
	}
//°Ç¼³±³ÅëºÎ Çàº¹µµ½Ã È¨ÆäÀÌÁö
	else if (clickNum == "3"){
		var my = window.open ('http://www.macc.go.kr/');
		my.window.focus();
	}
//ÁÖÅÃ°ø»ç Çàº¹µµ½Ã Ã¹¸¶À» È¨ÆäÀÌÁö
	else if (clickNum == "4"){
		var my = window.open ('http://www.firsttown.org/');
		my.window.focus();
	}
//±¹°¡±ÕÇü¹ßÀüÀ§¿øÈ¸ È¨ÆäÀÌÁö
	else if (clickNum == "5"){
		var my = window.open ('http://www.balance.go.kr/');
		my.window.focus();
	}		
}

function cyber_popup(url) {
  var my = window.open (url,'popupname','width=659,height=394,top=130,left=160,resizable=no,scrollbars=no');
  my.window.focus();
}

//input text field
function clearText(thefield){
if (thefield.defaultValue==thefield.value)
        thefield.value = ""
}

//Æ¯¼ö±âÈ£ Á¦°Å 
function strCheck(obj) {
	var form =document.writeForm;
	var str = obj.value; 
	//var _etcValue   = '~`#$%%^&*()=+\|[{]};:\'\"<>/';
	var _etcValue   = '~`#$%%^&*\|[{]};:\'\"<>/';
	var i,j;
	for(i=0;i<str.length;i++) {
	  for(j=0;j<_etcValue.length;j++){
		if(str.charAt(i) == _etcValue.charAt(j)){			
 			alert("Æ¯¼ö¹®ÀÚ´Â ÀÔ·ÂÇÏ½Ç¼ö ¾ø½À´Ï´Ù!");
			obj.value=str.substr(0,i);
            return;
		}
	  }	 
	}
}




/////////////////////////////////////////////////////////////////////////
//2010 ÀÎÅÍ³Ý Ã»¾à È¨ÆäÀÌÁö ¸®´º¾ó Ãß°¡ ½ºÅ©¸³Æ®
/////////////////////////////////////////////////////////////////////////
function openflash(width,height,wmode,src,gubun){ 
	  if (wmode != "")
	    return "<object id=\""+gubun+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width="+width+" height="+height+"><param name=wmode value=transparent><param name=movie value="+src+"><param name=quality value=high ><embed src="+src+" quality=high  pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width="+width+" height="+height+"></embed></object>"; 
	  else
	    return "<object id=\""+gubun+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width="+width+" height="+height+"><param name=movie value="+src+"><param name=quality value=high ><embed src="+src+" quality=high  pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width="+width+" height="+height+"></embed></object>"; 
}

function writeflash(src) { 
    document.write(src); 
}
//¹öÆ° ·Ñ¿À¹ö
function mmover(obj) {
	var img = obj.src.split('.gif');
	obj.src = img[0] + 'on.gif';
}
function mmout(obj) {
	var img = obj.src.split('on.gif');
	obj.src = img[0] + '.gif';
}

//È­¸é È®´ë Ãà¼Ò 
function styleZoom(cno){
	if(document.getElementById('wrapper').style.zoom == ""){
		document.getElementById('wrapper').style.zoom='100%'
	}
	var z;
	var obj = document.getElementById('wrapper');
	var csize = parseInt(obj.style.zoom);
	//alert(csize);
	if(cno){
		z = csize + 10 + '%';
		obj.style.zoom = z;
	}else{
		z = csize - 10 + '%';
		if(csize > 70){
			obj.style.zoom = z;
		}
	}
}



