<!--
var appVersionLower = navigator.appVersion.toLowerCase();
var iePos = appVersionLower.indexOf('msie');
if( iePos != -1 ) {
    versionMinor = parseFloat( appVersionLower.substring(iePos+5, appVersionLower.indexOf(';',iePos)) );
    versionMajor = parseInt( versionMinor );
} else {
	versionMajor = parseInt( navigator.appVersion );
	versionMinor = parseFloat( navigator.appVersion );
}
var NS   = (navigator.appName == "Netscape") ? (true) : (false);
//var NS2  = (NS && (versionMajor == 2)) ? (true) : (false);
//var NS3  = (NS && (versionMajor == 3)) ? (true) : (false);
//var NS4B = (NS && (versionMajor == 4) && (versionMinor <= 4.03)) ? (true) : (false);
var NS4  = (NS && (versionMajor >= 4)) ? (true) : (false);
var IE   = (navigator.appName == "Microsoft Internet Explorer") ? (true) : (false);
//var IE3  = (IE && (versionMajor == 2)) ? (true) : (false);
var IE4  = (IE && (versionMajor >= 4)) ? (true) : (false);
var IE5  = (document.all && document.getElementById) ? true : false;
var IE55 = (IE && versionMinor >= 5.5);
var MAC  = navigator.appVersion.indexOf("Macintosh") != -1;

//문자 제한 함수
function ap_validkey( ctrl, minimum, maximum ) 
{
    var thisvalue = ctrl.value;
    var exactcount = 0;
    var unacceptablekeys = " `~!@#$%^&*()+|\\=[]{};':\",./<>?";
	if( (minimum > -1) && (ap_isnothing(ctrl.value)) ) {
        alert( "必须填写事项.请输入" );
        ctrl.focus();
	    return( false );
	}
    for( var i = 0; i < thisvalue.length; i++ ) {
      thischar = thisvalue.charAt( i );
    if( unacceptablekeys.indexOf(thischar) != -1 ) {
	        alert( "不能使用特殊文字" );
	        ctrl.focus();
	        return( false ); 
          }
    }

    /*exactcount = ap_strlen( ctrl.value, unacceptablekeys );
    if( (minimum > -1) && (exactcount < minimum) ) {
        alert( "최소 " + minimum + "자 이상으로 입력하세요.");
        ctrl.focus();
        return( false );
    }

	if (RegChk("id",ctrl.value))
	{
		alert("不能使用特殊文字");
		ctrl.focus();
		return( false );
	}


	if (cal_byteS(ctrl.value,maximum))
	{
		alert("최대 (" + maximum + ")Byte 이하로 입력하세요.");
		ctrl.focus();
		return( false );
	}*/
	
	return( true );
}

function RegChk(type,str)
{
	switch(type){
	case "id":
		nReg = new RegExp("^[ㄱ-힣a-z0-9A-Z_-]{2,10}")
		break;
	}
	return !nReg.test(str)
}

function cal_byteS(aquery, maxbyte) 
{
	var tcount = 0;
	var tmpStr = new String(aquery);
	var temp = tmpStr.length;

	for(var k=0; k<temp; k++)
	{
		var onechar = tmpStr.charAt(k);

		if(escape(onechar).length > 4)
		{
			tcount += 2;
		}
		else if(onechar != '\r') 
		{
			tcount++;
		}
	}

	if(tcount > maxbyte) 
	{
		return( true );
	}
	else
	{
		return( false );
	}
}

//윈도우 오픈
function ap_openwin( winurl, winnm, winw, winh, adjust, resizable, scrollable, status ) 
{
	var param = ap_getwinparam( winw, winh, adjust, resizable, scrollable, status );
    newwin = window.open( winurl, winnm, param );
}

function ap_validtext( ctrl, minimum, maximum, incspecial ) 
{
    var thisvalue = ctrl.value;
    var exactcount = 0;
    var specialswithspace = " `~!@#$%^&*()_+|\\=-[]{};':\",./<>?";
	if( (minimum != null) && (minimum > -1) && (ap_isnothing(ctrl.value)) ) {
        alert( "必须填写事项.请输入" );
        ctrl.focus();
	    return( false );
	}
    if( (incspecial != null) && (incspecial == false) ) {
	    for( var i = 0; i < thisvalue.length; i++ ) {
	        thischar = thisvalue.charAt( i );
	        if( specialswithspace.indexOf(thischar) != -1 ) {
		        alert( "不能使用特殊文字" );
		        ctrl.focus();
		        return( false ); 
	            }
	    }
	}
    /*exactcount = ap_strlen( ctrl.value, specialswithspace );
    if( (minimum != null) && (minimum > -1) && (exactcount < minimum) ) {
        alert( "최소 " + minimum + "자 이상으로 입력하세요." );
        ctrl.focus();
        return( false );
    }
    if( (maximum != null) && (maximum > -1) && (exactcount > maximum) ) {
        alert( "최대 " + maximum + "자 이하로 입력하세요." );
        ctrl.focus();
        return( false );
    }*/
    return( true );
}

function ap_validnum( focusctrl, ctrl, minimum, maximum ) 
{
    if( ap_isnumber( ctrl.value ) == false ) {
        alert( "尚有空格或不是数字" );
        focusctrl.focus();
        return( false );
    }
    /*var quantity = parseInt( ctrl.value, 10 );
    if( (minimum != null) && (minimum > -1) && (quantity < minimum) ) {
        alert( "본 항목은 최소 (" + minimum + ") 이상으로 입력하세요." );
        focusctrl.focus();
        return( false );
    }
    if( (maximum != null) && (maximum > -1) && (quantity > maximum) ) {
        alert( "본 항목은 최대 (" + maximum + ") 이하이어야 합니다." );
        focusctrl.focus();
        return( false );
    }*/
    return( true );
}

//
/*function ap_num( focusctrl, ctrl, minimum, maximum , alstr) 
{
    if( ap_isnumber(ctrl.value) == false ) {
        alert( " 올바른 "+alstr+" 값을 입력해 주십시요" );
        focusctrl.focus();
        return( false );
    }
    var quantity = parseInt( ctrl.value, 10 );
    if( (minimum != null) &&    (quantity < minimum) ) {
        alert( "본 항목은 최소 (" + minimum + ") 이상으로 입력하세요." );
        focusctrl.focus();
        return( false );
    }
    if( (maximum != null) &&   (quantity > maximum) ) {
        alert( "본 항목은 최대 (" + maximum + ") 이하이어야 합니다." );
        focusctrl.focus();
        return( false );
    }
    return( true );
}*/


function ap_getwinparam( winw, winh, adjust, resizable, scrollable, status ) 
{
    var left, top;
    switch( adjust ) {
	case 1: //top left aligned
		left = top = 0;
		break;
	case 2: //top right aligned
		left = window.screen.availWidth - winw;
		top = 0;
		break;
	case 3: //centered
		left = (window.screen.availWidth - winw) / 2;
		top = (window.screen.availHeight - winh) / 2;
		break;
	case 4: //bottom left aligned
		left = 0;
		top = window.screen.availHeight - winh;
		break;
	case 5: //bottom right aligned
		left = window.screen.availWidth - winw - 8;
		top = window.screen.availHeight - winh;
		break;
    }
    var option = "";
    if( adjust > 0 ) option = "left=" + left + ",top=" + top;
    option = option + ",width=" + winw + ",height=" + winh;
    if( (!resizable) || (resizable == false) ) 
        option += ",resizable=no";
    else 
        option += ",resizable=yes";
    if( (!scrollable) || (scrollable == false) ) 
        option += ",scrollbars=no";
    else
        option += ",scrollbars=yes";
    if( (!status) || (status == false) ) 
        option += ",status=no";
    else
        option += ",status=yes";
    param = "toolbar=no," + option + ",directories=no,menubar=no";
    return( param );
}

//우편번호찾기
w2 = 396;
h2 = 314;
function zip(winurl) 
{
	ap_openwin( winurl, 'mem_zip', w2, h2, 3, false, true, false );
}



function ap_parsecookie( cookie, a_name, delimiter ) {
	var arg = a_name + "=";
	var i = 0, begoff, endoff;
	while( i <= cookie.length ) {
		if( cookie.substring(i, arg.length) == arg ) {
			begoff = i + arg.length;
			endoff = cookie.indexOf( delimiter, begoff );
			if( endoff < begoff ) endoff = cookie.length;
			return cookie.substring(begoff, endoff);
		}
		//i = cookie.indexOf(" ", i) + 1;
		//if(i == 0) break;
		i++;
	}
	return null;
}

function ap_getcookie( topnm, subnm ) {
	var subset = ap_parsecookie( document.cookie, topnm, ";" );
	if( subset == null ) return null;
	if( subnm == null ) return( unescape(subset) );
	var ckival = ap_parsecookie( subset, subnm, "&" );
	if( ckival == null ) return null;
	return( unescape(ckival) );
}

function ap_setcookie( a_name, a_value, a_expires, a_path, a_domain, a_secure ) {
	document.cookie = a_name + "=" + escape(a_value) +
		((a_expires) ? ("; expires=" + a_expires.toGMTString()) : ("")) +
		((a_path) ? ("; path=" + a_path) : ("")) +
		((a_domain) ? ("; domain=" + a_domain) : ("")) +
		((a_secure) ? ("; secure") : (""));
}

function ap_delcookie( a_name, a_path, a_domain ) {
	if( ap_getcookie(a_name, null) == null ) return;
	
	document.cookie = a_name + "=" +
		((a_path) ? ("; path=" + a_path) : ("")) +
		((a_domain) ? ("; domain=" + a_domain) : ("")) +
		("; expires=Thu, 01-Jan-70 00:00:01 GMT");
} 

function ap_setenvchr( keynm, value )
{
    eval( keynm + " = \"" + value + "\";" );
}

function ap_setenvnum( keynm, value )
{
    eval( keynm + " = " + value + ";" );
}

function ap_getenv( keynm ) 
{
	if( eval(keynm) )
		return eval(keynm);
	return "";
}

function ap_addelement(objarray, obj) 
{
	var size = objarray.length;
	objarray[size] = obj;
}

function ap_removeelement(objarray, obj) 
{
	var size = objarray.length;
	var i, j;
	for( i = 0; i < size; i++ ) {
		if( objarray[i] == obj ) {
			delete objarray[i];
			break;
		}
	}
	if( i == size )
		return false;
	for( j = i; j < size-1; j++ )
		objarray[j] = objarray[j+1];
	objarray.length = size-1;
	return true;
}

function ap_point( x, y )
{
	this.a_x = x;
	this.a_y = y;
}
	
function ap_queue(qnm, qmax) 
{
	this.Q_name = qnm;
	this.Q_head = 0;
	this.Q_tail = 0;
	this.Q_size = 0;
	this.Q_max = qmax + 1;
	this.Q_content = new Array(qmax + 1);
}

function ap_enqueue( que, obj ) 
{
	var Target = ((que.Q_tail + 1) % que.Q_max);
	
	if (que.Q_head == Target) {
		return false;
	} else {
		delete que.Q_content[Target];
		que.Q_content[Target] = obj;
		que.Q_tail = Target;
		que.Q_size++;
		return true;
	}
}

function ap_enqueue_rounded( que, obj ) 
{
	var Target = ((que.Q_tail + 1) % que.Q_max);
	
	if (que.Q_head == Target) {
		Target = ((que.Q_head + 1) % que.Q_max);
		
		delete que.Q_content[Target];
		que.Q_head = Target;
		que.Q_size--;
	}

	Target = ((que.Q_tail + 1) % que.Q_max);
	delete que.Q_content[Target];
	que.Q_content[Target] = obj;
	que.Q_tail = Target;
	que.Q_size++;
	return true;
}

function ap_dequeue( que ) 
{
	if (que.Q_tail == que.Q_head) {
		return null;
	}
	else {
		var Target = ((que.Q_head + 1) % que.Q_max);
		var obj;

		obj = que.Q_content[Target];
		que.Q_head = Target;
		que.Q_size--;
		return obj;
	}
}

function ap_peekqueue(que, idx) 
{
	var TempIdx = 0;
	
	if(!idx || idx > que.Q_size)
		TempIdx = 0;
	else
		TempIdx = idx;
		
	if (que.Q_tail == que.Q_head) 
		return null;
	else 
		return que.Q_content[((que.Q_head + 1 + idx) % que.Q_max)];
}

function ap_getqueuesize( que ) 
{
	return que.Q_size;
}

function ap_debugqueue( que ) 
{
	for( var each_property in que ) {
		alert(each_property + "=" + que[each_property]);
	}
}

function ap_getlyr( lyrnm ) 
{
    var obj = null;
	if( NS4 ) obj = document.layers[lyrnm];
	else if( IE4 ) obj = document.all[lyrnm].style;
	return( obj );
}

function ap_movelyr( lyrnm, xpos, ypos ) 
{
	var x = Number( xpos );
	var y = Number( ypos );
	if( isNaN(x) ) x = 0;
	if( isNaN(y) ) y = 0;
	var obj = ap_getlyr( lyrnm );
	if( NS4 ) {
	    obj.left = x; 
	    obj.top = y; 
	} else if( IE4 ) {
	    obj.pixelLeft = x;
	    obj.pixelTop  = y;
	}
}

function ap_showlyr( lyrnm, enable ) 
{
	var obj = ap_getlyr( lyrnm );
    if( enable ) {
        if( NS4 ) 
            obj.visibility = "show"; 
        else if( IE4 ) 
            obj.visibility = "visible"; 
    } else {
        if( NS4 ) 
            obj.visibility = "hide"; 
        else if( IE4 ) 
            obj.visibility = "hidden"; 
    }
}

function ap_eventshowlyr( lyrnm, e, xgap, ygap ) 
{
	ap_showlyr( lyrnm, false );
	xpos = (NS4) ? (e.pageX) : ((event.clientX) + window.document.body.scrollLeft);
	ypos = (NS4) ? (e.pageY) : ((event.clientY) + window.document.body.scrollTop);
	if( xgap ) xpos += xgap;
	if( ygap ) ypos += ygap;
	ap_movelyr( lyrnm, xpos, ypos );
	ap_keeplyrinwindow( lyrnm );
	ap_showlyr( lyrnm, true );
	return false;
}

function ap_getlyrw( lyrnm ) 
{
    var w = 0;
    if( NS4 ) {
	    w = document.layers[lyrnm].clip.width;
	} else if( IE4 ) {
	    w = document.all[lyrnm].scrollWidth;
	}
	return( w );
}

function ap_getlyrh( lyrnm ) 
{
    var h = 0;
    if( NS4 ) {
	    h = document.layers[lyrnm].clip.height;
	} else if( IE4 ) {
	    h = document.all[lyrnm].scrollHeight;
	}
	return( h );
}

function ap_keeplyrinwindow( lyrnm ) 
{
    var obj = ap_getlyr( lyrnm );
	var objw = ap_getlyrw( lyrnm );
	var objh = ap_getlyrh( lyrnm );

	scrbarwidth = 20;
	bscrbarwidth = scrbarwidth;
	rscrbarwidth = scrbarwidth;
	if( NS4 ) {
		winright = (window.pageXOffset + window.innerWidth) - rscrbarwidth;
		rightpos = obj.left + objw;
		if( rightpos > winright ) {
			dif = rightpos - winright;
			obj.left -= dif;
		}
		winbot = (window.pageYOffset + window.innerHeight) - bscrbarwidth ;
		botpos = obj.top + objh;
		if( botpos > winbot ) {
			dif = botpos - winbot;
			obj.top -= dif;
		}
		winleft = window.pageXOffset;
		leftpos = obj.left;
		if( leftpos < winleft )
			obj.left = 5;
	} else {
    	winright = (window.document.body.scrollLeft + window.document.body.clientWidth) - rscrbarwidth;
		rightpos = obj.pixelLeft + objw;
		if( rightpos > winright ) {
			dif = rightpos - winright;
			obj.pixelLeft -= dif;
		}
		winbot = (window.document.body.scrollTop + window.document.body.clientHeight) - bscrbarwidth;
		botpos = obj.pixelTop + objh;
		if( botpos > winbot ) {
			dif = botpos - winbot;
			obj.pixelTop -= dif;
		}
		winleft = window.document.body.scrollLeft;
		leftpos = obj.pixelLeft;
		if( leftpos < winleft )
			obj.pixelLeft = 5;
	}
}

function ap_setlyrz( lyrnm, zindex ) {
	if( IE4 ) {
	    document.all[lyrnm].style.zIndex = zindex;
	}
}

function ap_setlyrtag( lyrnm, tags )
{
	if( IE4 ) {
		if( IE5 ) { //innerHTML for IE5 over only
		    document.all[lyrnm].innerHTML = tags;
		}
	} else if( NS4 ) {
		document.layers[lyrnm].document.write(tags);
		document.layers[lyrnm].document.close();
	}
}

function ap_addlyrtag( lyrnm, tags )
{
	if( IE4 ) {
		document.all[lyrnm].innerHTML += tags;
	} else if( NS4 ) {
		document.layers[lyrnm].document.write(tags);
		document.layers[lyrnm].document.close();
	}
}

function ap_clrlyrtag( lyrnm )
{
	if( IE4 ) {
		document.all[lyrnm].innerHTML = "";
	} else if( NS ) {
		document.layers[lyrnm].document.open();
		document.layers[lyrnm].document.close();
	}
}

function ap_settbltag( tblnm, rowidx, cellidx, tags ) 
{
	if( !IE4 ) return;

	var obj = document.all[tblnm];
	if( isNaN(rowidx) || isNaN(cellidx) ) return;
	if( rowidx < 0 || cellidx < 0 ) return;
	if( obj.rows.length <= rowidx ) return;
	if( obj.rows(rowidx).cells.length <= cellidx ) return;

	obj.rows(rowidx).cells(cellidx).innerHTML = tags;
}

function ap_addtbltag( tblnm, rowidx, cellidx, tags ) 
{
	if( !IE4 ) return;

	var obj = document.all[tblnm];
	if( isNaN(rowidx) || isNaN(cellidx) ) return;
    if( rowidx < 0 || cellidx < 0 ) return;
	if( obj.rows.length <= rowidx ) return;
	if( obj.rows(rowidx).cells.length <= cellidx ) return;

	obj.rows(rowidx).cells(cellidx).innerHTML += tags;
}

function ap_getwinx( winobj ) 
{
	var x = winobj.screenLeft;
	if( winobj != self )
	    x -= 4; //4 is the width of the left bar
	return( x );
}

function ap_getwiny( winobj ) 
{
	var y = winobj.screenTop;
	if( winobj != self ) 
	    y -= 23; //23 is the height of the window title
	return( y );
}

function ap_getwinw( winobj ) 
{
	var w;
    if( NS ) {
    	w = winobj.innerWidth;
    } else {
    	w = winobj.document.body.clientWidth;
    	if( winobj != self )
    	    w += 12; 
    }
    return( w );
}

function ap_getwinh( winobj ) 
{
	var h;
    if( NS ) { 
    	h = winobj.innerHeight;
    } else {
    	h = winobj.document.body.clientHeight;
    	if( winobj != self )
    	    h += (23 + 8);
    }
    return( h );
}

function ap_movewincenter( winobj ) 
{
    var thisw = ap_getwinw( winobj );
    var thish = ap_getwinh( winobj );
	var left = (window.screen.availWidth - thisw) / 2;
	var top = (window.screen.availHeight - thish) / 2;
	if( left < 0 ) left = 0;
	if( top < 0 ) top = 0;
	winobj.moveTo( left, top );
	return( true );
}

function ap_adjustwinh( basewin, adjusttagnm, preferredh, resizable, scrollable, status ) 
{
    basewin.focus();
    if( !IE4 )
        return;
    if( !eval("document.images." + adjusttagnm) )
        return;
    w = ap_getwinw( basewin );
    h = ap_getwinh( basewin );
    y = eval( "document.images." + adjusttagnm + ".offsetTop" );
    if( h == y )
        return;
    neww = w + 10;
    if( resizable == true ) neww += (16+2);
    if( scrollable == true ) neww += (16);
    if( status == true ) neww += 0;
    newh = y + 78;
    if( resizable == true ) newh += 2;
    if( scrollable == true ) newh += 0;
    if( status == true ) newh += 0;
    if( newh >= window.screen.availHeight )
        newh = Math.min( newh, h );
    if( preferredh > 0 ) newh = Math.min( preferredh, newh );
    self.window.resizeTo( neww, newh );
}

function ap_adjustwinh_ml( basewin, adjusttagnm, preferredh, resizable, scrollable, status, plusy ) 
{
    basewin.focus();
    if( !IE4 ) 
        return;
    if( !eval("document.images." + adjusttagnm) ) 
        return;
    w = ap_getwinw( basewin );
    h = ap_getwinh( basewin );
    y = eval( "document.images." + adjusttagnm + ".offsetTop" );
    if( h == y ) 
        return;
    neww = w + 10;
    if( resizable == true ) neww += (16+2);
    if( scrollable == true ) neww += (16);
    if( status == true ) neww += 0;
    newh = y + plusy;
    if( resizable == true ) newh += 2;
    if( scrollable == true ) newh += 0;
    if( status == true ) newh += 0;
    if( newh >= window.screen.availHeight )
        newh = Math.min( newh, h );
    if( preferredh > 0 ) newh = Math.min( preferredh, newh );
    self.window.resizeTo( neww, newh );
}


function ap_newwin( winurl, winnm, winw, winh, adjust, resizable, scrollable, status ) 
{
	var param = ap_getwinparam( winw, winh, adjust, resizable, scrollable, status );
    newwin = window.open( winurl, winnm, param );
    return( newwin );
}



function ap_openwinright( basewin, winurl, winnm, winw, winh, resizable, scrollable, status )
{
    var thisx = ap_getwinx( basewin );
    var thisy = ap_getwiny( basewin );
    var thisw = ap_getwinw( basewin );
    var thish = ap_getwinh( basewin );
    var left = thisx + thisw;
    if( left >= window.screen.availWidth )
        left = window.screen.availWidth - winw;
    var top = thisy;
    if( top < 0 ) top = 0;

    var option = "";
    option = "left=" + left + ",top=" + top;
    option = option + ",width=" + winw + ",height=" + winh;
    if( (!resizable) || (resizable == false) ) 
        option += ",resizable=no";
    else 
        option += ",resizable=yes";
    if( (!scrollable) || (scrollable == false) ) 
        option += ",scrollbars=no";
    else
        option += ",scrollbars=yes";
    if( (!status) || (status == false) ) 
        option += ",status=no";
    else
        option += ",status=yes";
    param = "toolbar=no," + option + ",directories=no,menubar=no";
    newwin = window.open( winurl, winnm, param );
    return( newwin );
}

function ap_validobj( obj ) 
{
    if( (typeof(obj) == "unknown") || (typeof(obj) == "undefined") )
        return false;
    return( true );
}

function ap_isframe( frmidx, frmnm ) 
{
	var frm = self.parent;
	if( (typeof(frm) == "object") && // 존재하고...
		(typeof(frm.name) == "string") && // 접근권한이 있고...
		(frm.frames.length >= 2) &&
		(typeof(frm.frames[frmidx]) == "object") && // 존재하고...
		(typeof(frm.frames[frmidx].name) == "string" ) && // 접근권한이 있고...
		(frm.frames[frmidx].name == frmnm) ) // 이름까지 맞으면...
		return true;
	return false;
}

function ap_findframe( frmnm )
{
	var curframe = self;
	var frmobj = null;
	do {
		frmobj = static_findframefrom( curframe, frmnm );
		if( frmobj != null ) 
			break;
		if( curframe.top.opener == null )
		    break;
		if( (typeof(curframe.top.opener.name) == "unknown") ||
		    (typeof(curframe.top.opener.name) == "undefined") )
		    break;
		curframe = curframe.top.opener;
	} while( (curframe != null) && (typeof(curframe) != "unknown") && (typeof(curframe) != "undefined") )
	return frmobj;
}

function static_findframefrom( from, frmnm ) 
{
	var i, curframe = from;
	if( (typeof(curframe.name) != "unknown") &&
	    (typeof(curframe.name) != "undefined") && 
	    (curframe.name == frmnm) )
		return curframe;
	while( (typeof(curframe) != "unknown") && (typeof(curframe) != "undefined") ) {
		for( i = 0; i < curframe.frames.length; i++ ) {
			if( (typeof(curframe.frames[i].name) != "unknown") && 
			    (typeof(curframe.frames[i].name) != "undefined") && 
			    (curframe.frames[i].name == frmnm) )
    			return curframe.frames[i];
	    }
		if( curframe == from.top )
			return null;
		curframe = curframe.parent;
	}
	return null;
}

function ap_frmobjready( frmnm, objnm, forcemsg ) { 
	if( (typeof(parent) != "object") || (parent == self) ) { //no parent
	    if( forcemsg == true ) 
	        alert( "잘못된 페이지 구조입니다. 페이지를 다시 띄워주시기 바랍니다." );
        return false;
    }
	if( typeof(parent.name) != "string" ) { //access forbidden to the parent
        if( forcemsg == true ) 
            alert( "접근 권한이 없는 페이지 구조를 접근하려 합니다. 페이지를 다시 띄워주시기 바랍니다." );
        return false;
	}
	if( typeof(parent.document.frames[0].name) != "string" ) { //access forbidden to the frame
        if( forcemsg == true ) 
            alert( "접근 권한이 없는 페이지를 접근하려 합니다. 페이지를 다시 띄워주시기 바랍니다." );
        return false;
	}
	frm = eval( frmnm );
    if( (typeof(frm) == "unknown") ||
        (typeof(frm) == "undefined") ) {
        if( forcemsg == true ) 
            alert( self.document.location.href + ", 페이지를 읽고 있거나 잘못된 페이지 구조입니다." );
        return false;
    }
    if( objnm == null ) 
        return true;
    frmobj = eval( frmnm + "." + objnm );
    if( (typeof(frmobj) == "unknown") ||
        (typeof(frmobj) == "undefined") ) {
        if( forcemsg == true ) 
            alert( self.document.location.href + ", 페이지 및 그 내용을 읽고 있거나 잘못된 페이지 구조입니다." );
        return false;
    }
	return true;
}

function ap_virtualready( frmnm ) { 
	if( ap_frmobjready( frmnm, 'rt_weblock', false ) == false )
	    return false;
    lockflag = eval( frmnm + ".rt_weblock" );
	if( lockflag == true ) {
        alert( "이미 전송중입니다. 잠시 기다려 주세요. 오랫동안 전송중인\r\n" +
               " 상태로 남아 있으면 리모콘 아래의 전송중 이미지를 클릭하시거나\r\n" +
               "현재 창을 종료하고 창을 새롭게 띄우신 뒤 다시 하시기 바랍니다." );
        return false;
	}
	return true;
}

function ap_definequerystring( tmpargv ) 
{
	var args = tmpargv;
	var argkey, argval, defined = "";
	while( args.indexOf('=') != -1 ) {
		argkey = args.substring( 0, args.indexOf('=') );
		args = args.substring( args.indexOf('=')+1 );
		if( args.indexOf('&') != -1 ) {
			argval = unescape( args.substring(0, args.indexOf('&')) );
			args = args.substring( args.indexOf('&')+1 );
		} else {
			argval = unescape( args );
		}
		if( isNaN(argval) )
			argval = "'" + argval + "'";
		else
			argval = Number(argval);
		defined += ("var " + argkey + "=" + argval + ";");
	}
	return defined;
}

function ap_querystring( args, keynm ) 
{
	var tmp;
    if( args == null ) return( "" );
	args = args.substr( args.indexOf('?')+1 );
	if( args.indexOf( '=' ) == -1 )
		return "";
	if( args.indexOf(keynm) == -1 )
		return "";
	tmp = args.substr( args.indexOf(keynm) + keynm.length + 1 );
	if( tmp.indexOf('&') == -1 )
		return unescape(tmp);
	tmp = tmp.substr(0, tmp.indexOf('&'));
	return unescape(tmp);
}

function ap_random( len ) 
{
	var tmp, dt = new Date();
	if( len == null ) len = 10;
	tmp = (dt.getHours()+1) * (dt.getSeconds()+1) * Math.random() * Math.random() * 1000000000000;
	dt = null;
	tmp = tmp + "dummy";
	tmp = tmp.substring(0, tmp.indexOf("."));
	tmp = tmp.substring(0, len);
	return tmp;
}

function ap_escape( str ) 
{
	var dec = escape( str );
	var idx, chr, ret = "";
	if( NS ) return dec;
	for( idx = 0; idx < dec.length; idx ++ ) {
		if( dec.charAt( idx ) == '%' && dec.charAt( idx + 1) != 'u' )
			ret = ret + "%u00";
		else
			ret = ret + dec.charAt(idx);
	}
	return ret;
}

function ap_trim( str ) 
{
	var idx = 0;

	// 좌측 공백 제거
	while( str.charAt(idx) == " " ){
		idx = idx + 1;
	}
	str = str.substring(idx, str.length);

	// 우측 공백 제거
	idx = str.length - 1;
	while( str.charAt(idx) == " " ){
		idx = idx - 1;
	}
	return str.substring(0, idx+1);
}

function ap_formatnumber( numValue ) {
    var orgString, length;

    orgString = "" + numValue;
    length = orgString.length;
    if( length == 0 ) return( "0" );

    var tgtString = "", org = 0;
    var modlen = length % 3;
    if( modlen == 0 ) modlen = 3;
    while( org < length ) {
        if( modlen == 0 ) {
            tgtString = tgtString + ",";
            modlen = 3;
        } else {
            var aNumber = orgString.charAt( org );
            tgtString = tgtString + aNumber;
            org++;
            modlen--;
        }
    }
    return( tgtString );
}

function ap_strlen( thisvalue, specialset ) 
{
    var byte1count = 0, byte2count = 0;
    var byte256 = " `~!@#$%^&*()_+|\\=-[]{};':\",./<>?"
    for( var i = 0; i < thisvalue.length; i++ ) {
        thischar = thisvalue.charAt( i );
        if( ((thischar >= '0') && (thischar <= '9')) ||
            ((thischar >= 'A') && (thischar <= 'Z')) ||
            ((thischar >= 'a') && (thischar <= 'z')) ||
            ((thischar == '-') || (thischar == '_')) )
            byte1count++;
        else if( thischar == '(' || thischar == ')' ) {
        	byte1count++;
        }
        else if( byte256.indexOf(thischar) != -1 )
        	byte1count++;
        else if( specialset != null && specialset.indexOf(thischar) != -1 )
            byte1count++;
        else
            byte2count++;
    }
    return( byte1count + byte2count * 2 );
}

function ap_nicklen( nickid ) 
{
	var nbytes = 0;
	var bytestr = "" + nickid, escapedchr = "";
	for( var i = 0; i < bytestr.length; i++ ) {
		escapedchr = escape( bytestr.charAt(i) );
		nbytes++;
		if( escapedchr.length > 4 ) {
			nbytes++;
		}
	}
	return nbytes;
}

function ap_isnothing( a_value )
{
    if( a_value.length == 0 ) return( true ); 
    spacecount = 0;
    for( var i = 0; i < a_value.length; i++ ) {
        thischar = a_value.charAt( i );
        if( thischar == ' ' ) spacecount++;
    }
    if( spacecount == a_value.length ) return( true ); 
	return( false );
}

//숫자 여부 판단
function ap_isnumber( numeric ) 
{
	numeric = Math.abs(numeric);
    var charDetected = 0, markDetected = 0, dotCount = 0;
    if( numeric == null || numeric == "" || numeric.length == 0 ) {
        return( false );
    }
	var numcheckexpr = /(^\d+$)|(^\-\d+$)/;
	if( !numcheckexpr.test(numeric) ) return( false );
    for( var i = 0; i < numeric.length; i++ ) {
      thischar = numeric.charAt( i );
      if( !((thischar >= '0') && (thischar <= '9')) ) {
        return( false );
        }
    } //end of for
    return( true );
}

// Written by Paolo Wales (paolo@taize.fr) starting on a basis by Samrat Sen. 
/***********************************************************************************
   Notes: 
  'exclude' checks 5 conditions: 
   a) characters that should not be in the address
		-> characters except for @, -, ., alphanumeric shouldn't be in the address
		-> check character '_' is added because '\w' not contains '_' in case of IE 4.0
   b) characters that should not be at the start
		-> @, . should not be at the start(modified by hellojoy)
   c) characters that shouldn't be together
   d) there's not more than one '@' 
  'check' checks there's at least one '@', later followed by at least one '.' 
  'checkend' checks the address ends with a period followed by 2 or 3 alpha characters 
  N.B. Javascript 1.2 only works with version 4 browsers and higher. 
*************************************************************************************/ 
function ap_valideml( a_email ) {
	var exclude=/[^@\-\_\.\w]|^[@\.]|[@\.]{2}|(@)[^@]*\1/; 
	var check=/@[\w\-]+\./; 
	var checkend=/\.[a-zA-Z]{2,3}$/; 

	if( (a_email.search(exclude) != -1) || 
        (a_email.search(check) == -1) || 
	    (a_email.search(checkend) == -1) ) {
		return( false );
	}
	return( true );
}

function ap_validphn( a_phone ) {
    if( (a_phone == null) || (a_phone == "") || (a_phone.length == 0) ) 
        return( false );
    a_phone = a_phone.replace(/-/gi, "");
    for( var i = 0; i < a_phone.length; i++ ) {
        thischar = a_phone.charAt( i );
        if( (thischar < '0') || (thischar > '9') ) return( false );
    }
	var chktel1 = /^([0-9]{2,3}-[0-9]{3,4}-)|([0-9]{3,4}-)[0-9]{4}$/;
	var chktel2 = /^[0-9]{7,8}$|^[0-9]{10,11}$/;
	if( (a_phone.search(chktel1) == -1) && (a_phone.search(chktel2) == -1) ) 
	    return( false );
    return( true );
}


function ap_validfile( ctrl, minimum, maximum ) 
{
	var exactcount = 0;
	var specialswithspace = "`!@#$%^&*+|=[];\'\",<>?/:|";
	if( (minimum > -1) && (ap_isnothing(ctrl.value)) ) {
        alert( "必须填写事项.请输入" );
		return( false );
	}		
	if( ap_isnothing(ctrl.value) ) return( true );

	var pathvalue = ctrl.value;
	var fileidx = pathvalue.lastIndexOf("\\");
	if( fileidx < 0 ) 
		var fileidx = pathvalue.lastIndexOf("/");
	if( fileidx > 0 ) {
		var thisvalue = pathvalue.substring(fileidx + 1);
		for( var i = 0; i < thisvalue.length; i++ ) {
			thischar = thisvalue.charAt( i );
			if( specialswithspace.indexOf(thischar) != -1 ) {
				alert( "파일명에 특수문자가 포함되어 있습니다.\n`!@#$%^&*+|=[];\'\",<>?/:| 문자는 사용하실 수 없습니다.\n" );
				ctrl.focus();
				return( false ); 
			}
			if( thischar == "­" ) {
				alert( "파일명에 특수문자나 보이지 않는 문자는 사용하실 수 없습니다." );
				ctrl.focus();
				return( false ); 
			}
		}
		exactcount = ap_strlen( ctrl.value, specialswithspace );
		if( (minimum > -1) && (exactcount < minimum) ) {
	        alert( "파일 경로의 길이는 최소 " + minimum + "자 이상으로 입력하세요. 현재 (" + exactcount + ")자 입니다." );
			ctrl.focus();
			return( false );
		}
		if( (maximum > -1) && (exactcount > maximum) ) {
	        alert( "파일 경로의 길이는 최대 " + maximum + "자 이하이어야 합니다. 현재 (" + exactcount + ")자 입니다." );
			ctrl.focus();
			return( false );
		}
	} else {
		alert("파일명이 올바르지 않습니다.");
		return ( false );
	}
	return( true );
}


function ap_validnck( ctrl, minimum, maximum ) 
{
    var thisvalue = ctrl.value;
    var exactcount = 0;
    var unacceptablencks = "` ~!@#$%^&*()=+|\\}]{[':;?/><.,­_\"";
	if( (minimum > -1) && (ap_isnothing(ctrl.value)) ) {
        alert( "必须填写事项.请输入" );
        ctrl.focus();
	    return( false );
	}
    for( var i = 0; i < thisvalue.length; i++ ) {
        thischar = thisvalue.charAt( i );
        if( unacceptablencks.indexOf(thischar) != -1 ) {
	        alert( "不能使用特殊文字" );
	        ctrl.focus();
	        return( false ); 
            }
    }
	if ( thisvalue != escape(thisvalue) ) {
		alert( "한글과 특수문자는 사용할 수 없습니다." );
		ctrl.focus();
		return( false );
	}
    exactcount = ap_strlen( ctrl.value, unacceptablencks );
    if( (minimum > -1) && (exactcount < minimum) ) {
        alert( "최소 " + minimum + "자 이상으로 입력하세요." );
        ctrl.focus();
        return( false );
    }
    if( (maximum > -1) && (exactcount > maximum) ) {
        alert( "최대 " + maximum + "자 이하로 입력하세요." );
        ctrl.focus();
        return( false );
    }
    return( true );
}

function ap_validscv( ctrl, minimum, maximum ) 
{
    var thisvalue = ctrl.value;
    var exactcount = 0;
    var unacceptablekeys = "`#$%^&=+|\\:;-\"";
	if( (minimum > -1) && (ap_isnothing(ctrl.value)) ) {
        alert( "必须填写事项.请输入" );
        ctrl.focus();
	    return( false );
	}
    for( var i = 0; i < thisvalue.length; i++ ) {
        thischar = thisvalue.charAt( i );
        if( unacceptablekeys.indexOf(thischar) != -1 ) {
	        alert( "不能使用特殊文字" );
	        ctrl.focus();
	        return( false ); 
        }
    }
    exactcount = ap_strlen( thisvalue, unacceptablekeys );
    if( (minimum > -1) && (exactcount < minimum) ) {
        alert( "최소 " + minimum + "자 이상으로 입력하세요." );
        ctrl.focus();
        return( false );
    }
    if( (maximum > -1) && (exactcount > maximum) ) {
        alert( "최대 " + maximum + "자 이하로 입력하세요." );
        ctrl.focus();
        return( false );
    }
    return( true );
}


//input text 의 값 체크
function input_valid( ctrl, minimum, maximum, alval ) 
{
    var thisvalue = ctrl.value;
    var exactcount = 0;
    var unacceptablekeys = "`#$%^&=+|\\:;-\"";
	if( (minimum > -1) && (ap_isnothing(ctrl.value)) ) {
        alert( alval+" 입력하세요." );
        ctrl.focus();
	    return( false );
	}
    for( var i = 0; i < thisvalue.length; i++ ) {
        thischar = thisvalue.charAt( i );
        if( unacceptablekeys.indexOf(thischar) != -1 ) {
	        alert( "不能使用特殊文字" );
	        ctrl.focus();
	        return( false ); 
        }
    }
    exactcount = ap_strlen( thisvalue, unacceptablekeys );
    if( (minimum > -1) && (exactcount < minimum) ) {
        alert( "최소 " + minimum + "자 이상으로 입력하세요." );
        ctrl.focus();
        return( false );
    }
    if( (maximum > -1) && (exactcount > maximum) ) {
        alert( "최대 " + maximum + "자 이하로 입력하세요." );
        ctrl.focus();
        return( false );
    }
    return( true );
}




function ap_getpositivenum( ctrl )
{
    if( ap_isnumber( ctrl.value ) == false )
        return( -1 );
    return parseInt( ctrl.value, 10 );
}

function ap_chkregexp( valstr, badwords ) {
	var regpat = "";
	for( var i = 0; i < badwords.length; i++ ) {
		regpat = "";
		for (var j = 0; j < badwords[i].length - 1; j++)
			regpat += badwords[i].charAt(j) + "[^\uAC00-\uD7AF]*";
		regpat += badwords[i].charAt(badwords[i].length - 1);
		var newregexp = new regexp( regpat, "i" );
		var expret = newregexp.exec(valstr);
		if( expret != null ) {
			alert( valstr + " 은 사용하실 수 없습니다. 다른 값으로 바꾸시기 바랍니다." );
			return( false );
		}
	}
	return( true );
}

function ap_checkclr( thisvalue ) {
	var clrcheckexpr = /^#[a-fA-F0-9]{5}[a-fA-F0-9]$|^[a-fA-F0-9]{5}[a-fA-F0-9]$/; 
	return( thisvalue.search(clrcheckexpr) != -1 );
}

function ap_validclr( ctrl, minimum, maximum ) 
{
	var thisvalue = ap_trim( ctrl.value );
	if( !ap_checkclr( thisvalue ) ) {
		alert( "색상값이 잘못되었습니다." );
        ctrl.focus();
		return( false );
	}
	if( (minimum != null) && (minimum > -1) && (ap_isnothing(ctrl.value)) ) {
        alert( "必须填写事项.请输入" );
	    return( false );
	}
    exactcount = ap_strlen( ctrl.value );
    if( (minimum != null) && (minimum > -1) && (exactcount < minimum) ) {
        alert( "최소 " + minimum + "자 이상으로 입력하세요." );
        ctrl.focus();
        return( false );
    }
    if( (maximum != null) && (maximum > -1) && (exactcount > maximum) ) {
        alert( "최대 " + maximum + "자 이하로 입력하세요." );
        ctrl.focus();
        return( false );
    }
    return( true );
}

function ap_checkall( form, ctrl ) 
{
	var i, ncontrols = 0;
	if( !ap_validobj(ctrl) ) return( false );
    for( i = 0; i < ctrl.length; i++ ) {
        thisone = ctrl[i];
        if( !thisone.disabled ) 
            thisone.checked = true;
        ncontrols++;
    }
    if( ncontrols == 0 ) { //if there is nothing checked, we should check through the form
		for( i = 0; i < form.length; i++ ) {
			if( (form[i].type == "checkbox") && (!form[i].disabled) )
				form[i].checked = true;
		}
	}
	return( false );
}

function ap_uncheckall( form, ctrl ) 
{
	var i, ncontrols = 0;
	if( !ap_validobj(ctrl) ) return( false );
    for( i = 0; i < ctrl.length; i++ ) {
        thisone = ctrl[i];
        if( !thisone.disabled ) 
            thisone.checked = false;
        ncontrols++;
    }
    if( ncontrols == 0 ) { //if there is nothing checked, we should check through the form
		for( i = 0; i < form.length; i++ ) {
			if( (form[i].type == "checkbox") && (!form[i].disabled) )
				form[i].checked = false;
		}
	}
	return( false );
}

function ap_reverseall( form, ctrl ) 
{
	var i, ncontrols = 0;
	if( !ap_validobj(ctrl) ) return( false );
    for( i = 0; i < ctrl.length; i++ ) {
        thisone = ctrl[i];
        if( !thisone.disabled ) {
	        if( thisone.checked ) thisone.checked = false;
	        else thisone.checked = true;
	    }
	    ncontrols++;
    }
    if( ncontrols == 0 ) { //if there is nothing checked, we should check through the form
		for( i = 0; i < form.length; i++ ) {
			if( (form[i].type == "checkbox") && (!form[i].disabled) )
				form[i].checked = !form[i].checked;
		}
	}
	return( false );
}

function ap_disablechecked( form, ctrl ) 
{
	var i, ncontrols = 0;
	if( !ap_validobj(ctrl) ) return( false );
    for( i = 0; i < ctrl.length; i++ ) {
        thisone = ctrl[i];
        if( (thisone.checked) && (!thisone.disabled) )
	        thisone.disabled = true;
	    ncontrols++;
    }
    if( ncontrols == 0 ) { //if there is nothing checked, we should check through the form
		for( i = 0; i < form.length; i++ ) {
			if( (form[i].type == "checkbox") && (form[i].checked == true) && (!form[i].disabled) )
				form[i].disabled = true;
		}
	}
	return( false );
}

function ap_getcheckedcount( form, ctrl ) 
{
    var i, ncontrols = 0, checkedcount = 0;
	if( !ap_validobj(ctrl) ) return( 0 );
    for( i = 0; i < ctrl.length; i++ ) {
        thisone = ctrl[i];
        if( (thisone.checked) && (!thisone.disabled) ) 
            checkedcount++;
        ncontrols++;
    }
    if( ncontrols == 0 ) { //if there is nothing checked, we should check through the form
		for( i = 0; i < form.length; i++ ) {
			if( (form[i].type == "checkbox") && (form[i].checked == true) && (!form[i].disabled) )
				checkedcount++;
		}
	}
    return( checkedcount );
}

function ap_somethingchecked( form, ctrl ) 
{
	if( ap_getcheckedcount(form, ctrl) == 0 ) {
        alert( "선택된 항목이 없습니다. 항목을 하나 또는 하나 이상 선택하신 뒤 다시 시도하시기 바랍니다." );
        return( false );
    }
    return( true );
}

function ap_getoptionvalue( ctrl ) 
{
	if( !ap_validobj(ctrl) ) return( "" );
    if( !ctrl.options )
        return( ctrl.value );
    for( var i = 0; i < ctrl.options.length; i++ ) {
        thisset = ctrl.options[i];
        if( thisset.selected ) {
            return( thisset.value );
        }
    }
    return( "" );
}

function ap_setoptionvalue( ctrl, curval ) 
{
	if( !ap_validobj(ctrl) ) return;
    if( !ctrl.options )
        return;
    for( var i = 0; i < ctrl.options.length; i++ ) {
        thisset = ctrl.options[i];
        if( thisset.value == curval )
            thisset.selected = true;
    }
}

function ap_getradiobuttonvalue( ctrl ) 
{
	if( !ap_validobj(ctrl) ) return( "" );
    for( i = 0; i < ctrl.length; i++ ) {
        thisone = ctrl[i];
        if( thisone.checked ) 
            return( thisone.value );
    }
    return( "" );
}

function ap_getradiobuttondefaultvalue( ctrl ) 
{
	if( !ap_validobj(ctrl) ) return( "" );
    for( i = 0; i < ctrl.length; i++ ) {
        thisone = ctrl[i];
        if( thisone.defaultchecked ) 
            return( thisone.value );
    }
    return( "" );
}

function ap_setradiobuttonvalue( ctrl, curval ) 
{
	if( !ap_validobj(ctrl) ) return;
    for( i = 0; i < ctrl.length; i++ ) {
        thisone = ctrl[i];
        if( thisone.value == curval ) 
            thisone.checked = true;
    }
}

function ap_getcheckboxarray( form, ctrl ) 
{
    var targets = new Array();
    var i, ncontrols = 0, checkedcount = 0;
	if( !ap_validobj(ctrl) ) return( targets );
    for( i = 0; i < ctrl.length; i++ ) {
        thisone = ctrl[i];
        if( (thisone.checked) && (!thisone.disabled) ) {
            targets[checkedcount] = thisone.value;
            checkedcount++;
        }
        ncontrols++;
    }
    if( ncontrols == 0 ) { //if there is nothing checked, we should check through the form
		for( i = 0; i < form.length; i++ ) {
			if( (form[i].type == "checkbox") && (form[i].checked == true) && (!form[i].disabled) )
                targets[checkedcount] = form[i].value;
				checkedcount++;
		}
	} 
	return( targets );
}

function ap_getcheckboxnumber( form, ctrl ) 
{
    var i, ncontrols = 0, intval = 0;
	if( !ap_validobj(ctrl) ) return( 0 );
    for( i = 0; i < ctrl.length; i++ ) {
        thisone = ctrl[i];
        if( (thisone.checked) && (!thisone.disabled) ) 
            intval += (parseInt(thisone.value, 10));
        ncontrols++;
    }
    if( ncontrols == 0 ) { //if there is nothing checked, we should check through the form
		for( i = 0; i < form.length; i++ ) {
			if( (form[i].type == "checkbox") && (form[i].checked == true) && (!form[i].disabled) )
				intval += (parseInt(form[i].value, 10));
		}
	}
    return( intval );
}

function ap_setcheckboxarray( form, ctrl, curval ) 
{
    var i, ncontrols = 0, checkedcount = 0;
	if( !ap_validobj(ctrl) ) return;
    for( i = 0; i < ctrl.length; i++ ) {
        thisone = ctrl[i];
        if( thisone.value == curval ) 
            thisone.checked = true;
        ncontrols++;
    }
    if( ncontrols == 0 ) { //if there is nothing checked, we should check through the form
		for( i = 0; i < form.length; i++ ) {
			if( (form[i].type == "checkbox") && (form[i].value == curval) )
			    form[i].checked = true;
		}
	} 
}

function ap_filenmpreview( ctrlnm, pvvnm, divnm, defpvvpath )
{
	var formctrlnm = ctrlnm;
	if( !IE ) return;
	formctrl = eval(ctrlnm);
	argdivnm = (divnm == null) ? ("") : (divnm);
	
	previewfile = formctrl.value.toLowerCase();
	var divtag, imgobj;
	var division = false;
	var available = (previewfile.indexOf(".gif") != -1) ? (true) : (false);
	if( !available ) available = (previewfile.indexOf(".jpg") != -1) ? (true) : (false);
	if( !available ) available = (previewfile.indexOf(".png") != -1) ? (true) : (false);
	if( !available ) {
		available = (previewfile.indexOf(".swf") != -1) ? (true) : (false);
		division = true;
	}
	if( formctrl.value != "" && available ) {
		var localurl = 'file:///' + formctrl.value;
		if( division && divnm != null && divnm != "" ) {
			imgobj = eval("document.images." + pvvnm);
		    imgobj.src = defpvvpath;
			divtag = ("<TABLE BORDER=0><TR><TD BGCOLOR=#EEE6D0>");
			divtag += ("<OBJECT CLASSID=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"\n");
			divtag += (" CODEBASE=\"http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0\"\n");
			divtag += (" ID=adforyouflash WIDTH=468 HEIGHT=60>\n");
			divtag += ("<PARAM NAME=movie VALUE=\"" + localurl + "\">\n");
			divtag += ("<PARAM NAME=quality VALUE=high>\n");
			divtag += ("<EMBED SRC=\"" + localurl + "\" QUALITY=high WIDTH=468 HEIGHT=60\n");
			divtag += (" TYPE=\"application/x-shockwave-flash\"\n");
			divtag += (" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\">\n");
			divtag += ("</EMBED>\n");
			divtag += ("</OBJECT>\n");
			divtag += ("</TD></TR>\n");
			divtag += ("<TR><TD ALIGN=CENTER BGCOLOR=#EEE6D0>");
			divtag += ("<B>Note :</B> This flash may be resized to 468x60 dimension on preview mode<BR>");
			divtag += ("and be flickering every second, But it is fine to proceed!");
			divtag += ("</TD></TR>\n" );
			divtag += ("</TABLE>\n");
			ap_setlyrtag( divnm, divtag );
		} else {
			imgobj = eval("document.images." + pvvnm);
		    imgobj.src = localurl;
		    if( divnm != null && divnm != "" ) ap_clrlyrtag( divnm, "" );
		}
	} else {
		imgobj = eval("document.images." + pvvnm);
		imgobj.src = defpvvpath;
	    if( divnm != null && divnm != "" ) ap_clrlyrtag( divnm, "" );
	}
	var fnnm = "ap_filenmpreview('" + formctrlnm + "','" + pvvnm + "','" + argdivnm + "','" + defpvvpath + "')";
	setTimeout( fnnm, 1000 );
}

function ap_getrealbytescount( src ) 
{
    var rawlen, reallen, pos, nASCII;
    rawlen = src.length;
    reallen = 0;
    for( pos = 0; pos < rawlen; pos++ ) {
        nASCII = src.charCodeAt( pos );
        if( nASCII > 0 && nASCII < 255 )
            reallen += 1; 
        else
            reallen += 2; 
    }
    return reallen;
}

function ap_checkctrlbytes( areactl, maxbytes ) 
{
	var nbytes = ap_getrealbytescount(areactl.value);
	if( (maxbytes > -1) && (nbytes > maxbytes) ) return false;
	return true;
}

function ap_showctrlbytes( areactl, showctl, maxbytes ) 
{
	var nbytes = ap_getrealbytescount(areactl.value);
	if( (maxbytes > -1) && (nbytes > maxbytes) ) return false;
	showctl.value = "" + nbytes;
	return true;
}

function ap_validfrmobj( frmnm, objnm ) 
{
	var frm = eval( frmnm );
	if( (typeof(frm) != "object") )
        return false;
	if( typeof(frm.name) != "string" ) //access forbidden
        return false;
    if( objnm == null ) 
        return true;
    var obj = eval( frmnm + "." + objnm );
    if( (typeof(obj) == "unknown") || (typeof(obj) == "undefined") ) {
        return false;
    }
	return true;
}

function ap_addfavorite( bookurl, markname ) 
{
	if( !IE ) {
		alert( "북마크 기능은 Internet Explorer에서만 지원됩니다. 죄송합니다.\r\n" + 
		       "Sorry, Add Bookmark is available only in Microsoft Internet Explorer browser!" );
		return( false );
	}
	window.external.AddFavorite( bookurl, markname );
	return( true );
}

function ap_rebuildpage( nexturl, acturl ) 
{
	with( document ) {
	write( "</HEAD><BODY>" );
	write( "<FORM NAME=redirform METHOD=POST ACTION='" + acturl + "'>" );
	write( "<INPUT TYPE=HIDDEN NAME=nxt VALUE='" + nexturl + "'" );
	write( "></FORM>" );
	write( "<SCR" + "IPT LANGUAGE=JavaScript>document.redirform.submit();</SCR" + "IPT>" );
	write( "</BODY></HTML>" );
	}
	document.close();
}

function ap_copyright() 
{
	var out = "";
	out += ("<BR>" );
	out += ("<IMG BORDER=0 SRC=http://md.shot-online.com/i/ref/horiz.jpg VSPACE=5><BR>\n");
	out += ("<TABLE BORDER=0 WIDTH=600 CELLSPACING=0 CELLPADDING=0>\n");
	out += ("<TR><TD><A TARGET=_blank HREF=http://www.onnet.co.kr><IMG BORDER=0 SRC=http://md.shot-online.com/i/ref/onnet.jpg></A><BR></TD>\n");
	out += ("<TD ALIGN=CENTER VALIGN=BOTTOM STYLE='font-size:6pt;font-family:굴림;line-height:18px'>\n" );
	out += ("<IMG BORDER=0 SRC=http://md.shot-online.com/i/ref/copy.jpg></A><BR>\n");
	out += ("<!--<IMG BORDER=0 SRC=http://md.shot-online.com/i/ref/refm.jpg USEMAP=#refmap>--><FONT SIZE=-1><A HREF=/hm/ros/privacy.asp><FONT COLOR=BLACK>개인정보 보호정책</FONT></A> | <A HREF=/mo/prl/ls.asp?cid=main&iid=3><FONT COLOR=BLACK>보도자료</FONT></A> | <A HREF=mailto:webmaster@shot-online.com?subject=운영자에게><FONT COLOR=BLACK>운영자에게</FONT></A> | <A HREF=mailto:webmaster@shot-online.com?subject=제휴문의><FONT COLOR=BLACK>제휴문의</FONT></A> | <A HREF=http://recruit.egloos.com TARGET=_NEW><FONT COLOR=BLACK>인재채용</FONT></A></FONT><BR></TD>\n");
	out += ("<TD ALIGN=CENTER><IMG BORDER=0 SRC=http://md.shot-online.com/i/ref/vert.jpg><BR></TD>\n");
	out += ("<TD ALIGN=CENTER>\n");
	out += ("<A TARGET=_blank HREF=http://www.sbsgolf.com>\n");
	out += ("<IMG BORDER=0 SRC=http://md.shot-online.com/i/ref/sbsgolf.jpg></A></TD></TR>\n");
	out += ("</TABLE>\n");
	out += ("<MAP NAME=\"refmap\">\n");
	out += ("<AREA SHAPE=\"RECT\" COORDS=\"0,0,108,18\" HREF=\"/hm/ros/privacy.asp\">\n");
	out += ("<AREA SHAPE=\"RECT\" COORDS=\"109,0,161,18\" HREF=\"/mo/prl/ls.asp?cid=main&iid=3\">\n");
	out += ("<AREA SHAPE=\"RECT\" COORDS=\"162,0,218,18\" HREF=\"mailto:webmaster@shot-online.com?subject=운영자에게\">\n");
	out += ("<AREA SHAPE=\"RECT\" COORDS=\"219,0,266,18\" HREF=\"mailto:webmaster@shot-online.com?subject=제휴문의\">\n");
	out += ("<AREA SHAPE=\"RECT\" COORDS=\"267,0,325,18\" HREF=\"/hm/ros/regsyschk.asp\">\n");
	out += ("</MAP>\n");
	out += ("<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>\n");
	out += ("<TR><TD><IMG WIDTH=516 HEIGHT=20 BORDER=0 SRC=http://md.shot-online.com/i/ref/copy2.jpg" );
	out += (" ALT='(주)온네트 | 서울특별시 강남구 삼성2동 142-39 태양빌딩 6층(135-876) | 전화: 02-552-5789(351) | 팩스 : 02-552-5766'></TD></TR>\n");
	out += ("</TABLE>\n");
	out += ("<BR>" );
    document.writeln( out );
}

function ap_dialogtitle( tit, fcolor, bcolor ) 
{
    var out = "";
	out += ("<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=0>\n");
	out += ("<TR>\n");
	out += ("<TD WIDTH=100% HEIGHT=32 BGCOLOR=#"+bcolor+">&nbsp;&nbsp;&nbsp;<IMG SRC='http://md.shot-online.com/i/ui/new/dot_top.gif' WIDTH=13 HEIGHT=9>\n");
	out += ("<FONT COLOR=#"+fcolor+"><B>"+tit+"</TD>\n");
	out += ("</TR>\n");
	out += ("<TR><TD BGCOLOR=#EBECEC HEIGHT=3 WIDTH=100%></TD></TR>\n");	
	out += ("</TABLE>\n");	
    document.writeln( out );
}

function ap_dialogtitle2( titletag ) 
{
    var out = "";
	out += ("<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=0>\n");
	out += ("<TR><TD VALIGN=TOP WIDTH=152 HEIGHT=37 BACKGROUND=http://md.shot-online.com/i/ui/win/top1.jpg>\n");
	out += ("<IMG WIDTH=152 HEIGHT=4 BORDER=0 SRC=http://md.shot-online.com/i/x.gif><BR>\n");
	out += ("<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>\n");
	out += ("<TR><TD><IMG WIDTH=12 HEIGHT=12 HSPACE=8 BORDER=0 SRC=http://md.shot-online.com/i/ui/win/topicn.gif></TD>\n");
	out += ("<TD>" + titletag + "</TD></TR>\n");
	out += ("</TABLE></TD>\n");
	out += ("<TD WIDTH=100% BACKGROUND=http://md.shot-online.com/i/ui/win/top2.jpg><BR></TD>\n");
	out += ("<TD BACKGROUND=http://md.shot-online.com/i/ui/win/top3.jpg>\n");
	out += ("<IMG WIDTH=69 HEIGHT=37 BORDER=0 SRC=http://md.shot-online.com/i/x.gif><BR></TD></TR>\n");
	out += ("</TABLE>\n");
    document.writeln( out );
}

function ap_dialogclose( closeaction ) 
{
    var out = "";
	out += ("<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=0>\n");
	out += ("<TR BGCOLOR=#D1CFCF><TD><IMG WIDTH=1 HEIGHT=1 BORDER=0 SRC=http://md.shot-online.com/i/x.gif></TD></TR>\n");
	out += ("<TR BGCOLOR=#F3F3F3><TD><IMG WIDTH=1 HEIGHT=1 BORDER=0 SRC=http://md.shot-online.com/i/x.gif></TD></TR>\n");
	out += ("<TR BGCOLOR=#E5E5E5><TD><IMG WIDTH=1 HEIGHT=1 BORDER=0 SRC=http://md.shot-online.com/i/x.gif></TD></TR>\n");
	out += ("</TABLE>\n");
	
	out += ("<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=0>\n");
	out += ("<TR BGCOLOR=#DEDEDE>\n");
	out += ("<TD><IMG WIDTH=4 HEIGHT=28 BORDER=0 SRC=http://md.shot-online.com/i/x.gif></TD>\n");
	out += ("<TD WIDTH=100% ALIGN=CENTER>\n");
	out += ("<A HREF=# ONCLICK=\"" + closeaction + "\">\n");
	out += ("<IMG WIDTH=65 HEIGHT=21 BORDER=0 SRC=http://md.shot-online.com/i/ui/btn/close.gif></A></TD></TR>\n");
	out += ("</TABLE>\n");
    document.writeln( out );
}

function ap_dialogcancel( cancelaction ) 
{
    var out = "";
	out += ("<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=0>\n");
	out += ("<TR BGCOLOR=#D1CFCF><TD><IMG WIDTH=1 HEIGHT=1 BORDER=0 SRC=http://md.shot-online.com/i/x.gif></TD></TR>\n");
	out += ("<TR BGCOLOR=#F3F3F3><TD><IMG WIDTH=1 HEIGHT=1 BORDER=0 SRC=http://md.shot-online.com/i/x.gif></TD></TR>\n");
	out += ("<TR BGCOLOR=#E5E5E5><TD><IMG WIDTH=1 HEIGHT=1 BORDER=0 SRC=http://md.shot-online.com/i/x.gif></TD></TR>\n");
	out += ("</TABLE>\n");
	
	out += ("<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=0>\n");
	out += ("<TR BGCOLOR=#DEDEDE>\n");
	out += ("<TD><IMG WIDTH=4 HEIGHT=28 BORDER=0 SRC=http://md.shot-online.com/i/x.gif></TD>\n");
	out += ("<TD WIDTH=100% ALIGN=CENTER>\n");
	out += ("<A HREF=# ONCLICK=\"" + cancelaction + "\">\n");
	out += ("<IMG WIDTH=65 HEIGHT=21 BORDER=0 SRC=http://md.shot-online.com/i/ui/btn/cancel.gif></A></TD></TR>\n");
	out += ("</TABLE>\n");
    document.writeln( out );
}

function ap_dialogalert( okaction ) 
{
    var out = "";
	out += ("<TABLE WIDTH=100% HEIGHT=40 BGCOLOR=#F3F3F3 BORDER=0 CELLSPACING=0 CELLPADDING=3 ALIGN=CENTER>\n");
	out += ("<TR ALIGN=CENTER><TD>\n");
	out += ("<A HREF=# ONCLICK=\"" + okaction + "\">\n");	
	out += ("<IMG SRC=http://md.shot-online.com/i/ui/new/ok.gif WIDTH=70 HEIGHT=19 BORDER=0></A></TD>\n");
	out += ("</TR>\n");
	out += ("</TABLE>\n");				    
    document.writeln( out );
}

function ap_dialogalert2( okaction ) 
{
    var out = "";
	out += ("<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=0>\n");
	out += ("<TR><TD BACKGROUND=http://md.shot-online.com/i/ui/win/bot1.jpg>\n");
	out += ("<IMG WIDTH=69 HEIGHT=48 BORDER=0 SRC=http://md.shot-online.com/i/x.gif><BR></TD>\n");
	out += ("<TD ALIGN=CENTER VALIGN=BOTTOM WIDTH=100% BACKGROUND=http://md.shot-online.com/i/ui/win/bot2.jpg>\n");
	out += ("<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>\n");
	out += ("<TR><TD><IMG WIDTH=83 HEIGHT=1 BORDER=0 SRC=http://md.shot-online.com/i/x.gif></TD>\n");
	out += ("<TD><A HREF=# ONCLICK=\"" + okaction + "\">\n");
	out += ("<IMG WIDTH=77 HEIGHT=33 BORDER=0 SRC=http://md.shot-online.com/i/ui/win/ok.jpg></A></TD></TR>\n");
	out += ("</TABLE></TD>\n");
	out += ("<TD BACKGROUND=http://md.shot-online.com/i/ui/win/bot3.jpg>\n");
	out += ("<IMG WIDTH=152 HEIGHT=48 BORDER=0 SRC=http://md.shot-online.com/i/x.gif><BR></TD></TR>\n");
	out += ("</TABLE>\n");
    document.writeln( out );
}

function ap_dialogconfirm( okaction, cancelaction ) 
{
    var out = "";
	out += ("<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=0>\n");
	out += ("<TR>\n");
	out += ("<TD WIDTH=380 HEIGHT=40 BGCOLOR=#F3F3F3>\n");

	out += ("<TABLE WIDTH=179 BORDER=0 CELLSPACING=0 CELLPADDING=3 ALIGN=CENTER>\n");
	out += ("<TR ALIGN=CENTER>\n");
	out += ("<TD WIDTH=85><A HREF=# ONCLICK=\"" + okaction + "\">\n");
	out += ("<IMG SRC=http://md.shot-online.com/i/ui/new/yes.gif WIDTH=76 HEIGHT=19 BORDER=0></A></TD>\n");
	out += ("<TD WIDTH=94><A HREF=# ONCLICK=\"" + cancelaction + "\">\n");
	out += ("<IMG SRC=http://md.shot-online.com/i/ui/new/no.gif WIDTH=76 HEIGHT=19 BORDER></A></TD>\n");
	out += ("</TR>\n");
	out += ("</TABLE>\n");
	out += ("</TD></TR>\n");
	out += ("<TABLE>\n");
    document.writeln( out );
}

function ap_dialogconfirm2( okaction, cancelaction ) 
{
    var out = "";

	out += ("<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=0>\n");
	out += ("<TR><TD BACKGROUND=http://md.shot-online.com/i/ui/win/bot1.jpg>\n");
	out += ("<IMG WIDTH=69 HEIGHT=48 BORDER=0 SRC=http://md.shot-online.com/i/x.gif><BR></TD>\n");
	out += ("<TD WIDTH=100% ALIGN=CENTER VALIGN=BOTTOM BACKGROUND=http://md.shot-online.com/i/ui/win/bot2.jpg>\n");
	out += ("<TABLE WIDTH=250 BORDER=0 CELLSPACING=0 CELLPADDING=0>\n");
	out += ("<TR><TD><IMG WIDTH=83 HEIGHT=1 BORDER=0 SRC=http://md.shot-online.com/i/x.gif></TD>\n");
	out += ("<TD WIDTH=90><A HREF=# ONCLICK=\"" + okaction + "\">\n");
	out += ("<IMG WIDTH=77 HEIGHT=33 BORDER=0 SRC=http://md.shot-online.com/i/ui/win/ok.jpg></A></TD>\n");
	out += ("<TD WIDTH=78><A HREF=# ONCLICK=\"" + cancelaction + "\">\n");
	out += ("<IMG WIDTH=77 HEIGHT=33 BORDER=0 SRC=http://md.shot-online.com/i/ui/win/cancel.jpg></A></TD></TR>\n");
	out += ("</TABLE></TD>\n");
	out += ("<TD BACKGROUND=http://md.shot-online.com/i/ui/win/bot3.jpg>\n");
	out += ("<IMG WIDTH=152 HEIGHT=48 BORDER=0 SRC=http://md.shot-online.com/i/x.gif><BR></TD></TR>\n");
	out += ("</TABLE>\n");
    document.writeln( out );
}

function ap_dialoginvite( okaction, cancelaction ) 
{
    var out = "";
	out += ("<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=0>\n");
	out += ("<TR BGCOLOR=#D1CFCF><TD><IMG WIDTH=1 HEIGHT=1 BORDER=0 SRC=http://md.shot-online.com/i/x.gif></TD></TR>\n");
	out += ("<TR BGCOLOR=#F3F3F3><TD><IMG WIDTH=1 HEIGHT=1 BORDER=0 SRC=http://md.shot-online.com/i/x.gif></TD></TR>\n");
	out += ("<TR BGCOLOR=#E5E5E5><TD><IMG WIDTH=1 HEIGHT=1 BORDER=0 SRC=http://md.shot-online.com/i/x.gif></TD></TR>\n");
	out += ("</TABLE>\n");
	
	out += ("<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=0>\n");
	out += ("<TR BGCOLOR=#DEDEDE>\n");
	out += ("<TD><IMG WIDTH=4 HEIGHT=28 BORDER=0 SRC=http://md.shot-online.com/i/x.gif></TD>\n");
	out += ("<TD WIDTH=100% ALIGN=CENTER>\n");
	out += ("<TABLE BORDER=0>\n");
	out += ("<TR><TD><A HREF=# ONCLICK=\"" + okaction + "\">\n");
	out += ("	<IMG WIDTH=65 HEIGHT=21 BORDER=0 SRC=http://md.shot-online.com/i/ui/btn/ack.gif></A></TD>\n");
	out += ("	<TD>&nbsp;&nbsp;</TD>\n");
	out += ("	<TD><A HREF=# ONCLICK=\"" + cancelaction + "\">\n");
	out += ("	<IMG WIDTH=65 HEIGHT=21 BORDER=0 SRC=http://md.shot-online.com/i/ui/btn/nck.gif></A></TD></TR>\n");
	out += ("</TABLE>\n");
	
	out += ("</TD></TR>\n");
	out += ("</TABLE>\n");
    document.writeln( out );
}


var openerobj = null;
if (typeof top.opener != "undefined" && typeof top.opener != "unknown") {
	openerobj = top.opener;
}
function shared_go_opener(gourl) {	
	if (openerobj == null) {
		return;
	}
	if (typeof openerobj != "object") {
		return;
	}
	if (typeof openerobj.name == "undefined" || typeof openerobj.name == "unknown") {
		return;
	}	
	openerobj.document.location.href = gourl;
}

function ap_fillinterval( form, actvdate, actvtime, exprdate, exprtime ) {
    actvdateYY = parseInt( ap_getoptionvalue(eval("form."+actvdate+"YY")), 10 );
    actvdateMM = parseInt( ap_getoptionvalue(eval("form."+actvdate+"MM")), 10 );
    if( actvdateMM < 10 ) actvdateMM = "0" + actvdateMM;
    actvdateDD = parseInt( ap_getoptionvalue(eval("form."+actvdate+"DD")), 10 );
    if( actvdateDD < 10 ) actvdateDD = "0" + actvdateDD;
    combined = "" + actvdateYY + actvdateMM + actvdateDD;
    eval("form."+actvdate+".value = combined" );

	timeHH = eval("form."+actvtime+"HH");
	actvtimeHH = parseInt( timeHH.value, 10 );
    if( !ap_validnum( timeHH, actvtimeHH, 0, 23 ) ) return( false );
    if( actvtimeHH == 0 ) actvtimeHH = "00";
    else if( actvtimeHH < 10 ) actvtimeHH = "0" + actvtimeHH;

	timeMM = eval("form."+actvtime+"MM");
	actvtimeMM = parseInt( timeMM.value, 10 );
    if( !ap_validnum( timeMM, actvtimeMM, 0, 59 ) ) return( false );
    if( actvtimeMM == 0 ) actvtimeMM = "00";
    else if( actvtimeMM < 10 ) actvtimeMM = "0" + actvtimeMM;

	timeSS = eval("form."+actvtime+"SS");
	actvtimeSS = parseInt( timeSS.value, 10 );
    if( !ap_validnum( timeSS, actvtimeSS, 0, 59 ) ) return( false );
    if( actvtimeSS == 0 ) actvtimeSS = "00";
    else if( actvtimeSS < 10 ) actvtimeSS = "0" + actvtimeSS;
    
    combined = "" + actvtimeHH + actvtimeMM + actvtimeSS;
    eval("form."+actvtime+".value = combined" );

    exprdateYY = parseInt( ap_getoptionvalue(eval("form."+exprdate+"YY")), 10 );
    exprdateMM = parseInt( ap_getoptionvalue(eval("form."+exprdate+"MM")), 10 );
    if( exprdateMM < 10 ) exprdateMM = "0" + exprdateMM;
    exprdateDD = parseInt( ap_getoptionvalue(eval("form."+exprdate+"DD")), 10 );
    if( exprdateDD < 10 ) exprdateDD = "0" + exprdateDD;
    combined = "" + exprdateYY + exprdateMM + exprdateDD;
    eval("form."+exprdate+".value = combined" );

	timeHH = eval("form."+exprtime+"HH");
	exprtimeHH = parseInt( timeHH.value, 10 );
    if( !ap_validnum( timeHH, exprtimeHH, 0, 23 ) ) return( false );
    if( exprtimeHH == 0 ) exprtimeHH = "00";
    else if( exprtimeHH < 10 ) exprtimeHH = "0" + exprtimeHH;

	timeMM = eval("form."+exprtime+"MM");
	exprtimeMM = parseInt( timeMM.value, 10 );
    if( !ap_validnum( timeMM, exprtimeMM, 0, 59 ) ) return( false );
    if( exprtimeMM == 0 ) exprtimeMM = "00";
    else if( exprtimeMM < 10 ) exprtimeMM = "0" + exprtimeMM;

	timeSS = eval("form."+exprtime+"SS");
	exprtimeSS = parseInt( timeSS.value, 10 );
    if( !ap_validnum( timeSS, exprtimeSS, 0, 59 ) ) return( false );
    if( exprtimeSS == 0 ) exprtimeSS = "00";
    else if( exprtimeSS < 10 ) exprtimeSS = "0" + exprtimeSS;
	
    combined = "" + exprtimeHH + exprtimeMM + exprtimeSS;
    eval("form."+exprtime+".value = combined" );
    
    begvalue = "";
    begvalue += eval("form."+actvdate+".value");
    begvalue += eval("form."+actvtime+".value");
    endvalue = "";
    endvalue += eval("form."+exprdate+".value");
    endvalue += eval("form."+exprtime+".value");
    
    if( begvalue >= endvalue ) {
        alert( "범위가 잘못 지정되어 있습니다. 수정하시기 바랍니다.\r\n" + 
               "Wrong interval, Please enter the proper value!" )
        return( false ); 
    }
    return( true ); 
}

function ap_manipulatetime(form, delegate, command) { 
	var timeHH, timeMM, timeSS;
	if( command == 0 ) {
		var clocknow = new Date();
		timeHH = clocknow.getHours();
		if( timeHH == 0 ) timeHH = "00";
		else if( timeHH < 10 ) timeHH = "0" + timeHH;
		timeMM = clocknow.getMinutes();
		if( timeMM == 0 ) timeMM = "00";
		else if( timeMM < 10 ) timeMM = "0" + timeMM;
		timeSS = clocknow.getSeconds()
		if( timeSS == 0 ) timeSS = "00";
		else if( timeSS < 10 ) timeSS = "0" + timeSS;
		clocknow = null;
	} else if( command == 1 ) {
		timeHH = "00";
		timeMM = "00";
		timeSS = "00";
	} else {
		timeHH = "23";
		timeMM = "59";
		timeSS = "59";
	}
    eval("form." + delegate + "HH.value = \"" + timeHH + "\"");
    eval("form." + delegate + "MM.value = \"" + timeMM + "\"");
    eval("form." + delegate + "SS.value = \"" + timeSS + "\"");
}

function ap_manipulateinterval( form, select, srcedate, destdate ) {
    srcedateYY = parseInt( ap_getoptionvalue(eval("form."+srcedate+"YY")), 10 );
    srcedateMM = parseInt( ap_getoptionvalue(eval("form."+srcedate+"MM")), 10 );
    srcedateDD = parseInt( ap_getoptionvalue(eval("form."+srcedate+"DD")), 10 );

    command = parseInt( ap_getoptionvalue(select), 10 );
    switch( command ) {
    case 1: ap_resetinterval( form, destdate, srcedateYY, srcedateMM, srcedateDD+  7); break;
    case 2: ap_resetinterval( form, destdate, srcedateYY, srcedateMM, srcedateDD+ 14); break;
    case 3: ap_resetinterval( form, destdate, srcedateYY, srcedateMM, srcedateDD+ 21); break;
    case 4: ap_resetinterval( form, destdate, srcedateYY, srcedateMM, srcedateDD+ 28); break;
    case 5: ap_resetinterval( form, destdate, srcedateYY, srcedateMM, srcedateDD+100); break;
    }
    //select.selectedIndex = 0;
}

function ap_resetinterval( form, targetdate, year, month, date ) {
	var newdate = new Date(year, month-1, date);
	year = parseInt( newdate.getFullYear(), 10 );
	month = parseInt( newdate.getMonth(), 10 );
	month++; //month starts from 0
	date = parseInt( newdate.getDate(), 10 );
	newdate = null;

	lastidx   = eval("form."+targetdate+"YY.options.length");
	firstyear = parseInt(eval("form."+targetdate+"YY.options[0].value"), 10);
	lastyear  = parseInt(eval("form."+targetdate+"YY.options["+(lastidx-1)+"].value"), 10);
	if( firstyear < year && year <= lastyear ) {
		gap = year - firstyear;
		eval("form."+targetdate+"YY.options["+gap+"].selected = true");
	}
	//alert( "year is " + year + " and month is " + month + " and date is " + date );
	eval("form."+targetdate+"MM.options["+(month-1)+"].selected = true");
	eval("form."+targetdate+"DD.options["+(date-1)+"].selected = true");
}

function fn_validsearch(form, hasdate) {
	if( !ap_validtext(form.val, 2, 30, true) ) return( false );
	if( hasdate && !isvalidsearchdate(form) ) return( false );
	return( true );
}

function isvalidsearchdate(form ) {
	var syy = form.syy.value;
	var smm = form.smm.value;
	var sdd = form.sdd.value;
	if (syy != "" && smm != "" && sdd != "" ) {
		chkdate = new Date( syy, smm - 1, sdd);
		tmpyy = chkdate.getYear();
		if ( tmpyy < 2000 ) tmpyy += 1900;
		tmpmm = chkdate.getMonth() + 1;
		tmpdd = chkdate.getDate();
		chkdate = null;
		if ( syy - tmpyy != 0 || smm - tmpmm != 0 || sdd - tmpdd != 0)
			return ( false );
		else
			return ( true );
	}
	return ( true );
}

function ap_selfndperiod( form, selctrl, syynm, smmnm, sddnm ) {
	var curdate = new Date();
	curyy = parseInt( curdate.getFullYear(), 10 );
	curmm = parseInt( curdate.getMonth(), 10 );
	curmm++; //month starts from 0
	curdd = parseInt( curdate.getDate(), 10 );
	curdate = null;
    curflt = ap_getoptionvalue(selctrl);
    switch( curflt ) {
    case "-1w": ap_setfndperiod( form, syynm, smmnm, sddnm, curyy, curmm, curdd- 7); break;
    case "-2w": ap_setfndperiod( form, syynm, smmnm, sddnm, curyy, curmm, curdd-14); break;
    case "-3w": ap_setfndperiod( form, syynm, smmnm, sddnm, curyy, curmm, curdd-21); break;
    case "-1m": ap_setfndperiod( form, syynm, smmnm, sddnm, curyy, curmm-1, curdd); break;
    case "-2m": ap_setfndperiod( form, syynm, smmnm, sddnm, curyy, curmm-2, curdd); break;
    case "-3m": ap_setfndperiod( form, syynm, smmnm, sddnm, curyy, curmm-3, curdd); break;
    case "-6m": ap_setfndperiod( form, syynm, smmnm, sddnm, curyy, curmm-6, curdd); break;
    case "-1y": ap_setfndperiod( form, syynm, smmnm, sddnm, curyy-1, curmm, curdd); break;
    case "-2y": ap_setfndperiod( form, syynm, smmnm, sddnm, curyy-2, curmm, curdd); break;
    default:
		toks = curflt.split( "/" );
		curyy = (toks.length == 3) ? (parseInt(toks[0], 10)) : (0);
		curmm = (toks.length == 3) ? (parseInt(toks[1], 10)) : (0);
		curdd = (toks.length == 3) ? (parseInt(toks[2], 10)) : (0);
		toks = null;
		chkdate = new Date( curyy, curmm - 1, curdd);
		tmpyy = chkdate.getFullYear();
		tmpmm = chkdate.getMonth() + 1;
		tmpdd = chkdate.getDate();
		chkdate = null;
		if( curyy == tmpyy && curmm == tmpmm && curdd == tmpdd ) {
		    ap_setfndperiod( form, syynm, smmnm, sddnm, curyy, curmm, curdd);
		}
		break;
    }
    //selctrl.selectedIndex = 0;
}

function ap_setfndperiod( form, syynm, smmnm, sddnm, year, month, day ) {
	var newdate = new Date(year, month-1, day);
	newyy = parseInt( newdate.getFullYear(), 10 );
	newmm = parseInt( newdate.getMonth(), 10 );
	newmm++; //month starts from 0
	newdd = parseInt( newdate.getDate(), 10 );
	newdate = null;

	lastidx   = eval("form."+syynm+".options.length");
	firstyear = parseInt(eval("form."+syynm+".options[0+1].value"), 10);
	lastyear  = parseInt(eval("form."+syynm+".options["+(lastidx-1)+"].value"), 10);
	if( firstyear <= newyy && newyy <= lastyear ) {
		gap = newyy - firstyear + 1;
		eval("form."+syynm+".options["+gap+"].selected = true");
	}
	//alert( "year is " + newyy + " and month is " + newmm + " and day is " + newdd );
	eval("form."+smmnm+".options["+(newmm-0)+"].selected = true");
	eval("form."+sddnm+".options["+(newdd-0)+"].selected = true");
}

function vw_confirm_optone( acturl ) { 
    var response = confirm( "본 자료의 설정을 변경하시겠습니까?\r\nAre you sure to change this option?" );
    if( response == false ) return( false );
    self.document.location.href = acturl;
    return( false )
}
	
function vw_confirm_rmone( acturl ) { 
    var response = confirm( "본 자료를 정말 삭제하시겠습니까?\r\nAre you sure to delete this record?" );
    if( response == false ) return( false );
    self.document.location.href = acturl;
    return( false )
}

function view_confirm_delete( acturl ) { 
    var response = confirm( "정말 삭제하시겠습니까?\r\nAre you sure to delete this record?" );
    if( response == true ) { self.document.location.href = "" + acturl; }
}


function vw_confirm_rmfml( acturl ) { 
    var response = confirm( "본 자료 및 본 자료와 관련된 항목을 모두 삭제하시겠습니까?\r\nAre you sure to delete this record and all its relevants ?" );
    if( response == false ) return( false );
    self.document.location.href = acturl;
    return( true )
}

function view_confirm_delall( acturl ) { 
    var response = confirm( "관련자료까지 모두 완전히 삭제하시겠습니까?\r\nAre you sure to delete this record and all related records?" );
    if( response == true ) { self.document.location.href = "" + acturl; } 
}


function fm_confirm_rmmx( form, ctrl, acturl ) {

    if( !ap_somethingchecked( form, ctrl ) ) return; //( false );
    checkedcount = ap_getcheckedcount( form, form.numgrp );
    var response = confirm( "정말로 선택된 자료를 모두 삭제하시겠습니까?\r\nAre you sure to delete all the selected records?" );
	if ( response == false ) return; //( false );
	form.action = acturl;
    form.submit();
	return; //( true );
}

function isValidDate(yyyy, mm, dd) {
	var checker = new Date(yyyy, mm-1, dd);

	var compute_yyyy = checker.getYear();
	var compute_mm = checker.getMonth() + 1;
	var compute_dd = checker.getDate();

	if ( compute_yyyy < 2000 ) compute_yyyy += 1900;
	if ( yyyy - compute_yyyy != 0 || mm - compute_mm != 0 || dd - compute_dd != 0 )
		return( false );
	return (true);
}


function search_member(thisform){
	var userid = ap_trim(thisform.userid.value);
	if( userid.length <= 0 ){
		alert("회원아이디를 입력해 주세요.");
		return( false );
	}
	thisform.submit();
}

function search_members(thisform){
	if( thisform.chkvst.checked == true ){
		if(!ap_validnumber(thisform.vst)){
			alert("클럽 방문횟수를 입력하세요.");
			thisform.vst.focus();
			return(false);
		}
	}

	if( thisform.chkday.checked == true ){
		if( !isValidDate(parseINT(thisform.stryy.value, 10), parseINT(thisform.strmm.value, 10), parseINT(thisform.strdd.value, 10)) ){
			alert("존재하지 않는 일자를 선택하셨습니다.\n다른 일자를 선택하세요.");
			thisform.stryy.focus();
			return(false);
		}
	}
	thisform.submit();
}


function wbx_search_members(thisform){
	if( !isValidDate(parseINT(thisform.stryy.value, 10), parseINT(thisform.strmm.value, 10), parseINT(thisform.strdd.value, 10)) ){
		alert("존재하지 않는 일자를 선택하셨습니다.\n다른 일자를 선택하세요.");
		thisform.stryy.focus();
		return(false);
	}
	thisform.submit();
}


var is_selected = false;
function multiToggle(form, chkobj){
	if(is_selected == false){
		ap_checkall(form, chkobj);
		document.tick.src = "http://md2.shot-online.com/zpro/bbs/chkon.gif";
		//document.tick2.src = "http://md2.shot-online.com/zpro/pub/checkoff.gif";		
		//document.cuexpelform1.tick.src = "http://md2.shot-online.com/zpro/newadmin/all_ch_off.gif";
		is_selected = true;
	}
	else{
		ap_uncheckall(form, chkobj);
		document.tick.src = "http://md2.shot-online.com/zpro/bbs/chkoff.gif";
		//document.tick1.src = "http://md2.shot-online.com/zpro/pub/checkon.gif";
		//document.cuexpelform1.tick.src = "http://md2.shot-online.com/zpro/newadmin/all_ch.gif";
		is_selected = false;
	}
}

function ap_checkboxes_runmv( form, ctrl, argnm, acturl ) { 
    if( !ap_somethingchecked( form, ctrl) ) return;
	var argset = "";
	var chkboxlen = ctrl.length;
	if( chkboxlen ) {
		for( var i = 0;i < chkboxlen; i++ ) {
			if( ctrl[i].checked == true ) 
			    argset += escape(ctrl[i].value) + ",";
		}
	} else {
		argset = escape(ctrl.value);
	}
  	winurl = acturl
  	if( winurl.indexOf("?") ) winurl += "&";
  	else winurl += "?";
  	winurl = winurl + argnm + "=" + argset;
	self.document.location.href = winurl;
	return( false );
}

/*function list_multi_delete( form, acturl ) {
	if(!form || !button) return;

	for(i=0;i<button.length;i++){
		if (button[i].checked == true && i != button.length-1 ) {
			if (Number(button[i].value) <  Number(button[i+1].value)) {
				alert("삭제할 수 없는 게시물을 포함하고 있습니다.");
				return;				
			}
		}
	}		
		
    if( !ap_somethingchecked( form ) ) return;
    var response = confirm( "정말로 선택된 게시물을 모두 삭제하시겠습니까?\r\n" + 
                            "Are you sure to delete all the selected records?" );
    if( response == false ) return;

	form.action = acturl;     
    form.submit();
    return; 
}*/

function list_multi_view( form, acturl ) {
	if(!form || !button) return;
	
    if( !ap_somethingchecked( form ) ) return;
	form.action = acturl;     
     form.submit();
    return; 
}


/*function menu_content_process(form) {   
    if (form.emode.value == "e")	{ // editor mode ..		
    
		if (form.edittype.checked == true)
			form.dattxt.value = idEdit.innerText
		else
			form.dattxt.value = idEdit.innerHTML
				
		if (form.dattxt.value == "")
		{
	    	alert( "必须填写事项.请输入\r\n" + 
	           "All blank characters are assumed NOTHING, Please reenter!" );
	           
			edit_setFocus()
			return false
		}				

		if (form.dattxt.length > 102400) {
			alert( "본 항목은 최대 102400자 이하이어야 합니다. 현재 (" + form.dattxt.length + ")자 입니다.\r\n" + 
               "Value must be smaller or equal to 102400 in length vs (" + form.dattxt.length + "), Please shorten the value!" );
			return( false );
		}
	}
    else {
    	if( !ap_validtext(form.dattxt, 1, 102400, true) ) return( false );
    }
    return( true );
}
*/

function ap_validatedays(form, yyctrl, mmctrl, ddctrl) {
	if( !form || !yyctrl || !mmctrl || !ddctrl ) 
		return( false );
	var i;
	for(i = 0; i <yyctrl.length; i++ ) {
		if( yyctrl[i].selected ) {
			 thisyy = parseInt( yyctrl[i].value, 10 );
			 break;
		}
	}
	for(i = 0; i <mmctrl.length; i++ ) {
		if( mmctrl[i].selected ) {
			 thismn = parseInt( mmctrl[i].value, 10 );
			 break;
		}	
	}
	if( isNaN(thismn) ) return( false );

	var newdate = new Date(thisyy, thismn, 1);
	newdate.setDate(newdate.getDate() - 1);
	newdatelastday = newdate.getDate();
	newdate = null;

	ddctrl.length = 0;
	for(i = 0; i < newdatelastday; i++ ) ddctrl.options[i] = new Option(i+1,i+1,true);
	return( true );
}

function cmt_insert(form ) {
	if(!form) return( false );
    if( !ap_validtext(form.dattxt, 1, 126, true) ) return( false );
    return( true );
}


/*function shared_view_nothing(width) {
	out = out + "<TABLE WIDTH=770 BORDER=0 CELLSPACING=1 CELLPADDING=1"
	out = out + "<TR><TD HEIGHT=320 ALIGN=CENTER><FONT CLASS=distxt>"
	out = out + "자료가 삭제되었거나 존재하지 않는 것으로 보입니다."
	out = out + "</TD></TR>"
	out = out + "</TABLE>"
}
*/

function go_direct( btnctrl ) {
    var index = btnctrl.selectedIndex;
    var code = btnctrl.options[index].value;
    if( index > 0 && code.length > 0 && code != "0" ) {
        self.document.location.href = code; 
    }
}

function ap_setuplauncher() 
{
	if( IE5 ) {
		var out = "";
		out += ("<OBJECT ID=\"ENLaunch\" WIDTH=0 HEIGHT=0 CLASSID=\"CLSID:8284A6F2-146C-4B51-9C88-C60FD3E4494D\"");
		out += (" CODEBASE=\"http://ftp.shot-online.com/EnLaunch/EnLaunch.cab#version=1,0,3,4\">");
		out += ("</OBJECT>");
		out += ("<SCR" + "IPT LANGUAGE=VBScr" + "ipt>\n");
		out += ("ON ERROR RESUME NEXT\n");
		out += ("IF NOT IsObject(CreateObject(\"EnLaunch.ENTICA.1\")) THEN\n");
		out += ("ap_setuplauncherhelp()\n");
		out += ("END IF\n");
		out += ("</SCR" + "IPT>\n");
		document.writeln( out );
	} else {
		ap_newwin( "http://www.shot-online.com/ap/shm/oldbrowser.asp", "oldbrowser", 320, 240, 3, false, false, false );
	}
}

function ap_setuplauncherhelp() 
{
}

function ap_launcherinstalled( gamenm )
{
	if( (typeof(eval("document." + gamenm)) == "undefined") || 
		(typeof(eval("document." + gamenm)) == "unknown") )
		return( false );
	if( (typeof(eval("document." + gamenm + ".readyState")) == "undefined") ||
		(typeof(eval("document." + gamenm + ".readyState")) == "unknown") )
		return( false );
	if( eval("document." + gamenm + ".readyState") != 4 )
		return( false );
	return true;
}

function ap_resetmaxqty( a_maxqty, qtyctl, chkctl ) {
	if( a_maxqty == -1 ) {
		chkctl.checked = true;
		qtyctl.value = "-1";
		qtyctl.readOnly = true;
	} else {
		chkctl.checked = false;
		qtyctl.value = "" + a_maxqty;
		qtyctl.readOnly = false;
	}
}
	
function ap_togglemaxqty( qtyctl, chkctl ) {
	qtyctl.readOnly = !qtyctl.readOnly;
	if( chkctl.checked ) qtyctl.value = "-1";
}

function ap_toggleexprtm( form ) {
	/*
	form.exprtm.readOnly = !form.exprtm.readOnly;
	if(form.expchk.checked) 
		form.exprtm.value = "0";
	*/
}

/*function ap_multi_runmv( form, ctrl, acturl ) { 
    if( !ap_somethingchecked( form, ctrl) ) return( false );
    var response = confirm( "정말 선택된 자료를 삭제하시겠습니까?" );
    if( response == false ) return( false );
	form.action = acturl;
	form.submit();
    return( false );
}

function ap_multi_rmav( acturl ) { 
    var response = confirm( "정말 모두 삭제하시겠습니까?" );
    if( response == false ) return( false );
    self.document.location.href = acturl;
    return( true );
}*/

function ap_openp2pwin( winurl ) {
	ap_newwin( winurl, "wnd_"+ap_random(), 320, 240, 3, false, false, false );
}

function ap_automovefocus(len, srcctl, tgtctl){
	if (srcctl.value.length >= len) tgtctl.focus();
}

function ap_getagefromssn(a_usrssn1, a_usrssn2) {
	var ssnyy;

	var ssngdr = a_usrssn2.substring(0,1);
	switch (ssngdr) {
	case "1": ssnyy = "19" + a_usrssn1.substring(0,2); break;
	case "2": ssnyy = "19" + a_usrssn1.substring(0,2); break;
	case "3": ssnyy = "20" + a_usrssn1.substring(0,2); break;
	case "4": ssnyy = "20" + a_usrssn1.substring(0,2); break;
	default: return 0;
	}
	var today = new Date();
	var ssndate = new Date(ssnyy, Number(a_usrssn1.substring(2,4))-1, a_usrssn1.substring(4,6));
	var ssnage = today.getFullYear() - ssndate.getFullYear();
	if( today.getMonth() < ssndate.getMonth() || 
	    (today.getMonth() == ssndate.getMonth() && today.getDate() < ssndate.getDate()) )
		ssnage = ssnage - 1;
	today = null;
	return( ssnage );
}

function ap_getbrtfromssn( a_usrssn1, a_usrssn2 ) {
	var brtyy;
	var gdrbit = a_usrssn2.substring(0,1);
	switch( gdrbit ) {
	case "1": brtyy = "19" + a_usrssn1.substring(0,2); break;
	case "2": brtyy = "19" + a_usrssn1.substring(0,2); break;
	case "3": brtyy = "20" + a_usrssn1.substring(0,2); break;
	case "4": brtyy = "20" + a_usrssn1.substring(0,2); break;
	default : return "";
	}
	return brtyy + "-" + a_usrssn1.substring(2,4) + "-" + a_usrssn1.substring(4,6);
}

function view_specialtag(a_datext,a_datsrc,a_datwsz,a_dathsz) {
    if ( a_datext == "asf" && IE) {
       with( document ) {
	     writeln("<OBJECT ID=MediaPlayer WIDTH=" + a_datwsz + " HEIGHT=" + a_dathsz + " CLASSID=CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95 STANDBY=\"Loading Windows Media Player components...\" TYPE=application/x-oleobject>");
         writeln("  <PARAM NAME=FileName VALUE=" + a_datsrc + ">");
         writeln("  <PARAM NAME=ShowControls VALUE=True>"); 
         writeln("  <PARAM NAME=AutoRewind VALUE=True>"); 
         writeln("  <PARAM NAME=AutoStart VALUE=True>");
         writeln("  <EMBED TYPE=application/x-mplayer2 SRC=" + a_datsrc + " NAME=MediaPlayer WIDTH=" + a_datwsz + " HEIGHT=" + a_dathsz + "></EMBED>"); 
	     writeln("</OBJECT>");	     
	     }
	   }
    else if( a_datext == "swf" ) {
       with( document ) {
         writeln("<object classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,30,0 width=" + a_datwsz + " height=" + a_dathsz + ">");
         writeln("  <param name=movie value=" + a_datsrc + ">");
         writeln("  <param name=quality value=high>");
         writeln("   <embed src=" + a_datsrc + " quality=high pluginspage=http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash type=application/x-shockwave-flash width=" + a_datwsz + " height=" + a_dathsz + ">");
         writeln("   </embed>"); 
         writeln("</object>");
         }
    }    
}    

//주민번호체크
function check_number(jm_bh1, jm_bh2)
{
	var tot=0, result=0, re=0, se_arg=0;
	var chk_num="";

	chk_jm_bh = jm_bh1 + jm_bh2;
	if( chk_jm_bh.length != 13 )
	{
		return false;
	}
	else
	{
		for( var i=0; i < 12; i++ )
		{
			if( isNaN(chk_jm_bh.substr(i, 1)) )
			{
				return false;
			}
			se_arg = i;
			if (i >= 8) se_arg = i - 8;
			tot = tot + Number(chk_jm_bh.substr(i, 1)) * (se_arg + 2)
		}
		if( chk_num != "err" )
		{
			re = tot % 11;
			result = 11 - re;
			if( result >= 10 )
			{
				result = result - 10;
			}
			if( result != Number(chk_jm_bh.substr(12, 1)) )
			{
				return false;
			}
			if( (Number(chk_jm_bh.substr(6, 1)) < 1) || (Number(chk_jm_bh.substr(6, 1)) > 2) )
			{
				return false;
			}
		}
	}
	return true;
}

function validnumstr(str)
{
	for(j=0; j < str.length; j++) if(!validnum(str.charAt(j))) return false;
	return true;
}



//문자 제한 함수
function ap_validkey2( ctrl, minimum, maximum ) 
{
    var thisvalue = ctrl.value;
    var exactcount = 0;
    var unacceptablekeys = " `~!@#$%^&*()+|\\=[]{};':\",./<>?";
	if( (minimum > -1) && (ap_isnothing(ctrl.value)) ) {
        alert( "必须填写事项.请输入" );
        ctrl.focus();
	    return( false );
	}

    /*exactcount = ap_strlen( ctrl.value, unacceptablekeys );
    if( (minimum > -1) && (exactcount < minimum) ) {
        alert( "최소 " + minimum + "자 이상으로 입력하세요.");
        ctrl.focus();
        return( false );
    }

	if (cal_byteS(ctrl.value,maximum))
	{
		alert("최대 (" + maximum + ")Byte 이하로 입력하세요.");
		ctrl.focus();
		return( false );
	}*/
	
	return( true );
}
 

//-->
