function openNewWindow(window) { // ÇØ»óµµ¿¡ ¸Â°Ô »õÃ¢
	open (window,"NewWindow","left=0, top=0, toolbar=yes, location=yes, directories=yes, status=yes, fullscreen=no, menubar=no, scrollbars=yes, resizable=yes, width="+eval(screen.availWidth)+", height="+eval(screen.availHeight-38)+"");
}

function sessionExtend() {
	hiddenFrame.location.href = "/dazzle/board/BoardWriteSessionExtend.asp" ;
	setTimeout(sessionExtend, 5 * 60 * 1000) ;
}

function printObj(str)
{
	document.write(str);
}
// °ñÇÁ¸Þ´º ÀÌ¹ÌÁö ½º¿Ò swapImg(¹øÈ£, ÀÌ¹ÌÁöÀÌ¸§)
function swapImg(num, img_name){
	for(i=1;i<10;i++){
		document.getElementById("button"+i).src = "/images/golf/" + "gnum_" + i + ".gif";
		document.getElementById("button"+num).src = "/images/golf/" + "gnum_" + num + "v.gif";
	}
	document.getElementById("img1").src = "/images/golf/" + img_name + "_01.gif";
	document.getElementById("img2").src = "/images/golf/" + img_name + "_02.gif";
}

function doCheckRadio(form_name, elements_name, msg){
	var f = document.forms[form_name];
	var i = 0;
	var j = 0;
	
	for(i=0;i<f.elements[elements_name].length;i++){
		if(!f.elements[elements_name][i].checked){
			j++;
		}
	}

	if(j==f.elements[elements_name].length){
		alert(msg);
		return true;
	}
}

/*
function doCheckByte(form_name, elements_name, num, msg){ //¹®ÀÚ±æÀÌ Ã¼Å© °øÅëÇÔ¼ö / doCheckByte(ÆûÀÌ¸§, ¿ä¼ÒÀÌ¸§, ÀÚ¸¦¹®ÀÚ±æÀÌ, °æ°í¹®±¸)
	var f = document.forms[form_name];
	var en = elements_name;
	
	if(calculateBytes(f.elements[en].value) > num){
		alert(msg+"Àº ÇÑ±Û "+num/2+"ÀÚ ¿µ¹® "+num+"ÀÚ ÀÌ»ó ÀÔ·ÂÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
		f.elements[en].value = cutStringByByte(f.elements[en].value, num);
		f.elements[en].select();
		f.elements[en].focus();
		return true;
	}
}*/

function doCheckByte(form_name, elements_name, num, msg){ //¹®ÀÚ±æÀÌ Ã¼Å© °øÅëÇÔ¼ö / doCheckByte(ÆûÀÌ¸§, ¿ä¼ÒÀÌ¸§, ÀÚ¸¦¹®ÀÚ±æÀÌ, °æ°í¹®±¸)
	var f = document.forms[form_name];
	var en = elements_name;
	
	if(calculateBytes(f.elements[en].value) > num){
		alert(msg+" "+num+"ÀÚ ÀÌ»ó ÀÔ·ÂÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
		f.elements[en].value = cutStringByByte(f.elements[en].value, num);
		f.elements[en].select();
		f.elements[en].focus();
		return true;
	}
}

function doCheckBlank(form_name, elements_name, msg){ //°ø¹é Æû Ã¼Å© °øÅëÇÔ¼ö / doCheckBlank(ÆûÀÌ¸§, ¿ä¼ÒÀÌ¸§, °æ°í¹®Àå)
	var f = document.forms[form_name];
	var en = elements_name;
	
	if(f.elements[en].value == ""){
		alert(msg);
        try {
            f.elements[en].focus();    
        } catch (e) {            
        }
		
		return true;
	}
}

function OnlyNumber() {
	if((event.keyCode<48)||(event.keyCode>57)) {
		event.returnValue=false;
	}
}

/******************************************************
+ ÆË¾÷Ã¢ ¶ç¿ì±â
+ ÆÄ¶ó¹ÌÅÍ ¼³¸í
		url : ¶ç¿ï Ã¢ ÁÖ¼Ò
		width : Ã¢ °¡·Îsize
		height : Ã¢ ¼¼·Îsize
		scroll : ½ºÅ©·Ñ¹Ù ¿©ºÎ
******************************************************/
function popupWindow(url,width,height,scroll)
{
	var wd	= width;
	var he	= height;
	var sc	= scroll;
	var openWin;
	
	openWin	= window.open(url,"","toolbar=0,menubar=0,status=0,scrollbars="+sc+",resizable=no,width=" + wd +",height=" + he + ";")
	
	if(openWin && !openWin.closed)
	{
		openWin.focus();
	}
}

function popupWindow(url, name, width, height, left, top, scroll) {
	if(scroll == "" || scroll == null){
		scroll = "no";
	} else{
		scroll = scroll;
	}

	if(top == "" || top == null){
		top = 0;
	}

	if(left == "" || left == null){
		left = 0;
	}
	
	openWin	= window.open(url,name,"toolbar=0,menubar=0,status=0,scrollbars="+scroll+",width=" + width +",height=" + height + ",top=" + top + ",left=" + left + ";") ;
	
	if(openWin && !openWin.closed)
	{
		openWin.focus();
	}
}

/******************************************************
+ ÇÏ³ªÀÇ ÆË¾÷Ã¢ ¶ç¿ì±â(ÆË¾÷Ã¢ÀÌ¸§ ¼³Á¤)
+ ÆÄ¶ó¹ÌÅÍ ¼³¸í
		url : ¶ç¿ï Ã¢ ÁÖ¼Ò
		width : Ã¢ °¡·Îsize
		height : Ã¢ ¼¼·Îsize
		scroll : ½ºÅ©·Ñ¹Ù ¿©ºÎ
******************************************************/
function popupSingleWindow(url,name,width,height,scroll)
{
	var wd = width;
	var he = height;
	var openWin;
	
	if (scroll == "" || scroll == null) {
		scroll = "no";
	} else{
		scroll = scroll;
	}
	
	openWin	= window.open(url,name,"toolbar=0,menubar=0,status=0,scrollbars="+scroll+",width=" + wd +",height=" + he + ";")
	
	if(openWin && !openWin.closed)
	{
		openWin.focus();
	}
}

function popupDaeji(url, name, width, height, left, top, scroll) {
	var wd = width;
	var he = height;
	var openWin;
	
	if (scroll == "" || scroll == null) {
		scroll = "no";
	} else{
		scroll = scroll;
	}
	
	openWin	= window.open(url,name,"toolbar=0,menubar=0,status=0,scrollbars="+scroll+",width=" + wd +",height=" + he + ",top=" + top + ",left=" + left + ";") ;
	
	if(openWin && !openWin.closed)
	{
		openWin.focus();
	}
}

function popupImageViewer(str) {
	openWin	= window.open('/common/ImageViewer.asp?src=' + str,'ImageViewer',"toolbar=0,menubar=0,status=0,resizable=yes,scrollbars=yes,width=300,height=200;")
	
	if(openWin && !openWin.closed)
	{
		openWin.focus();
	}
}

function resizeImgSub(img, w) {
//	alert(w) ;
	//alert(img.width) ;
	if (img.width > w) {
		img.visibleImgObj.height = Math.round(img.height * (w / img.width));
		img.visibleImgObj.width = Math.round(img.width * (w / img.width));
	}
}

function resizeImg(imgObj, w) {
	var imgOriginal = new Image();
	imgOriginal.visibleImgObj = imgObj;
	imgOriginal.onload = function() { resizeImgSub(this, w); }  
	imgOriginal.src = imgObj.src;
}

function calculateBytes( szValue)
{
  var tcount = 0;

  var tmpStr = new String(szValue);
  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;
}

function cutStringByByte(str2, size) {
	do {
		str2 = str2.substring(0, str2.length - 1) ;
	} while (calculateBytes(str2) > size) ;
	
	return str2 ;
}

function insertFlash(swf, width, height, bgcolor, id, flashvars)
{
	var strFlashTag = new String();

	if (navigator.appName.indexOf("Microsoft") != -1)
	{
		strFlashTag += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
		strFlashTag += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=version=8,0,0,0" ';
		strFlashTag += 'id="' + id + '" width="' + width + '" height="' + height + '">';
		strFlashTag += '<param name="movie" value="' + swf + '"/>';

		if(flashvars != null) {strFlashTag += '<param name="flashvars" value="' + flashvars + '"/>'};
		strFlashTag += '<param name="quality" value="best"/>';
		strFlashTag += '<param name="bgcolor" value="' + bgcolor + '"/>';
		strFlashTag += '<param name="base" value=".">';
		strFlashTag += '<param name="menu" value="false"/>';
		strFlashTag += '<param name="salign" value="LT"/>';
		strFlashTag += '<param name="scale" value="noscale"/>';
		strFlashTag += '<param name="wmode" value="transparent"/>';
		strFlashTag += '<param name="allowScriptAccess" value="sameDomain"/>';
		strFlashTag += '</object>';
	}
	else
	{
		strFlashTag += '<embed base="." ';
		strFlashTag += 'src="' + swf + '" ';
		strFlashTag += 'quality="best" ';
		strFlashTag += 'bgcolor="' + bgcolor + '" ';
		strFlashTag += 'width="' + width + '" ';
		strFlashTag += 'height="' + height + '" ';
		strFlashTag += 'menu="false" ';
		strFlashTag += 'scale="noscale" ';
		strFlashTag += 'id="' + id + '" ';
		strFlashTag += 'salign="LT" ';
		//strFlashTag += 'wmode="transparent" ';
		strFlashTag += 'allowScriptAccess="sameDomain" ';
		if(flashvars != null) {strFlashTag += 'flashvars="' + flashvars + '" '};
		strFlashTag += 'type="application/x-shockwave-flash" ';
		strFlashTag += 'pluginspage="http://www.macromedia.com/go/getflashplayer">';
		strFlashTag += '</embed>';
	}

	document.write(strFlashTag);
}

function insertFlash2(swf, width, height, bgcolor, id, flashvars)
{
	var strFlashTag = new String();

	if (navigator.appName.indexOf("Microsoft") != -1)
	{
		strFlashTag += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
		strFlashTag += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=version=8,0,0,0" ';
		strFlashTag += 'id="' + id + '" width="' + width + '" height="' + height + '">';
		strFlashTag += '<param name="movie" value="' + swf + '"/>';

		if(flashvars != null) {strFlashTag += '<param name="flashvars" value="' + flashvars + '"/>'};
		strFlashTag += '<param name="quality" value="best"/>';
		strFlashTag += '<param name="bgcolor" value="' + bgcolor + '"/>';
		strFlashTag += '<param name="base" value=".">';
		strFlashTag += '<param name="menu" value="false"/>';
		strFlashTag += '<param name="salign" value="LT"/>';
		strFlashTag += '<param name="scale" value="noscale"/>';
		strFlashTag += '<param name="wmode" value="transparent"/>';
		strFlashTag += '<param name="transparent" value="true"/>';
		strFlashTag += '<param name="allowScriptAccess" value="sameDomain"/>';
		strFlashTag += '</object>';
	}
	else
	{
		strFlashTag += '<embed base="." ';
		strFlashTag += 'src="' + swf + '" ';
		strFlashTag += 'quality="best" ';
		strFlashTag += 'bgcolor="' + bgcolor + '" ';
		strFlashTag += 'width="' + width + '" ';
		strFlashTag += 'height="' + height + '" ';
		strFlashTag += 'menu="false" ';
		strFlashTag += 'scale="noscale" ';
		strFlashTag += 'id="' + id + '" ';
		strFlashTag += 'salign="LT" ';
		//strFlashTag += 'wmode="transparent" ';
		strFlashTag += 'allowScriptAccess="sameDomain" ';
		if(flashvars != null) {strFlashTag += 'flashvars="' + flashvars + '" '};
		strFlashTag += 'type="application/x-shockwave-flash" ';
		strFlashTag += 'pluginspage="http://www.macromedia.com/go/getflashplayer">';
		strFlashTag += '</embed>';
	}

	document.write(strFlashTag);
}

function doSearchWith(search_category, search_keyword) {
	document.location.href = "/etcasp/search_index.asp?pageCode=frt011104&search_category=" + search_category + "&search_keyword=" + search_keyword
}

function notready() {
	alert("¼±ÅÃÇÏ½Å ¸Þ´º´Â ÁØºñÁßÀÔ´Ï´Ù.") ;	
}

var tIntv = 15 ;
var pxIntv = 6 ;
var startY = -138 ;
var endY = 0 ;

function slowDown() {
	var obj = document.all['dd2_add'] ;
	var temp = obj.style.top ;
	topY = parseInt(temp.substring(0, temp.length - 2), 10) ;
	topY += pxIntv ;
	obj.style.top = topY + "px" ;
	if (topY == endY) {
		return ;
	}
	setTimeout(slowDown, tIntv) ;
}

function slowUp() {
	var obj = document.all['dd2_add'] ;
	var temp = obj.style.top ;
	topY = parseInt(temp.substring(0, temp.length - 2), 10) ;
	topY -= pxIntv ;
	obj.style.top = topY + "px" ;
	if (topY == startY) {
		document.all['dd1'].style.display = "block" ;
		document.all['dd2'].style.display = "none" ;
		document.all['dd2_add'].style.display = "none" ;
		
		return ;
	}
	setTimeout(slowUp, tIntv) ;
}

function openDropDown() {
	document.all['dd1'].style.display = "none" ;
	document.all['dd2'].style.display = "block" ;
	document.all['dd2_add'].style.display = "block" ;
	
	slowDown()
}

function closeDropDown() {
	slowUp()
}

/* Valley Á¾ÇÕ¾È³»µµ */
function printWindow() {

	factory.printing.header = ""

	factory.printing.footer = ""   

	factory.printing.portrait = false

	factory.printing.leftMargin = 1

	factory.printing.topMargin = 1

	factory.printing.rightMargin = 1

	factory.printing.bottomMargin = 1

	factory.printing.Print(false, window)

}

function movie(url, w, h){

	// µ¿¿µ»ó ÄÚµå Á¤ÀÇ
	var mediaStr=
	"<OBJECT ID='MPlayer' CLASSID='CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95'  STANDBY='Loading Windows Media Player components...' TYPE='application/x-oleobject'  CODEBASE='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112' style='width : " + w + "px;height: " + h + "px'>"+
	"<PARAM NAME='FileName' VALUE='"+url+"'>"+
	"<PARAM NAME='transparentAtStart' VALUE='True'>"+
	"<PARAM NAME='transparentAtStop' VALUE='False'>"+
	"<PARAM NAME='AnimationAtStart' VALUE='False'>"+
	"<PARAM NAME='AutoStart' VALUE='True'>"+
	"<PARAM NAME='AutoRewind' VALUE='true'>"+
	"<PARAM NAME='SendMouseClickEvents' VALUE='1'>"+
	"<PARAM NAME='DisplaySize' VALUE='0'>"+
	"<PARAM NAME='AutoSize' VALUE='0'>"+
	"<PARAM NAME='ShowDisplay' VALUE='0'>"+
	"<PARAM NAME='ShowStatusBar' VALUE='0'>"+
	"<PARAM NAME='ShowControls' VALUE='false'>"+
	"<PARAM NAME='ShowTracker' VALUE='1'>"+
	"<PARAM NAME='Enabled' VALUE='1'>"+
	"<PARAM NAME='EnableContextMenu' VALUE='0'>"+
	"<PARAM NAME='EnablePositionControls' VALUE='1'>"+
	"<PARAM NAME='AllowChangeDisplaySize' VALUE='0'>"+
	"<PARAM NAME='EnableFullScreenControls' VALUE='0'>"+
	"<PARAM NAME='ShowPositionControls' VALUE='0'>"+
	"<PARAM NAME='SendKeyboardEvents' VALUE='1'>"+
	"<PARAM NAME='Mute' VALUE='0'>"+
	"<PARAM NAME='Rate' VALUE='1'>"+
	"<PARAM NAME='Volume' value='100'>"+
	"<PARAM NAME='SAMILang' VALUE=''>"+
	"<PARAM NAME='SAMIStyle' VALUE=''>"+
	"<PARAM NAME='SAMIFileName' VALUE=''>"+
	"<PARAM NAME='ClickToPlay' VALUE='false'>"+
	"<PARAM NAME='CursorType' VALUE='1'>"+
	"</OBJECT>";

	// µ¿¿µ»ó ÄÚµå Ãâ·Â
	document.write(mediaStr);
	//document.all['abc'].innerHTML = mediaStr
}
function movie_2(url, w, h, Obj, rStr){


	var extType = url.split(".")[url.split(".").length-1];

	//alert(extType);
	if (extType.toLowerCase() == "wmv" || extType.toLowerCase() == "avi") {
	
		// µ¿¿µ»ó ÄÚµå Á¤ÀÇ
		var mediaStr=
		"<OBJECT ID='MPlayer' CLASSID='CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95'  STANDBY='Loading Windows Media Player components...' TYPE='application/x-oleobject'  CODEBASE='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112' style='width : " + w + "px;height: " + h + "px'>"+
		"<PARAM NAME='FileName' VALUE='"+url+"'>"+
		"<PARAM NAME='transparentAtStart' VALUE='True'>"+
		"<PARAM NAME='transparentAtStop' VALUE='False'>"+
		"<PARAM NAME='AnimationAtStart' VALUE='False'>"+
		"<PARAM NAME='AutoStart' VALUE='FALSE'>"+
		"<PARAM NAME='AutoResize' VALUE='0'>"+
		"<PARAM NAME='AutoRewind' VALUE='true'>"+
		"<PARAM NAME='SendMouseClickEvents' VALUE='1'>"+
		"<PARAM NAME='DisplaySize' VALUE='0'>"+
		"<PARAM NAME='AutoSize' VALUE='-1'>"+
		"<PARAM NAME='ShowDisplay' VALUE='0'>"+
		"<PARAM NAME='ShowStatusBar' VALUE='0'>"+
		"<PARAM NAME='ShowControls' VALUE='true'>"+
		"<PARAM NAME='ShowTracker' VALUE='1'>"+
		"<PARAM NAME='Enabled' VALUE='1'>"+
		"<PARAM NAME='EnableContextMenu' VALUE='0'>"+
		"<PARAM NAME='EnablePositionControls' VALUE='1'>"+
		"<PARAM NAME='AllowChangeDisplaySize' VALUE='0'>"+
		"<PARAM NAME='EnableFullScreenControls' VALUE='1'>"+
		"<PARAM NAME='ShowPositionControls' VALUE='1'>"+
		"<PARAM NAME='SendKeyboardEvents' VALUE='1'>"+
		"<PARAM NAME='Mute' VALUE='0'>"+
		"<PARAM NAME='Rate' VALUE='1'>"+
		"<PARAM NAME='Volume' value='100'>"+
		"<PARAM NAME='SAMILang' VALUE=''>"+
		"<PARAM NAME='SAMIStyle' VALUE=''>"+
		"<PARAM NAME='SAMIFileName' VALUE=''>"+
		"<PARAM NAME='ClickToPlay' VALUE='false'>"+
		"<PARAM NAME='CursorType' VALUE='1'>"+
		"</OBJECT>";
		var contents = Obj.innerHTML;
		contents = contents.replace(rStr, mediaStr);
		mediaStr = contents;
		// µ¿¿µ»ó ÄÚµå Ãâ·Â
	} else if (extType.toLowerCase() == "jpg" || extType.toLowerCase() == "gif") {
		mediaStr = "<img src=" + url + ">";
	} else {
		mediaStr = "<a href='" + url + "' target='_blank'>´Ù¿î¹Þ±â</a>";
	}
	document.write(mediaStr);
	//document.all['abc'].innerHTML = mediaStr
}

// 2009-04-17 ±¸±Õ¸ð trim
String.prototype.trim = function() {
    return this.replace(/(^[\s]*)|([\s]*$)/g, "");
}

// 2009-04-20 ±¸±Õ¸ð  ÆäÀÌÁö ÀÌµ¿
function MovePage(v1,v2){
    var params;
    if (v2 == "" || v2 == null){
        params = v1
    }else{
        params = v1+"?"+v2
    }
    window.location.href = params;
}

// 2009-04-20 ±¸±Õ¸ð
function key13Check(fnc){
    if(window.event.keyCode == 13){
        eval(fnc);
    }
}


function OnlyNumber() {
	if((event.keyCode<48)||(event.keyCode>57)) {
		event.returnValue=false;
	}
}


function CheckPersonalCode(v1, v2, v3)
{
    var strusername = document.getElementById(v1).value;
    var strresidentno1 = document.getElementById(v2).value;
    var strresidentno2 = document.getElementById(v3).value;

    if( strusername == "" ) {
        alert('ÀÌ¸§À» ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À.');
        document.getElementById(v1).focus();
        return false;
    }
    if (strresidentno1.length < 6) { 
        alert ("ÁÖ¹Îµî·Ï¹øÈ£ ±æÀÌ°¡ Á¤È®ÇÏÁö ¾Ê½À´Ï´Ù.!!"); 
        document.getElementById(v2).focus();
        return false; 
    } 
    if (strresidentno2.length < 7 ) { 
        alert ("ÁÖ¹Îµî·Ï¹øÈ£ ±æÀÌ°¡ Á¤È®ÇÏÁö ¾Ê½À´Ï´Ù.!!"); 
        document.getElementById(v3).focus();
        return false; 
    }

    var strresidentno = strresidentno1 + strresidentno2; 
    var strA, strB, strC, strD, strE, strF, strG, strH, strI, strJ, strK, strL, strM, strN, strO; 
    var nCalA, nCalB, nCalC;  

    strA = strresidentno.substr(0, 1);
    strB = strresidentno.substr(1, 1);
    strC = strresidentno.substr(2, 1);
    strD = strresidentno.substr(3, 1);
    strE = strresidentno.substr(4, 1);
    strF = strresidentno.substr(5, 1);
    strG = strresidentno.substr(6, 1);
    strH = strresidentno.substr(7, 1);
    strI = strresidentno.substr(8, 1);
    strJ = strresidentno.substr(9, 1);
    strK = strresidentno.substr(10, 1);
    strL = strresidentno.substr(11, 1);
    strM = strresidentno.substr(12, 1);

    strO = strA*2 + strB*3 + strC*4 + strD*5 + strE*6 + strF*7 + strG*8 + strH*9 + strI*2 + strJ*3 + strK*4 + strL*5; 

    nCalA = eval(strO);
    nCalB = nCalA % 11;
    nCalC = 11 - nCalB;
    nCalC = nCalC % 10;

    strv = '19'; 
    strw = strresidentno.substr(0, 2);
    strx = strresidentno.substr(2, 2);
    stry = strresidentno.substr(4, 2);

    strz = strv + strw;

    if ((strz % 4 == 0) && (strz % 100 != 0) || (strz % 400 == 0)) {
        yunyear = 29;
    }else{ yunyear = 28;}

    if ((strx <= 0) || (strx > 12)) { 
        alert("»ý³â¿ùÀÏÀÌ ¸ÂÁö ¾Ê½À´Ï´Ù."); 
        document.getElementById(v2).focus();
        return false; 
    }

    if ((strx == 1 || strx == 3 || strx == 5 || strx == 7 || strx == 8 || strx == 10 || strx == 12) && (stry > 31 || stry <= 0)) { 
        alert("»ý³â¿ùÀÏÀÌ ¸ÂÁö ¾Ê½À´Ï´Ù."); 
        document.getElementById(v2).focus();
        return false; 
    } 
    if ((strx == 4 || strx == 6 || strx == 9 || strx == 11) && (stry > 30 || stry <= 0)) { 
        alert("»ý³â¿ùÀÏÀÌ ¸ÂÁö ¾Ê½À´Ï´Ù."); 
        document.getElementById(v2).focus();
        return false; 
    } 
    if (strx == 2 && (stry > yunyear || stry <= 0)) { 
        alert(strz + "»ý³â¿ùÀÏÀÌ ¸ÂÁö ¾Ê½À´Ï´Ù." + yunyear); 
        document.getElementById(v2).focus();
        return false; 
    } 
	/*
    if (!((strG == 1) || (strG == 2) || (strG == 3) || (strG ==4))) { 
        alert("ÁÖ¹Îµî·Ï¹øÈ£ µÞÀÚ¸®ÀÇ ½ÃÀÛÀº 1 ~ 4 ÀÌ¿©¾ß ÇÕ´Ï´Ù."); 
        document.getElementById(v3).focus();
        return false; 
    } 

    if (nCalC != strM) { 
        alert("ÁÖ¹Îµî·Ï¹øÈ£°¡ ±ÔÄ¢¿¡ ¾î±ß³³´Ï´Ù.");
        document.getElementById(v3).focus();
        return false;
    }
	*/
    return true;
}



/*
	* 2010/11/03 
	* ¼ýÀÚ¸¸ ÀÔ·Â,ÁÖ¹Î¹øÈ£ Ã¼Å© Ãß°¡
	* JSO
*/
function Number()
{
	var keyCode = event.keyCode;
	if ( ((keyCode < 33) || (keyCode > 40)) && ((keyCode < 48) || (keyCode > 57)) && ((keyCode < 96) || (keyCode > 105)) && (keyCode !== 8) && (keyCode !== 9) && (keyCode != 13) && (keyCode != 46) && (keyCode != 144))
	//       33 ~ 40 ¹æÇâÅ°                        48 ~ 57 : Å°º¸µå ¼ýÀÚ 0~9             96 ~ 105 : Å°ÆÐµå ¼ýÀÚ 0~9            8 : ¹é½ºÆäÀÌ½º     9 : Tab            13 : ¿£ÅÍ          46 : Delete        144 : Å°ÆÐµå NumLock
	{
		event.returnValue=false;
		return;
	}
}


// ÁÖ¹Îµî·Ï¹øÈ£ ¾ÕÀÚ¸® Check ½ºÅ©¸³Æ®
function CheckSsn1(){
	var str_ssn1 = document.frm.M_JUMIN1.value;
	var digit=0
	for (var i=0;i<str_ssn1.length;i++){
		var str_dig=str_ssn1.substring(i,i+1);
		if (str_dig<'0' || str_dig>'9'){ 
			digit=digit+1 
		}
	}
	if ((str_ssn1 == '') || ( digit != 0 )){
		return;   
	 }
	var digit1=0
	if (str_ssn1.substring(2,3) > 1){
		return;   
	}
	if (str_ssn1.substring(4,5) > 3){
		return;   
	}
	return true;  
}

// ÁÖ¹Îµî·Ï¹øÈ£ µÞÀÚ¸® Check ½ºÅ©¸³Æ®
function CheckSsn2(){
	var str_ssn2 = document.frm.M_JUMIN2.value;
	var digit1=0
	for (var i=0;i<str_ssn2.length;i++){
		var str_dig1=str_ssn2.substring(i,i+1);
		if (str_dig1<'0' || str_dig1>'9'){ 
			digit1=digit1+1 
		}
	}
	if ((str_ssn2 == '') || ( digit1 != 0 )){
		return;   
	}
	if (str_ssn2.substring(0,1) > 4 || str_ssn2.substring(0,1) == 0){
		return;   
	}
	return true;  
}

// ÁÖ¹Îµî·Ï¹øÈ£ Á¤È®¼º Check ½ºÅ©¸³Æ®
function CheckSsn(){
	var str_ssn1 = document.frm.M_JUMIN1.value;
	var str_ssn2 = document.frm.M_JUMIN2.value;
	var digit=0
	if (CheckSsn1() != true){
		alert('Àß¸øµÈ ÁÖ¹Îµî·Ï¹øÈ£ÀÔ´Ï´Ù.\n\n´Ù½Ã È®ÀÎÇÏ½Ã°í ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
		document.frm.M_JUMIN1.focus();
		return;
	}
	if (CheckSsn2() != true){
		alert('Àß¸øµÈ ÁÖ¹Îµî·Ï¹øÈ£ÀÔ´Ï´Ù.\n\n´Ù½Ã È®ÀÎÇÏ½Ã°í ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
		document.frm.M_JUMIN2.focus();
		return;
	}

	var a1=str_ssn1.substring(0,1)
	var a2=str_ssn1.substring(1,2)
	var a3=str_ssn1.substring(2,3)
	var a4=str_ssn1.substring(3,4)
	var a5=str_ssn1.substring(4,5)
	var a6=str_ssn1.substring(5,6)
	var check_digit=a1*2+a2*3+a3*4+a4*5+a5*6+a6*7
	var b1=str_ssn2.substring(0,1)
	var b2=str_ssn2.substring(1,2)
	var b3=str_ssn2.substring(2,3)
	var b4=str_ssn2.substring(3,4)
	var b5=str_ssn2.substring(4,5)
	var b6=str_ssn2.substring(5,6)
	var b7=str_ssn2.substring(6,7)
	var check_digit=check_digit+b1*8+b2*9+b3*2+b4*3+b5*4+b6*5 
	check_digit = check_digit%11
	check_digit = 11 - check_digit
	check_digit = check_digit%10
	if (check_digit != b7){
		alert('Àß¸øµÈ ÁÖ¹Îµî·Ï¹øÈ£ÀÔ´Ï´Ù.\n\n´Ù½Ã È®ÀÎÇÏ½Ã°í ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
	    document.frm.M_JUMIN1.focus();
		return;   
	}
	return true;
}

