function setSearchOpt(value) {
	if (document.getElementById("d") != null)
		document.getElementById("d").style.display = "none";
	if (document.getElementById("m") != null)
		document.getElementById("m").style.display = "none";
	if (document.getElementById("q") != null)
		document.getElementById("q").style.display = "none";
	if (document.getElementById("y") != null)
		document.getElementById("y").style.display = "none";
	if (document.getElementById("t") != null)
		document.getElementById("t").style.display = "none";
	document.getElementById(value).style.display ="block";
}

function updateContent(pid){
	var w = 600;
	var h = 300;
	var t = parseInt((screen.height - h) / 2.5, 10);
	var l = parseInt((screen.width - w) / 2, 10);
	var url = "/vocsmrt/admin/common/update.petition.content.jsp?petition_id=" + pid;
	window.open(url, "UpdateContent", "width=" + w + ",height=" + h + ",top=" + t + ",left=" + l + ",resizable=false,scrollbars=no,status=yes");
}


function insertFaq(pid, aid){
	var w = 600;
	var h = 500;
	var t = parseInt((screen.height - h) / 2.5, 10);
	var l = parseInt((screen.width - w) / 2, 10);
	var url = "/vocsmrt/faq/insert.jsp?petition_id=" + pid + "&answer_id=" + aid;
	window.open(url, "FAQ", "width=" + w + ",height=" + h + ",top=" + t + ",left=" + l + ",resizable=false,scrollbars=no,status=yes");
}
function updateFaq(fid){
	var w = 600;
	var h = 500;
	var t = parseInt((screen.height - h) / 2.5, 10);
	var l = parseInt((screen.width - w) / 2, 10);
	var url = "/vocsmrt/faq/update.jsp?article_id=" + fid;
	window.open(url, "FAQ", "width=" + w + ",height=" + h + ",top=" + t + ",left=" + l + ",resizable=false,scrollbars=no,status=yes");
}

function insertCase(pid, aid){
	var w = 600;
	var h = 400;
	var t = parseInt((screen.height - h) / 2.5, 10);
	var l = parseInt((screen.width - w) / 2, 10);
	var url = "/vocsmrt/case/insert.jsp?petition_id=" + pid + "&answer_id=" + aid;
	window.open(url, "CASE", "width=" + w + ",height=" + h + ",top=" + t + ",left=" + l + ",resizable=false,scrollbars=no,status=yes");
}
function updateCase(cid){
	var w = 600;
	var h = 400;
	var t = parseInt((screen.height - h) / 2.5, 10);
	var l = parseInt((screen.width - w) / 2, 10);
	var url = "/vocsmrt/case/update.jsp?case_id=" + cid;
	window.open(url, "CASE", "width=" + w + ",height=" + h + ",top=" + t + ",left=" + l + ",resizable=false,scrollbars=no,status=yes");
}

function insertKnow(pid, aid){
	var w = 600;
	var h = 400;
	var t = parseInt((screen.height - h) / 2.5, 10);
	var l = parseInt((screen.width - w) / 2, 10);
	var url = "/vocsmrt/know/insert.jsp?petition_id=" + pid + "&answer_id=" + aid;
	window.open(url, "KNOW", "width=" + w + ",height=" + h + ",top=" + t + ",left=" + l + ",resizable=false,scrollbars=no,status=yes");
}
function updateKnow(kid){
	var w = 600;
	var h = 400;
	var t = parseInt((screen.height - h) / 2.5, 10);
	var l = parseInt((screen.width - w) / 2, 10);
	var url = "/vocsmrt/know/update.jsp?know_id=" + kid;
	window.open(url, "CASE", "width=" + w + ",height=" + h + ",top=" + t + ",left=" + l + ",resizable=false,scrollbars=no,status=yes");
}
function toExcelDefault(form){
	var depth = arguments.length;
	if (depth == 1) {
		var url = "excel.jsp";
		form.action = url;
		form.target = "_self";
		form.submit();
		form.action = "";
	}
}

function toExcel(form, location){
	var depth = arguments.length;
	if (depth == 1) {
		toExcelDefault(form);
	} else if (depth == 2) {
		form.action = location;
		form.target = "_self";
		form.submit();
		form.action = "";
	}
}

function isBizNo(obj){
	var as_Biz_no = String(obj.value);
	var isNum = true;
	var I_TEMP_SUM = 0 ;
	var I_TEMP = 0;
	var S_TEMP;
	var I_CHK_DIGIT = 0;

	as_Biz_no = remove_hyphen(as_Biz_no);

	I_TEMP_SUM = I_TEMP_SUM + parseInt(as_Biz_no.substring(0,1),10) ;
	I_TEMP_SUM = I_TEMP_SUM + parseInt(as_Biz_no.substring(1,2),10) * 3 ;
	I_TEMP_SUM = I_TEMP_SUM + parseInt(as_Biz_no.substring(2,3),10) * 7 ;
	I_TEMP_SUM = I_TEMP_SUM + parseInt(as_Biz_no.substring(3,4),10) ;
	I_TEMP_SUM = I_TEMP_SUM + parseInt(as_Biz_no.substring(4,5),10) * 3 ;
	I_TEMP_SUM = I_TEMP_SUM + parseInt(as_Biz_no.substring(5,6),10) * 7 ;
	I_TEMP_SUM = I_TEMP_SUM + parseInt(as_Biz_no.substring(6,7),10) ;
	I_TEMP_SUM = I_TEMP_SUM + parseInt(as_Biz_no.substring(7,8),10) * 3 ;
	I_TEMP = parseInt(as_Biz_no.substring(8,9),10)*5,'00';
	if (I_TEMP < 10)
		S_TEMP = '0' + String(I_TEMP);
	else
		S_TEMP = String(I_TEMP);

	I_TEMP_SUM = I_TEMP_SUM + parseInt(S_TEMP.substring(0,1)) + parseInt(S_TEMP.substring(1,2)) ;
	I_CHK_DIGIT= (10-(I_TEMP_SUM%10))%10 ;
	if (as_Biz_no.substring(9,10) != String(I_CHK_DIGIT)) return false;
	return true ;
}
/**
 * °Ë»ö´Ü¾î ½ºÅ¸ÀÏ ¹Ù²Ù±â
 */

function searchAndReplace() {
	var applicableClass = "text_search";  // Àû¿ëµÉ ½ºÅ¸ÀÏÅ¬·¡½º
	var searchVal = searchBar.value;  // ÀÔ·Â¹ÞÀº °Ë»ö¹®ÀÚ¿­

	var tag = "(<span class=" + applicableClass + ">)|(</span><!-- replaced -->)";
	// Àû¿ëµÈ ÅÂ±× Á¦°ÅÀ§ÇÑ Á¤±Ô½Ä (±âÁ¸ </span>°ú Â÷º°È­ À§ÇØ replaced ÁÖ¼® Ã·°¡)
	var initial = new RegExp(tag, "gi");  // ÀÌÀü replaceÈ¿°ú ÃÊ±âÈ­¸¦ À§ÇÑ Á¤±Ô½Ä (Àû¿ëµÈ ÅÂ±× Á¦°Å)
	                                      // g -> ÀüÃ¼, i -> ´ë¼Ò¹®ÀÚ ±¸ºÐ x

	var ma = new RegExp(searchVal, "i");  // °Ë»ö¹®ÀÚ¿­ÀÌ ÇÏ³ª¶óµµ ÀÖ´ÂÁö matchÇÏ±â À§ÇÑ Á¤±Ô½Ä
	var re = new RegExp(searchVal, "gi");  // °Ë»ö¹®ÀÚ¿­À» replaceÇÏ±â À§ÇÑ Á¤±Ô½Ä
	var change = "<span class=" + applicableClass + ">" + searchVal + "</span><!-- replaced -->";
	// Ä¡È¯ ¹®ÀÚ¿­

	search.innerHTML = search.innerHTML.replace(initial, "");

	if(search.innerHTML.match(ma)) {
		search.innerHTML = search.innerHTML.replace(re, change);
	} else
		alert("ÇØ´ç ´Ü¾î°¡ ¾ø½À´Ï´Ù.");
}

function checkSyntax() {
	var check = "/([a-z]+)|([A-Z]+)|([0-9]+)|[\.%\(\)\*\\\?\<\>\,\!-=+/{};_\"']/";
	if(searchBar.value == "")
		alert("ÇÑ±Û °Ë»ö ´Ü¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
	else if(searchBar.value.match(check))
		alert("ÇÑ±Û¸¸ ÀÔ·Â °¡´ÉÇÕ´Ï´Ù.");
	else
		searchAndReplace();
}

/**
 *  Åë°è ÄÁÅÙÃ÷ÀÎ°æ¿ì DIV °¡·Î½ºÅ©·Ñ »ý¼º½Ã HEIGHT º¸Á¤... , ¿Þµµ¿ìÀÇ ½ºÅ©·Ñ ¸ÇÀ§·Î...
 */

function TongContents_init() {
	var dataobj=document.all? document.all.tongscroll : document.getElementById("tongscroll");
	dataobj.style.height = dataobj.offsetHeight + 30;
	window.scrollTo(0,0);
}
/**
 * ÆË¾÷À» À§ÇÑ À©µµ¿ì¸¦ ¿ÀÇÂÇÑ´Ù.
 */
function openSubWin(sUrl, winname)
{
	var w = 820;
	var h = 520;
	var bResize = false;
	var t = parseInt((screen.height - h) / 2.5, 10);
	window.open(sUrl, winname, "width=" + w + ",top=" + t + ",height=" + h + ",resizable=" + bResize + ",scrollbars=yes,status=yes,menubar=no,toolbar=no,location=no,directories=no");
}

function delSubmit(obj, url) {
	obj.action = url;
	if(confirm('Á¤¸»·Î »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?')) {
		obj.submit();
	}
	obj.action = "";
}

function doSubmit(obj, url) {
	obj.action = url;
	obj.submit();
	obj.action = "";
}

function DoSubmit(obj, url) {
	obj.action = url;
	obj.submit();
	obj.action = "";
}

function doLocation(url) {
	var value = document.getElementById("boardtype").options[document.getElementById("boardtype").selectedIndex].value;
	var str = value.split("/");
	var boardid = str[0];
	var boardpath = str[1];
	window.location = url + "?boardid=" + boardid + "&boardpath=" + boardpath;
}

function openPop(url) {
	window.open(url, "", width=485,height=40);
}

function doPop(url, style) {
	window.open(url, "", style);
}

function doSetting() {
	var program = document.getElementById("programid").options[document.getElementById("programid").selectedIndex].value;
	var str = program.split(":");
	var adminurl = str[3];
	if(adminurl.length > 0) {
		document.getElementById("target").style.display = "";
	}
}

//======================================================================================
// DESCRIPTION	:	MouseRollOver
// Parameter	:	strEvent, objImage, strOverImgSrc
// Return Value	:	none
//======================================================================================
var strBackupImageSrc;
function imageOnMouseEvent(strEvent, objImage, strOverImgSrc)
{
	var obj = document.getElementById(objImage);
	if (obj == null)
		return;
	if (strEvent == "over") {
		strBackupImageSrc = obj.src;
		obj.src = strOverImgSrc;
	} else {
		obj.src = strBackupImageSrc;	// Restore Image
	}
}


function rootImageOnMouseEvent(strEvent, objImage, strOverImgSrc) {
	var obj = document.getElementById(objImage);
	if (obj == null)
		return;
	if (strEvent == "over") {
		strBackupImageSrc = obj.src;
		obj.src = strOverImgSrc;
	} else 	if (strEvent == "rootout") {
		if (event != null) {
			try {
				var imgname = event.toElement.name;
				if (imgname != null) {
					if (imgname.indexOf("mid1_") > -1) {
						obj.src = strBackupImageSrc;	// Restore Image
					}
				}
			} catch (e) {
			}
		}
	} else {
		obj.src = strBackupImageSrc;	// Restore Image
	}
}

//======================================================================================
// DESCRIPTION	:	1Â÷ ¸Þ´º ÀÌ¹ÌÁö¿¡ ¿À¹öÇßÀ»¶§ ¼±ÅÃµÈ 1Â÷ÀÌ¹ÌÁö¸¦ ¹Ù²ãÁÙ°æ¿ì »ç¿ë
//======================================================================================
function changeRootImage(intCode, imgurl)
{
	var objMenuContainer = document.getElementById("divMid2Menu");
	if (objMenuContainer != null){
		for(var i = 0; i < objMenuContainer.children.length; i++){
			var objMenu = objMenuContainer.children.item(i);
			if (objMenu != null) {
				if(objMenu.getAttribute("parentCode") != null && objMenu.getAttribute("parentCode") == intCode){
					var objimg = document.getElementById("mid1_" + objMenu.getAttribute("imgindex"));
					if (objimg != null) {
						objimg.src = imgurl + "images/menu/" + objMenu.getAttribute("parentCode") + "/mid1_ov.gif";
					}
				}
			}
		}
	}
}

//======================================================================================
// DESCRIPTION	:	Top Menu Function
// Parameter	:	intParentCode : Parent Menu Code
// Return Value	:	none
//======================================================================================
var strBackupParentCode;
function toggleChildMenu(intParentCode)
{
	if (strBackupParentCode == intParentCode) {
		//window.status = strBackupParentCode + " vs " + intParentCode;
		return;
	}
	var objMenuContainer = document.getElementById("divMid2Menu");
	if (objMenuContainer != null)
	{
		for(var i = 0; i < objMenuContainer.children.length; i++) {
			var objMenu = objMenuContainer.children.item(i);
			if(objMenu.getAttribute("parentCode") != null && objMenu.getAttribute("parentCode") == intParentCode) {
				strBackupParentCode = intParentCode;
				objMenu.style.display = "inline";
			} else {
				objMenu.style.display = "none";
			}
		}
	}
}


//======================================================================================
// DESCRIPTION	:	Top Menu Function
// Parameter	:	intParentCode : Parent Menu Code
// Return Value	:	none
//======================================================================================

function initMenu(intCode, imgurl)
{
	var isValidInit = true;
	if (event.toElement != null) {
		var area = event.toElement.getAttribute("area") + "";
		//window.status = "id:" + event.toElement.id + " ,name:" + event.toElement.name+", tagname:"+event.toElement.tagName + ", area:" + area;
		if (area != "undefined" && area != "NaN" && area  != "null" && area != "") {
			if (area == "menuarea") {
				isValidInit = false;
			}
		}
	}

	// ¼±ÅÃµÈ 1Â÷ ÀÌ¹ÌÁö°¡ OVER IMAGE¿Í Æ²¸°°æ¿ì ÁÖ¼®ÇØ¾ßÇÑ´Ù.
	if (strBackupParentCode == intCode) {
		isValidInit = false;
	}
	if (isValidInit == true)
	{
		var objMenuContainer = document.getElementById("divMid2Menu");
		strBackupParentCode = "";
		if (objMenuContainer != null)
		{
		//window.status="";
			for(var i = 0; i < objMenuContainer.children.length; i++)
			{
				var objMenu = objMenuContainer.children.item(i);

				if(objMenu.getAttribute("parentCode") != null && objMenu.getAttribute("parentCode") == intCode) {
					strBackupParentCode = intCode;
					objMenu.style.display = "inline";
				} else {
					objMenu.style.display = "none";
				}

				// ÀÌ¹ÌÁö ¸ðµÎ ´Ù½Ã ¼ÂÆÃ

				var objimg = document.getElementById("mid1_" + objMenu.getAttribute("imgindex"));
					//window.status+=", " + objMenu.getAttribute("imgindex") + ":" + objimg;
				 	if (objimg != null) {
						if (objMenu.getAttribute("parentCode") == intCode) {
				 			objimg.src = "/voc/images/menu/" + objMenu.getAttribute("parentCode") + "/mid1_se.gif";
						} else {
							objimg.src = "/voc/images/menu/" + objMenu.getAttribute("parentCode") + "/mid1.gif";
						}
					}

			}
		}
	}
}

//======================================================================================
// DESCRIPTION	:	URL Change Function
// Parameter	:	strUrl, strsTarget
// Return Value	:	none
//======================================================================================
function UrlChange(strUrl, strTarget)
{
	if (strUrl != "")
	{
		window.open(strUrl,strTarget);
	}
}

function reaizeWindow() {
	getWidth = document.getElementById('popImg').getAttribute('width');
	getHeight = document.getElementById('popImg').getAttribute('height');

}

function view2() {
	getSrc = document.getElementById("minImg").getAttribute("src");
	stringa="copyhistory=n,directories=n,location=n,menubar=n,status=n";
	popup=window.open("","PhotoImage",stringa);
	popup.document.open();
	popup.document.write("<HTML><HEAD>");
	popup.document.write("<TITLE>PhotoImage</TITLE>");
	popup.document.write("<script>");
	popup.document.write("function reaizeWindow() { ");
	popup.document.write("getWidth = document.getElementById('popImg').getAttribute('width');");
	popup.document.write("getHeight = document.getElementById('popImg').getAttribute('height');");
	popup.document.write("alert('sdfsd')");
	popup.document.write("window.resizeTo(100,100)");
	popup.document.write("}");
	popup.document.write("</script>");
	popup.document.write("</HEAD><BODY  leftmargin = 0 topmargin = 0 >");
	popup.document.write("<CENTER>");
	popup.document.write("<TABLE cellSpacing=0 cellPadding=0  border=0>");
	popup.document.write("<TR>");
	popup.document.write("<TD vAlign=top>");
	popup.document.write("<img name='popImg' id='popImg' style='cursor:hand' src=" + getSrc + " border=0 onclick='window.close()'>");
	popup.document.write("</td>");
	popup.document.write("</tr>");
	popup.document.write("</table>");
	popup.document.write("</CENTER>");
	popup.document.write("<script>");
	popup.document.write("window.resizeTo(document.getElementById('popImg').getAttribute('width'),document.getElementById('popImg').getAttribute('height'))");
	popup.document.write("</script>");
	popup.document.write("</BODY></HTML>");
	popup.document.close();
}

function MenuRollOver(e) {
    if(!e) {
        el = event.srcElement;
        if(el.oversrc) {
            tmp = el.src;
            el.src = el.oversrc;
            el.oversrc = tmp;
        }
    } else {
        if(e.target.getAttribute("oversrc")) {
            tmp = e.target.src;
            e.target.src = e.target.getAttribute("oversrc");
            e.target.setAttribute("oversrc", tmp);
        }
    }
}

function InitRollOver() {
    var max = document.images.length;
    for(i=0; i<max; i++) {
        el = document.images[i];
        if(el.getAttribute("oversrc")) {
            el.onmouseover = MenuRollOver;
            el.onmouseout = MenuRollOver;
        }
    }
}

function SetMenuID(id) {
    el = document.getElementById(id);
    if(el.getAttribute("setsrc")) {
        el.src = el.getAttribute("setsrc");
        if(el.getAttribute("oversrc")) el.setAttribute("oversrc", el.getAttribute("setsrc"));
    } else {
        if(el.getAttribute("oversrc")) el.src = el.getAttribute("oversrc");
    }
    el.onmouseover = el.onmouseout = "";
}

/**
 * ¿ìÆí¹øÈ£ ¿ÀÇÂ
 */
 /**
 * 20090707 ¿ìÆí¹øÈ£ Ã¢ ½ºÅ©·Ñ¹Ù YES·Î ¼öÁ¤
 */
 function zipSearch(formName, zipcd1Name, zipcd2Name, addressName) {
	var w = 489;
	var h = 460;
	var t = parseInt((screen.height - h) / 2.5, 10);
	var l = parseInt((screen.width - w) / 2, 10);
	var url = "/vocsmrt/common/zip.jsp?formName=" + formName + "&zipcd1Name=" + zipcd1Name + "&zipcd2Name=" + zipcd2Name + "&addressName=" + addressName;
	window.open(url, "zipsearch", "width=" + w + ",height=" + h + ",top=" + t + ",left=" + l + ",resizable=NO,scrollbars=YES");
}

/**
 * ºÎ¼­ ¼±ÅÃ
 */
 function buseoSelect(formName, code, name) {
	var w = 350;
	var h = 486;
	var t = parseInt((screen.height - h) / 2.5, 10);
	var l = parseInt((screen.width - w) / 2, 10);
	var url = "/vocsmrt/common/buseo.jsp?formName=" + formName + "&code=" + code + "&nmae=" + name;
	window.open(url, "BUSEO", "width=" + w + ",height=" + h + ",top=" + t + ",left=" + l + ",resizable=false,scrollbars=no,status=yes");
}

/**
 * ºÎ¼­ °Ë»ö
 */
 function buseoSearch(formName, code, name) {
	var w = 350;
	var h = 486;
	var t = parseInt((screen.height - h) / 2.5, 10);
	var l = parseInt((screen.width - w) / 2, 10);
	var url = "/vocsmrt/common/buseo.jsp?formName=" + formName + "&code=" + code + "&nmae=" + name + "&mode=search";
	window.open(url, "BUSEO", "width=" + w + ",height=" + h + ",top=" + t + ",left=" + l + ",resizable=false,scrollbars=no,status=yes");
}

function eraserBuseo(formName, code, name) {
	document.frm.buseo_code.value = "";
	document.frm.buseo_name.value = "";
}

/**
 * ÀÌ·Â
 */
 function showHistory(petition_id, answer_id) {
	var w = 600;
	var h = 400;
	var t = parseInt((screen.height - h) / 2.5, 10);
	var l = parseInt((screen.width - w) / 2, 10);
	var url = "/vocsmrt/common/history.jsp?petition_id=" + petition_id + "&answer_id=" + answer_id;
	window.open(url, "HISTORY", "width=" + w + ",height=" + h + ",top=" + t + ",left=" + l + ",resizable=false,scrollbars=no,status=yes");
}

/**
 * ÇùÁ¶ºÎ¼­´äº¯
 */
 function showMinorAnswer(petition_id) {
	var w = 600;
	var h = 400;
	var t = parseInt((screen.height - h) / 2.5, 10);
	var l = parseInt((screen.width - w) / 2, 10);
	var url = "/vocsmrt/common/minoranswer.jsp?petition_id=" + petition_id;
	window.open(url, "MINORANSWER", "width=" + w + ",height=" + h + ",top=" + t + ",left=" + l + ",resizable=false,scrollbars=no,status=yes");
}


/**
 * °í°´Á¤º¸
 */
 function showCitizen(citizen_id) {
	var w = 600;
	var h = 600;
	var t = parseInt((screen.height - h) / 2.5, 10);
	var l = parseInt((screen.width - w) / 2, 10);
	var url = "/vocsmrt/common/citizen.jsp?citizen=" + citizen_id;
	window.open(url, "CITIZEN", "width=" + w + ",height=" + h + ",top=" + t + ",left=" + l + ",resizable=false,scrollbars=no,status=yes");
}

/**
 * ºÎ¼­Á¤º¸
 */
 function showBuseopop(buseo_code) {
	var w = 600;
	var h = 400;
	var t = parseInt((screen.height - h) / 2.5, 10);
	var l = parseInt((screen.width - w) / 2, 10);
	var url = "/vocsmrt/common/buseopop.jsp?buseo_code=" + buseo_code;
	window.open(url, "buseopop", "width=" + w + ",height=" + h + ",top=" + t + ",left=" + l + ",resizable=false,scrollbars=no,status=yes");
}

/**
 * ºÐ¾ß °Ë»ö
 */
 function divisionSearch(formName, id, name, sort) {
	var w = 350;
	var h = 370;
	var t = parseInt((screen.height - h) / 2.5, 10);
	var l = parseInt((screen.width - w) / 2, 10);
	var url = "/vocsmrt/common/division.jsp?formName=" + formName + "&id=" + id + "&name=" + name +"&sort="+sort;
	window.open(url, "divisionsearch", "width=" + w + ",height=" + h + ",top=" + t + ",left=" + l + ",resizable=false,scrollbars=no,status=yes");
}

function eraserDivision(formName, code, name) {
	if (eval("document." + formName + "") != null)	{
		eval("document." + formName + "." + code).value = "";
		eval("document." + formName + "." + name).value = "";
	} else {
		if (eval("document.search") != null)	{
			eval("document.search" + "." + code).value = "";
			eval("document.search" + "." + name).value = "";
		}
	}
}

/**
 * ¿ª¼±ÅÃ
 */
 function stationSearch(formName, id, name) {
	var w = 350;
	var h = 580;
	var t = parseInt((screen.height - h) / 2.5, 10);
	var l = parseInt((screen.width - w) / 2, 10);
	var url = "/vocsmrt/common/station.jsp?formName=" + formName + "&id=" + id + "&name=" + name;
	window.open(url, "divisionsearch", "width=" + w + ",height=" + h + ",top=" + t + ",left=" + l + ",resizable=false,scrollbars=no,status=yes");
}

/**
 * sms Á÷¿ø°Ë»ö
 */
 function empSearch(formName, no, name, buseo, buseo2) {
	var w = 300;
	var h = 370;
	var t = parseInt((screen.height - h) / 2.5, 10);
	var l = parseInt((screen.width - w) / 2, 10);
	var url = "/vocsmrt/common/employee.jsp?formName=" + formName + "&no=" + no + "&name=" + name + "&buseo=" + buseo + "&buseo2=" + buseo2;
	window.open(url, "employee", "width=" + w + ",height=" + h + ",top=" + t + ",left=" + l + ",resizable=false,scrollbars=no,status=yes");
}

/**
 * sms Á÷¿ø°Ë»ö
 */
 function empSearch(formName, no, name, buseo) {
	var w = 300;
	var h = 370;
	var t = parseInt((screen.height - h) / 2.5, 10);
	var l = parseInt((screen.width - w) / 2, 10);
	var url = "/vocsmrt/common/employee.jsp?formName=" + formName + "&no=" + no + "&name=" + name + "&buseo=" + buseo;
	window.open(url, "employee", "width=" + w + ",height=" + h + ",top=" + t + ",left=" + l + ",resizable=false,scrollbars=no,status=yes");
}

//======================================================================================
// DESCRIPTION	:	½Ç¸íÀÎÁõ
// Parameter	:	obj : Form
// Return Value	:	none
//======================================================================================

function openCBAWindow(obj){
    window.open('', 'CBAwindow', 'width=410, height=450, resizable=false, scrollbars=no, status=yes, titlebar=no, toolbar=no, left=300, top=200' );
//    obj.action = 'http://name.siren24.com/cba/jsp/cba_j10.jsp'; // SCI ½Äº° °ËÁõ URL
//alert("");
	obj.action = 'https://name.siren24.com/vname/jsp/vname_j10.jsp';

//	obj.action = '/vocsmrt/common/realname.jsp'; // SCI ½Äº° °ËÁõ URL
    obj.method = 'post';
    obj.target = 'CBAwindow';
    obj.submit();
    obj.action = '';
}
//======================================================================================
// DESCRIPTION	:	Editor Load
// Parameter	:
// Return Value	:
//======================================================================================
function Editor() {
	document.write("<OBJECT id='NungcoolControl'  name='NDE' align='center'\n");
	document.write("	  classid='clsid:A50E964D-F290-4EAD-9BD7-EBAE95D38E91'\n");
	document.write("	  codeBase='http://f3800.karico.co.kr:8060/dtms/framework/nungcool/NungcoolWEC3.cab#version=3,1,0,41'\n");
	document.write("	  height='100%'\n");
	document.write("	  width='100%'>\n");
	document.write("  <PARAM Name='MaxAttachedSize' Value='1024'/>\n");
	document.write("  <PARAM NAME='UseDiv' value='true'>\n");
	document.write("  <PARAM NAME='DefaultFontSize' value='2'>\n");
	document.write("  <PARAM Name='DefaultFont' value='µ¸¿ò'>\n");
	document.write("  <PARAM Name='MainMenu' value='false'>\n");
	document.write("  <PARAM Name='isMIMETextPart' value='true'>\n");
	document.write("  <PARAM Name='IsDnHostImage' value='true'>\n");
	document.write("  <PARAM name='isFileNameMultiLine' value='false'>\n");
	document.write("  <PARAM name='IsIgnoreSpecialTag' value='true'>\n");
	document.write("  <param name='FileAttachPanel' value='false'/>\n");
	document.write("</OBJECT>\n");
}
//======================================================================================
// DESCRIPTION	:	ÀÌ¸ÞÀÏ ±ÔÄ¢°Ë»ç
// Parameter	:	email
// Return Value	:
//======================================================================================
function validateEmail(obj) {
	var email = obj.value;
	var exclude = /[^@\-\.\w]|^[_@\.\-]|[\._\-]{2}|[@\.]{2}|(@)[^@]*\1/;
	var check	=/@[\w\-]+\./;
	var checkend=/\.[a-zA-Z]{2,3}$/;
	if(((email.search(exclude) != -1)||(email.search(check)) == -1)||(email.search(checkend) == -1)) {
		alert("¸ÞÀÏÁÖ¼Ò°¡ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.");
		obj.value = "";
		obj.focus();
		return false;
	}
}

// email Check
function emailCheck (emailStr) {
	// Email check
	var emailPat=/^(.+)@(.+)$/;
	var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]";
	var validChars="\[^\\s" + specialChars + "\]";
	var firstChars=validChars;
	var quotedUser="(\"[^\"]*\")";
	var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;
	var atom="(" + firstChars + validChars + "*" + ")";
	var word="(" + atom + "|" + quotedUser + ")";
	var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
	var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");

	var matchArray=emailStr.match(emailPat);
	if (matchArray==null) {
		alert("E-mail À» Á¤È®ÇÏ°Ô ÀÔ·ÂÇÏ¼¼¿ä.");
		return false;
	}
	var user=matchArray[1];
	var domain=matchArray[2];

	if (user.match(userPat)==null) {
		alert("E-mail À» Á¤È®ÇÏ°Ô ÀÔ·ÂÇÏ¼¼¿ä.");
	    return false;
	}

	var IPArray=domain.match(ipDomainPat);
	if (IPArray!=null) {
		for (var i=1;i<=4;i++) {
	    	if (IPArray[i]>255) {
	        	alert("E-mail µµ¸ÞÀÎÀ» Á¤È®È÷ ÀÔ·ÂÇÏ¼¼¿ä.");
				return false;
			}
	    }
	    return true;
	}

	var domainArray=domain.match(domainPat);

	if (domainArray==null) {
		alert("E-mail À» Á¤È®È÷ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
	    return false;
	}
	var atomPat=new RegExp(atom,"g");
	var domArr=domain.match(atomPat);
	var len=domArr.length;

	if (domArr[domArr.length-1].length<2 ||
	     domArr[domArr.length-1].length>3) {
	    	alert("E-mail À» Á¤È®È÷ ÀÔ·ÂÇØÁÖ¼¼¿ä.");
	     	return false;
	}

	if (domArr[domArr.length-1].length==2 && len<3) {
	     var errStr="This address ends in two characters, which is a country";
	    	errStr+=" code.  Country codes must be preceded by ";
	     	errStr+="a hostname and category (like com, co, pub, pu, etc.)";

	    	alert(errStr);
	     	return false;
	}

	if (domArr[domArr.length-1].length==3 && len<2) {
	     var errStr="E-mailÀ» Á¤È®È÷ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.";
	    	alert(errStr);
	     	return false;
	}
	return true;
}

function openMemberSearchWindow(formname, id, kr_nm)
{
	Url = "/ekr/common/membersearch.do?formname=" + formname + "&id=" + id + "&kr_nm=" + kr_nm;
	var w = 477;
	var h = 400;
	var t = parseInt((screen.height - h) / 2.5, 10);
	window.open(Url,"MemberSearch","toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no,width=" + w + ",height=" + h + ",top=" + t);
}
function openDirectorSearchWindow(ord, mode)
{
	Url = "/ekr/common/directorsearch.do?ord=" + ord + "&mode=" + mode;
	var w = 477;
	var h = 400;
	var t = parseInt((screen.height - h) / 2.5, 10);
	window.open(Url,"DirectorSearch","toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no,width=" + w + ",height=" + h + ",top=" + t);
}
function openDirectorSearchWindow2(ord, mode, old_mbr_id)
{
	Url = "/ekr/common/directorsearch.do?ord=" + ord + "&mode=" + mode +"&old_mbr_id=" + old_mbr_id;
	var w = 477;
	var h = 400;
	var t = parseInt((screen.height - h) / 2.5, 10);
	window.open(Url,"DirectorSearch","toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no,width=" + w + ",height=" + h + ",top=" + t);
}

//======================================================================================
// DESCRIPTION	:	Á÷¿øÀÎÁõ
//======================================================================================
function openRealMemberWindow(f) {
    var w = 500;
	var h = 423;
	var l = parseInt((screen.width - w) / 2, 10);
	var t = parseInt((screen.height - h) / 2.5, 10);
	window.open("", "RealMember", "width="+w+", left="+l+", top="+t+", height="+h+", resizable=false, scrollbars=no, status=yes, titlebar=no, toolbar=no");
    f.action = "/ekr/common/realmember.do";
    f.method = "post";
    f.target = "RealMember";
    f.submit();
    f.action = '';
}
function img_onload(obj, maxWidth) {
	var newX, newY;
	var newHeight, newWidth;
	var newImg;
	newImg = new Image();
	newImg.src = obj.src;
	imgw = newImg.width;
	imgh = newImg.height;
	if( imgw > maxWidth ){
		var wResizeRate = (maxWidth/imgw)*100;
		var ResizeRate = wResizeRate;
		obj.onload = null;
		obj.src = newImg.src;
		obj.width = (imgw/100) * ResizeRate;
	}
}
//======================================================================================
// DESCRIPTION	:	ºñ¹Ð¹øÈ£ È®ÀÎ
//======================================================================================
function doConfirm(form, href, type) {
    form.method = "get";
    form.type.value = type;
    form.action = href;
    form.submit();
    form.action = '';
}


//==========================================================
// »õÃ¢¿­±â
//=
function phone() {
	window.open('/ekr/files/roll/phone.htm','','width=518,height=458,left=200,top=100,scrollbars=yes,resizable=no');
}

//==========================================================
// ÇÁ¸°ÅÍ
//==========================================================

function printOk(kwrd, css, id, executetype){
	var printwin;
	printwin = window.open("/pages/print.jsp?kwrd=" + kwrd + "&css=" + css + "&id=" + id + "&executetype=" + executetype,"print","left=10px,top=10px,height=500,width=690,scrollbars=yes,toolbar=yes,menubar=yes,status=yes,resizable=yes");
	printwin.focus();
}

function img_onload(obj, maxWidth, maxHeight) {
	var newX, newY;
	var newHeight, newWidth;
	var newImg;
	newImg = new Image();
	newImg.src = obj.src;
	imgw = newImg.width;
	imgh = newImg.height;
	var maxrate = maxWidth / maxHeight;
	var imgrate = imgw / imgh;

	if (maxrate < imgrate) {
//		alert('a' + maxrate + "vs" + imgrate);
		if( imgw > maxWidth){
			var wResizeRate = (maxWidth/imgw)*100;
			var ResizeRate = wResizeRate;
			obj.onload = null;
			obj.src = newImg.src;
			obj.width = (imgw/100) * ResizeRate;
		}
	} else {
//		alert('b' + maxrate + "vs" + imgrate);
		if (imgh > maxHeight) {
			var hResizeRate = (maxHeight/imgh)*100;
			var ResizeRate = hResizeRate;
			obj.onload = null;
			obj.src = newImg.src;
			obj.height = (imgh/100) * ResizeRate;
		}
	}
}

//ÀÔ·ÂµÈ °ªÀÌ ÇÑ±ÛÀÎÁö È®ÀÎÇÏ´Â ·çÆ¾
function korean_check(str){
        var i;
        var ch;
        var len;

        len = str.length;
        for (i=0;i<len;i++){
                ch = escape(str.charAt(i)); //ISO-Latin-1 ¹®ÀÚ¼ÂÀ¸·Î º¯°æ
                if (strCharByte(ch) != 1){
                                        return false;
                }
        }
                return true;
}

function strCharByte(chStr){
        if (chStr.substring(0, 2) == '%u'){
                if (chStr.substring(2,4) == '00') return 1;
                else return 2; //ÇÑ±Û
        }else if (chStr.substring(0,1) == '%'){
                //alert (parseInt(chStr.substring(1,3), 16));
                if (parseInt(chStr.substring(1,3), 16) > 127) return 2; //ÇÑ±Û
                else return 1;
        }else{
                return 1;
        }
}


/**
 * »çÁø »õÃ¢
 */
function showPicture(src) {
	var imgObj = new Image();
	var imgWidth,imgHeight;

	imgObj.src = src;
	imgWidth=imgObj.width;
	imgHeight=imgObj.height;
	if(imgWidth>950)imgWidth=950;
	if(imgHeight>700)imgHeight=700;
	if(!korean_check(src)){
		//alert('ÇÑ±Û');
		status = "width="+imgWidth+",height="+imgHeight+",scrollbars=yes";
		window.open(src,'img',status);
	}else{
		//alert('¿µ¾î');
		var wopt = "scrollbars=yes,status=no,resizable=no";
		wopt += ",width=" + imgWidth;
		wopt += ",height=" + imgHeight;
		var wbody = "<head><title>»çÁø º¸±â</title>\n";
		wbody += "<script language='javascript'>\n";
		wbody += "function finalResize(){\n";
		wbody += "  var oBody=document.body;\n";
		wbody += "  var oImg=document.images[0];\n";
		wbody += "  oWidth=oImg.width;\n";
		wbody += "  oHeight=oImg.height;\n";
		wbody += "  if(oWidth>950)oWidth=950;\n";
		wbody += "  if(oHeight>700)oHeight=700;\n";
		wbody += "  var xdiff=oWidth-oBody.clientWidth;\n";
		wbody += "  var ydiff=oHeight-oBody.clientHeight;\n";
		wbody += "  window.resizeBy(xdiff + 20,ydiff);\n";
		wbody += "}\n";
		wbody += "</"+"script>\n";
		wbody += "</head>\n";
		wbody += "<META http-equiv=\"imagetoolbar\" content=\"no\"> \n";
		wbody += "<meta http-equiv='content-type;' content='text/html;charset=euc-kr'>\n";
		wbody += "<body onLoad='finalResize()' style='margin:0;'>\n";
		wbody += "<table width='100%' height='100%' cellspacing='0' cellpadding='0' border='0'>\n";
		wbody += "<tr>\n";
		wbody += "<td align='center' valign='middle'>";
		wbody += "<a href='javascript:window.close()'><img src='" + src + "' border=0 alt='ÀÌ¹ÌÁö¸¦ Å¬¸¯ÇÏ½Ã¸é Ã¢ÀÌ ´ÝÈü´Ï´Ù.'></a>";
		wbody += "</td>\n</tr>\n</table>\n";
		wbody += "</body>\n";
		winResult = window.open("about:blank","",wopt);
		winResult.document.open("text/html", "replace");
		winResult.document.write(wbody);
		winResult.document.close();
		return;
	}
}

function fileBlurEvent(obj, objtext) {
	var filename = new String(obj.value);
	if (objtext.value == "") {
		if (obj.value != "") {
			obj.outerHTML = obj.outerHTML;
		}
	} else {
		filename = filename.substring(filename.lastIndexOf('\\') + 1, filename.length);
		if (objtext.value != filename) {
			alert("\nÆÄÀÏ¼±ÅÃÀº Ã£¾Æº¸±â ¹öÆ°À» ÀÌ¿ëÇÏ¼¼¿ä.     \n\nÂü°í) ÆÄÀÏ Ãë¼Ò´Â ÆÄÀÏ¸íÀ» ºñ¿ì¼¼¿ä.     \n");
			objtext.value = filename;
		}
	}
}




/** ¸ÞÀÎ µ¿¿µ»ó **/

function openWin(theURL) {

  var para = 'left=0,top=0,toolbar=no,location=no,status=no,directories=no,menubar=no,resizable=no,scrollbars=no,width=430,height=465';
  newwins = window.open(theURL,'winVod',para);
  newwins.focus();
}


function doPopShow(type, cntns, bgurl, left, top) {
	var wopt = "scrollbars=yes,status=no,resizable=no,left=" + left + ",top="+ top;
	var color;
	if(type == '1') {
		wopt += ",width=" + 365;
		wopt += ",height=" + 450;
		color = "#4B88C6";
	} else if(type == '2'){
		wopt += ",width=" + 555;
		wopt += ",height=" + 347;
		color = "#F2F2F2";
	} else if(type == '3') {
		var imgObj = new Image();
		var imgWidth,imgHeight;
		imgObj.src = bgurl;
		wopt += ",width=" + (Number(imgObj.width) + 15);
		wopt += ",height=" + (Number(imgObj.height) + 30);
		color = "#4B88C6";
	}
	var wbody = "<head><title>ÆË¾÷¹Ì¸®º¸±â</title>\n";
	wbody += "</head>\n";
	wbody += "<META http-equiv=\"imagetoolbar\" content=\"no\"> \n";
	wbody += "<meta http-equiv='content-type;' content='text/html;charset=euc-kr'>\n";
	wbody += "<body style='margin:0;'>\n";
	wbody += "<table width='100%' height='100%' cellspacing='0' cellpadding='0' border='0' background='" + bgurl + "' style='background-repeat:no-repeat;'>\n";
	wbody += "<tr>\n";
	wbody += "<td align='center' valign='top' style='padding-top:50px;'>";
	wbody += cntns;
	wbody += "</td>\n";
	wbody += "</tr>\n";
	wbody += "<tr>\n";
	wbody += "<td style='width:100%;height:5px;background-color:" + color + ";'>\n";
	wbody += "</td>\n";
	wbody += "</tr>\n";
	wbody += "<tr>\n";
	wbody += "<td style='width:100%;height:27px;background-color:" + color + ";'>\n";
	if(type == '1') {
		wbody += "<div style='padding-left:10px;height:27px;font-size:12px;color:#FFFFFF'>";
		wbody += "<input type='checkbox' name='' value=''> ¿À´Ã ÇÏ·ç ÀÌÃ¢À» ¿­Áö¾ÊÀ½ <span style='padding-left:100px'><img src='/images/button/popclose.gif'></span></div>";
	} else if(type == '2') {
		wbody += "<div style='width:100%;text-align:right;padding-right:10px;height:27px;font-size:12px;color:#6F6F6F'>";
		wbody += "<input type='checkbox' name='' value=''> ¿À´Ã ÇÏ·ç ÀÌÃ¢À» ¿­Áö¾ÊÀ½ <span style='padding-left:10px'><img src='/images/button/popclose2.gif' align='absmiddle'></span></div>";
	} else if(type == '3') {
		wbody += "<span style='width:100%;text-align:right;padding-right:20px;height:27px;font-size:11px;color:#FFFFFF'><input type='checkbox' name='' value=''> ¿À´Ã ÇÏ·ç ÀÌÃ¢À» ¿­Áö¾ÊÀ½ &nbsp;&nbsp;<img src='/images/button/popclose.gif'></span>";
	}
	wbody += "</td>\n";
	wbody += "</tr>\n";
	wbody += "</table>\n";
	wbody += "</body>\n";
	winResult = window.open("about:blank","",wopt);
	winResult.document.open("text/html", "replace");
	winResult.document.write(wbody);
	winResult.document.close();
}
function doPopup(url, left, top) {
	var style = "scrollbars=yes,status=no,resizable=no,left=" + left + ",top=" + top + ",width=" + 100 + ",height=" + 100;
	window.open(url, '', style);
}

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 DecodeBase64(OriginalStr)
{
	var TrnStr = "";
	var len = OriginalStr.length;

	var i=0;

	while(i < len)
	{
		if (OriginalStr.charAt[i+2] == '=') {
			b64_1 = TransB64ToNo(OriginalStr.charAt(i));
			b64_2 = TransB64ToNo(OriginalStr.charAt(i+1));
			b64_3 = TransB64ToNo(OriginalStr.charAt(i+2));
			b64_4 = TransB64ToNo(OriginalStr.charAt(i+3));

			asc_1 = b64_1*4 + Math.floor(b64_2/16);

			TrnStr = TrnStr + FindAscChar(asc_1);
		} else if (OriginalStr.charAt[i+3] == '=') {
			b64_1 = TransB64ToNo(OriginalStr.charAt(i));
			b64_2 = TransB64ToNo(OriginalStr.charAt(i+1));
			b64_3 = TransB64ToNo(OriginalStr.charAt(i+2));
			b64_4 = TransB64ToNo(OriginalStr.charAt(i+3));

			asc_1 = b64_1*4 + Math.floor(b64_2/16);
			asc_2 = (b64_2 - Math.floor(b64_2/16)*16)*16 + Math.floor(b64_3/4);

			TrnStr = TrnStr + FindAscChar(asc_1) + FindAscChar(asc_2);

		} else {
			b64_1 = TransB64ToNo(OriginalStr.charAt(i));
			b64_2 = TransB64ToNo(OriginalStr.charAt(i+1));
			b64_3 = TransB64ToNo(OriginalStr.charAt(i+2));
			b64_4 = TransB64ToNo(OriginalStr.charAt(i+3));

			asc_1 = b64_1*4 + Math.floor(b64_2/16);
			asc_2 = (b64_2 - Math.floor(b64_2/16)*16)*16 + Math.floor(b64_3/4);
			asc_3 = (b64_3 - Math.floor(b64_3/4)*4)*64 + b64_4;

			TrnStr = TrnStr + FindAscChar(asc_1) + FindAscChar(asc_2) + FindAscChar(asc_3);
		}
		i += 4;
	}
	return TrnStr;
}
function calculateBytes(value) {
  var tcount = 0;

  var tmpStr = new String(value);
  var temp = tmpStr.length;

  var onechar;
  for( k=0; k<temp; k++ ) {
    onechar = tmpStr.charAt(k);
    if(escape(onechar).length > 4) {
      tcount += 2;
    } else {
      tcount += 1;
    }
  }
  return tcount;
}


// 2008-01-17 [JangKyoungSeok]
// Zoom in , Zoom out  function ----------------------   Start  -------------------------------------------- //

document.onkeypress = getKey;

initZoomDisplay() ;

function getKey(keyStroke) {
	isNetscape=(document.layers);
	eventChooser = (isNetscape) ? keyStroke.which : event.keyCode;
	which = String.fromCharCode(eventChooser).toLowerCase();
	which2 = eventChooser;

	var el=event.srcElement;

	if ((el.tagName != "INPUT") && (el.tagName != "TEXTAREA"))		//input,textarea ¾È¿¡¼­ÀÇ +.-°ªÀº ½ÇÇà¾ÈµÇµµ·Ï
	{
		if(which == "+" || which == "=")
			zoomInOut('zoom', 'in');
		else if(which == "-" || which == "_")
			zoomInOut('zoom', 'out');
	}
}

var zoomRate = 10;			//È®´ë/Ãà¼Ò½Ã Áõ°¨·ü
//var maxRate = 300;			//ÃÖ´ëÈ®´ë·ü
var maxRate = 160;			//ÃÖ´ëÈ®´ë·ü
var minRate = 100;			//ÃÖ¼ÒÃà¼Ò·ü

function zoomInOut(contentid, how) {

	if(GetCookie("zoomVal") != null && GetCookie("zoomVal") != ""){
		//document.all[contentid].style.zoom = GetCookie("zoomVal");
		document.body.style.zoom = GetCookie("zoomVal");
		currZoom=GetCookie("zoomVal");
	}
	else{
		//document.all[contentid].style.zoom = '100%';
		document.body.style.zoom = '100%';
		currZoom = '100%';
	}

	if (((how == "in") && (parseInt(currZoom) >= maxRate)) || ((how == "out") && (parseInt(currZoom) <= minRate)) ) {
		return;
	}
	if (how == "in") {
		//document.all[contentid].style.zoom = parseInt(document.all[contentid].style.zoom)+zoomRate+'%'
		document.body.style.zoom = parseInt(document.body.style.zoom)+zoomRate+'%';
	}
	else {
		//document.all[contentid].style.zoom = parseInt(document.all[contentid].style.zoom)-zoomRate+'%'
		document.body.style.zoom = parseInt(document.body.style.zoom)-zoomRate+'%';
	}
	SetCookie("zoomVal",document.body.style.zoom, 1);
}



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 GoZoom(contentid){
	if(GetCookie("zoomVal") != null && GetCookie("zoomVal") != ""){
		//document.all[contentid].style.zoom = GetCookie("zoomVal");
		document.body.style.zoom = GetCookie("zoomVal");
		currZoom=GetCookie("zoomVal");
	}
	else{
		//document.all[contentid].style.zoom = '100%';
		document.body.style.zoom = '100%';
		currZoom = '100%';
	}
}

function initZoomDisplay(){
	var currZoom = "100%" ;
	if(GetCookie("zoomVal") != null && GetCookie("zoomVal") != ""){
		currZoom=GetCookie("zoomVal");
	}
	//document.body.style.zoom = currZoom ;
}

function basicZoom(){
	var currZoom = "100%" ;
	document.body.style.zoom = currZoom ;
	SetCookie("zoomVal",document.body.style.zoom, 1);
}

// Zoom in , Zoom out  function ----------------------------   End  -------------------------------------------- //

//------------------------------------ ÀÓ½Ã ÁÜ

var maxZoom = 400;
var minZoom = 40;
var ZoomInterval = 20;
var ratio;

var lineRatio = 100;
var maxLine = 300;
var minLine = 100;
var LineUnit = 50;


function zoomInFont()
{
ratio = parseInt(document.getElementById("docBody").style.zoom);
if ( isNaN(ratio)) ratio=100;
if (ratio < maxZoom)
{
ratio = ratio + ZoomInterval;
document.getElementById("docBody").style.zoom = ratio+'%';
}
}

function zoomOutFont()
{
ratio = parseInt(document.getElementById("docBody").style.zoom);
if ( isNaN(ratio)) ratio=100;
if (ratio >minZoom)
{
ratio = ratio-ZoomInterval;
document.getElementById("docBody").style.zoom = ratio+'%';
}
}



function increaseLineHeight()
{
if (lineRatio < maxLine)
{
lineRatio = lineRatio + LineUnit;
setLineHeight();
}
}

function decreaseLineHeight()
{
if (lineRatio >minLine)
{
lineRatio = lineRatio-LineUnit;
setLineHeight();
}
}

function setLineHeight()
{
obj = document.getElementById("docBody");
obj.style.lineHeight = lineRatio+"%";
}

//------------------------------------