// ÆË¾÷Ã¢ ¶ç¿ì±â
function PopUpWindow(Url,windowName,Width,Height,scroll,resize){
   if((scroll==null) || (scroll=="")){
	   scroll = "no";
   }
   if((resize==null) || (resize=="")){
	   resize = "no";
   }
   var win = window.open(Url,windowName,"toolbar=no,location=no,directory=no,status=yes,menubar=no,scrollbars="+ scroll +",resizable=" + resize + ",top=200,left=350,width="+ Width +",height="+ Height);
   win.focus();
}

function calPopUpWindow(Url,windowName,Width,Height,scroll,resize,nYear,nMonth,nDay){
   if((scroll==null) || (scroll=="")){
	   scroll = "no";
   }
   if((resize==null) || (resize=="")){
	   resize = "no";
   }
   var pixUrl = Url + "?nYear=" + nYear + "&nMonth=" + nMonth + "&nDay=" + nDay;
   var win = window.open(pixUrl,windowName,"toolbar=no,location=no,directory=no,status=yes,menubar=no,scrollbars="+ scroll +",resizable=" + resize + ",top=200,left=350,width="+ Width +",height="+ Height);
   win.focus();
}

// Select Box Selected True
function autoSelectBox(sTxt,sObj) {
	var chk = false;		
	
	for(i=0;i<sObj.options.length;i++) {
		if(sTxt == sObj.options[i].value)
		{
			sObj.selectedIndex = i;
			chk = true;
		}
		if(chk) break;
	}    
}

// * Æû³×ÀÓ ÇÊ¿ä ¾øÀÌ select, checkbox, radio ¸¦ ¼±ÅÃÇÕ´Ï´Ù.
// select_input("input³×ÀÓ","input°ª")
// * checkbox ÀÏ °æ¿ì name °ú value °¡ ÀÏÄ¡ÇØ¾ß Ã¼Å© µË´Ï´Ù.

function select_input(input_name,input_value) {
    for ( i = 0 ; i < document.forms.length; i ++ ) {
        for ( j = 0 ; j < document.forms[i].elements.length; j++) {
            with(document.forms[i].elements[j]) {
                if(name == input_name) {
                    if( value == input_value) { checked=true; }
                        else if(type!='radio' && type != 'checkbox') { value=input_value; }
                }
            }
        }
    }
}

function select_input2(form_name,input_name,input_value) {
    form_name = eval("document."+form_name);
    for ( j = 0 ; j < form_name.elements.length; j++) {
        with(form_name.elements[j]) {
            if(name == input_name) {
                if( value == input_value) { checked=true; }
                    else if(type!='radio' && type != 'checkbox') { value=input_value; }
            }
        }
    }
}