function bluring(){ 
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus(); 
} 
document.onfocusin=bluring; 

function ShowFlash(obj,strMediaURL,obj_width,obj_height)
{
	var myObjectElement = document.createElement('<embed src="' + strMediaURL + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + obj_width + '" height="' + obj_height + '"></embed>');
	obj.appendChild(myObjectElement);
}

function ShowFlash2(obj,strMediaURL,obj_width,obj_height)
{
	var myObjectElement = document.createElement('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="' + obj_width + '" height="' + obj_height + '"><embed src="' + strMediaURL + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + obj_width + '" height="' + obj_height + '"></embed></object>');
  
	var myParamElement1 = document.createElement('<param name="movie" value="' + strMediaURL + '">');  
	var myParamElement2 = document.createElement('<param name="quality" value="high">');  
	var myParamElement3 = document.createElement('<param name="wmode" value="transparent">');  
	//var myObjectElement1 = document.createElement('<embed src="' + strMediaURL + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + obj_width + '" height="' + obj_height + '"></embed>');
	
	myObjectElement.appendChild(myParamElement1);
	myObjectElement.appendChild(myParamElement2);
	myObjectElement.appendChild(myParamElement3);
	//myObjectElement.appendChild(myObjectElement1);
	
	obj.appendChild(myObjectElement);
}
	function ready() {
		alert("ÁØºñÁßÀÔ´Ï´Ù.");
	}
function goto_url20(url,tg,pre_url,txt1,txt2,txt3,txt4,txt5,txt6,txt7,txt8,txt9,txt10,txt11,txt12,txt13,txt14,txt15,txt16,txt17,txt18,txt19,txt20) {
	if (pre_url.length > 0) {
		document.form20.pre_url.value = pre_url;
	}
	else {
		document.form20.pre_url.value = window.location;
	}
	
	if (txt1 == '-') {
		document.form20.txt1.value = '';
	}else if (txt1.length > 0) {
		document.form20.txt1.value = txt1;
	}
	
	if (txt2 == '-') {
		document.form20.txt2.value = '';
	}else if (txt2.length > 0) {
		document.form20.txt2.value = txt2;
	}
		
	if (txt3 == '-') {
		document.form20.txt3.value = '';
	}else if (txt3.length > 0) {
		document.form20.txt3.value = txt3;
	}
	
	if (txt4 == '-') {
		document.form20.txt4.value = '';
	}else if (txt4.length > 0) {
		document.form20.txt4.value = txt4;
	}
	
	if (txt5 == '-') {
		document.form20.txt5.value = '';
	}else if (txt5.length > 0) {
		document.form20.txt5.value = txt5;
	}
	
	if (txt6 == '-') {
		document.form20.txt6.value = '';
	}else if (txt6.length > 0) {
		document.form20.txt6.value = txt6;
	}
	
	if (txt7 == '-') {
		document.form20.txt7.value = '';
	}else if (txt7.length > 0) {
		document.form20.txt7.value = txt7;
	}
	
	if (txt8 == '-') {
		document.form20.txt8.value = '';
	}else if (txt8.length > 0) {
		document.form20.txt8.value = txt8;
	}
	
	if (txt9 == '-') {
		document.form20.txt9.value = '';
	}else if (txt9.length > 0) {
		document.form20.txt9.value = txt9;
	}
	
	if (txt10 == '-') {
		document.form20.txt10.value = '';
	}else if (txt10.length > 0) {
		document.form20.txt10.value = txt10;
	}
	
	if (txt11 == '-') {
		document.form20.txt11.value = '';
	}else if (txt11.length > 0) {
		document.form20.txt11.value = txt11;
	}
	
	if (txt12 == '-') {
		document.form20.txt12.value = '';
	}else if (txt12.length > 0) {
		document.form20.txt12.value = txt12;
	}
	
	if (txt13 == '-') {
		document.form20.txt13.value = '';
	}else if (txt13.length > 0) {
		document.form20.txt13.value = txt13;
	}
	
	if (txt14 == '-') {
		document.form20.txt14.value = '';
	}else if (txt14.length > 0) {
		document.form20.txt14.value = txt14;
	}
	
	if (txt15 == '-') {
		document.form20.txt15.value = '';
	}else if (txt15.length > 0) {
		document.form20.txt15.value = txt15;
	}
	
	if (txt16 == '-') {
		document.form20.txt16.value = '';
	}else if (txt16.length > 0) {
		document.form20.txt16.value = txt16;
	}
	
	if (txt17 == '-') {
		document.form20.txt17.value = '';
	}else if (txt17.length > 0) {
		document.form20.txt17.value = txt17;
	}
	
	if (txt18 == '-') {
		document.form20.txt18.value = '';
	}else if (txt18.length > 0) {
		document.form20.txt18.value = txt18;
	}
	
	if (txt19 == '-') {
		document.form20.txt19.value = '';
	}else if (txt19.length > 0) {
		document.form20.txt19.value = txt19;
	}
	
	if (txt20 == '-') {
		document.form20.txt20.value = '';
	}else if (txt20.length > 0) {
		document.form20.txt20.value = txt20;
	}
	
	if (tg.length > 0) {
		document.form20.target = tg;
	}
	document.form20.action = url;
	document.form20.submit();
}

function check_len(val,len,obj)
{
	if (val.length >= len)
	{
		//alert(val);
		eval(obj + '.focus()');
	}
}

function checkemail(str){
	var filter=/^(\w+(?:\.\w+)*)@((?:\w+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;

	if (filter.test(str)) {
		testresults = true;
	}else{
		testresults = false;
	}
	
	return (testresults);
}

function isEmail(str) {
	var supported = 0;
	if (window.RegExp) {
		var tempStr = "a";
		var tempReg = new RegExp(tempStr);
		if (tempReg.test(tempStr)) supported = 1;
	}
	if (!supported) 
		return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
	var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
	var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
	return (!r1.test(str) && r2.test(str));
}

function comp_chk(no) {
    var strNumb = no;
    if (strNumb.length != 10)
    {
       return false;
    }
    
    sumMod  =   0;
    sumMod  +=  parseInt(strNumb.substring(0,1));
    sumMod  +=  parseInt(strNumb.substring(1,2)) * 3 % 10;
    sumMod  +=  parseInt(strNumb.substring(2,3)) * 7 % 10;
    sumMod  +=  parseInt(strNumb.substring(3,4)) * 1 % 10;
    sumMod  +=  parseInt(strNumb.substring(4,5)) * 3 % 10;
    sumMod  +=  parseInt(strNumb.substring(5,6)) * 7 % 10;
    sumMod  +=  parseInt(strNumb.substring(6,7)) * 1 % 10;
    sumMod  +=  parseInt(strNumb.substring(7,8)) * 3 % 10;
    sumMod  +=  Math.floor(parseInt(strNumb.substring(8,9)) * 5 / 10);
    sumMod  +=  parseInt(strNumb.substring(8,9)) * 5 % 10;
    sumMod  +=  parseInt(strNumb.substring(9,10));
    
    if (sumMod % 10  !=  0)
    {
       return false;
    }
       return true;
    
}

function jumin_chk(no){

	var cust_no1 = no.substring(0,6);
	var cust_no2 = no.substring(6,13);
	
	//alert(cust_no1 + " " + cust_no2);
	
	if (cust_no1.length != 6){
		return false;
	}
	else if (cust_no2.length != 7){
		return false;
	}
	else {
		
		var digit=0
			
		for (var i=0;i<cust_no1.length;i++){
			var str_dig=cust_no1.substring(i,i+1);
			if (str_dig<'0' || str_dig>'9'){ 
				digit=digit+1 
			}
		}

	    if ((cust_no1 == '') || ( digit != 0 )){
			return false;
		}

			
		if (cust_no1.substring(2,3) > 1){
			return false;
		}

		if (cust_no1.substring(4,5) > 3){
			return false;
		} 

		if (cust_no2.substring(0,1) > 4 || cust_no2.substring(0,1) == 0){
			return false;
		}
			
		var a1=cust_no1.substring(0,1)
		var a2=cust_no1.substring(1,2)
		var a3=cust_no1.substring(2,3)
		var a4=cust_no1.substring(3,4)
		var a5=cust_no1.substring(4,5)
		var a6=cust_no1.substring(5,6)
         
		var check_digit=a1*2+a2*3+a3*4+a4*5+a5*6+a6*7

		var b1=cust_no2.substring(0,1)
		var b2=cust_no2.substring(1,2)
		var b3=cust_no2.substring(2,3)
		var b4=cust_no2.substring(3,4)
		var b5=cust_no2.substring(4,5)
		var b6=cust_no2.substring(5,6)
		var b7=cust_no2.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){
			return false;
		}
		else {
			return true;
		}
			

	}
			
}

function allblur() { 
	for (i = 0; i < document.links.length; i++) 
		document.links[i].onfocus = document.links[i].blur; 
}

function open_zip(html){
	open(html,'','top=0,left=0,toolbar=0,location=0,directries=0,status=0,menubar=0,scrollbars=0,resize=no,width=520,height=400');
}

function zoom_win(t){
	var option = "toolbar=no,menubar=no,status=no,scrollbars=no,resizable=yes,width=10,height=10,left=0,top=0"
	window.open(t,'t' ,option);
}

function img_del(cd, seq, path, img, tb, fld_cd, fld_seq, fld) {
		
	var ok = confirm("µî·ÏµÈ ÆÄÀÏÀ» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?");
	
	if(ok){
		parent.frmexec.location.href = '../include/image_delete.asp?cd='+cd+'&seq='+seq+'&path='+path+'&img='+img+'&tb='+tb+'&fld_cd='+fld_cd+'&fld_seq='+fld_seq+'&fld='+fld;
	}

}

function openBrWin(theURL,winName,features) { //v2.0
	window.open(theURL,winName,features);
}

function goto_open20(url,winName,opt,go_url,pre_url,txt1,txt2,txt3,txt4,txt5,txt6,txt7,txt8,txt9,txt10,txt11,txt12,txt13,txt14,txt15,txt16,txt17,txt18,txt19,txt20) {
	if (go_url.length > 0) {
	} else {
		var g_url = window.location + '?';
		var g_url_arr = g_url.split('?');
		go_url = g_url_arr[0];
	}
	
	if (pre_url.length > 0) {
	} else {
		var p_url = window.location + '?';
		var p_url_arr = p_url.split('?');
		pre_url = p_url_arr[0];
	}
	
	if (txt1 == '-') {
		txt1 = '';
	}
	else if (txt1 == '') {
		txt1 = document.form20.txt1.value;
	}
	
	if (txt2 == '-') {
		txt2 = '';
	}
	else if (txt2 == '') {
		txt2 = document.form20.txt2.value;
	}
		
	if (txt3 == '-') {
		txt3 = '';
	}
	else if (txt3 == '') {
		txt3 = document.form20.txt3.value;
	}
	
	if (txt4 == '-') {
		txt4 = '';
	}
	else if (txt4 == '') {
		txt4 = document.form20.txt4.value;
	}
	
	if (txt5 == '-') {
		txt5 = '';
	}
	else if (txt5 == '') {
		txt5 = document.form20.txt5.value;
	}
	
	if (txt6 == '-') {
		txt6 = '';
	}
	else if (txt6 == '') {
		txt6 = document.form20.txt6.value;
	}
	
	if (txt7 == '-') {
		txt7 = '';
	}
	else if (txt7 == '') {
		txt7 = document.form20.txt7.value;
	}
	
	if (txt8 == '-') {
		txt8 = '';
	}
	else if (txt8 == '') {
		txt8 = document.form20.txt8.value;
	}
	
	if (txt9 == '-') {
		txt9 = '';
	}
	else if (txt9 == '') {
		txt9 = document.form20.txt9.value;
	}
	
	if (txt10 == '-') {
		txt10 = '';
	}
	else if (txt10 == '') {
		txt10 = document.form20.txt10.value;
	}
	
	if (txt11 == '-') {
		txt11 = '';
	}
	else if (txt11 == '') {
		txt11 = document.form20.txt11.value;
	}
	
	if (txt12 == '-') {
		txt12 = '';
	}
	else if (txt12 == '') {
		txt12 = document.form20.txt12.value;
	}
	
	if (txt13 == '-') {
		txt13 = '';
	}
	else if (txt13 == '') {
		txt13 = document.form20.txt13.value;
	}
	
	if (txt14 == '-') {
		txt14 = '';
	}
	else if (txt14 == '') {
		txt14 = document.form20.txt14.value;
	}
	
	if (txt15 == '-') {
		txt15 = '';
	}
	else if (txt15 == '') {
		txt15 = document.form20.txt15.value;
	}
	
	if (txt16 == '-') {
		txt16 = '';
	}
	else if (txt16 == '') {
		txt16 = document.form20.txt16.value;
	}
	
	if (txt17 == '-') {
		txt17 = '';
	}
	else if (txt17 == '') {
		txt17 = document.form20.txt17.value;
	}
	
	if (txt18 == '-') {
		txt18 = '';
	}
	else if (txt18 == '') {
		txt18 = document.form20.txt18.value;
	}
	
	if (txt19 == '-') {
		txt19 = '';
	}
	else if (txt19 == '') {
		txt19 = document.form20.txt19.value;
	}
	
	if (txt20 == '-') {
		txt20 = '';
	}
	else if (txt20 == '') {
		txt20 = document.form20.txt20.value;
	}
	
	var option = 'toolbar=no,menubar=no,status=no,resizable=no,left=0,top=0'+opt;
	var full_url = url+'?go_url='+go_url+'&pre_url='+pre_url+'&txt1='+txt1+'&txt2='+txt2+'&txt3='+txt3+'&txt4='+txt4+'&txt5='+txt5+'&txt6='+txt6+'&txt7='+txt7+'&txt8='+txt8+'&txt9='+txt9+'&txt10='+txt10+'&txt11='+txt11+'&txt12='+txt12+'&txt13='+txt13+'&txt14='+txt14+'&txt15='+txt15+'&txt16='+txt16+'&txt17='+txt17+'&txt18='+txt18+'&txt19='+txt19+'&txt20='+txt20;
	window.open(full_url,winName,option);
}

function goto_opener20(url,frm,pre_url,txt1,txt2,txt3,txt4,txt5,txt6,txt7,txt8,txt9,txt10,txt11,txt12,txt13,txt14,txt15,txt16,txt17,txt18,txt19,txt20) {
	if (pre_url.length > 0) {
	} else {
		pre_url = eval('document.'+frm+'.pre_url.value');
	}
	
	if (txt1 == '-') {
		txt1 = '';
	}
	else if (txt1 == '') {
		txt1 = eval('document.'+frm+'.txt1.value');
	}
	
	if (txt2 == '-') {
		txt2 = '';
	}
	else if (txt2 == '') {
		txt2 = eval('document.'+frm+'.txt2.value');
	}
		
	if (txt3 == '-') {
		txt3 = '';
	}
	else if (txt3 == '') {
		txt3 = eval('document.'+frm+'.txt3.value');
	}
	
	if (txt4 == '-') {
		txt4 = '';
	}
	else if (txt4 == '') {
		txt4 = eval('document.'+frm+'.txt4.value');
	}
	
	if (txt5 == '-') {
		txt5 = '';
	}
	else if (txt5 == '') {
		txt5 = eval('document.'+frm+'.txt5.value');
	}
	
	if (txt6 == '-') {
		txt6 = '';
	}
	else if (txt6 == '') {
		txt6 = eval('document.'+frm+'.txt6.value');
	}
	
	if (txt7 == '-') {
		txt7 = '';
	}
	else if (txt7 == '') {
		txt7 = eval('document.'+frm+'.txt7.value');
	}
	
	if (txt8 == '-') {
		txt8 = '';
	}
	else if (txt8 == '') {
		txt8 = eval('document.'+frm+'.txt8.value');
	}
	
	if (txt9 == '-') {
		txt9 = '';
	}
	else if (txt9 == '') {
		txt9 = eval('document.'+frm+'.txt9.value');
	}
	
	if (txt10 == '-') {
		txt10 = '';
	}
	else if (txt10 == '') {
		txt10 = eval('document.'+frm+'.txt10.value');
	}
	
	if (txt11 == '-') {
		txt11 = '';
	}
	else if (txt11 == '') {
		txt11 = eval('document.'+frm+'.txt11.value');
	}
	
	if (txt12 == '-') {
		txt12 = '';
	}
	else if (txt12 == '') {
		txt12 = eval('document.'+frm+'.txt12.value');
	}
	
	if (txt13 == '-') {
		txt13 = '';
	}
	else if (txt13 == '') {
		txt13 = eval('document.'+frm+'.txt13.value');
	}
	
	if (txt14 == '-') {
		txt14 = '';
	}
	else if (txt14 == '') {
		txt14 = eval('document.'+frm+'.txt14.value');
	}
	
	if (txt15 == '-') {
		txt15 = '';
	}
	else if (txt15 == '') {
		txt15 = eval('document.'+frm+'.txt15.value');
	}
	
	if (txt16 == '-') {
		txt16 = '';
	}
	else if (txt16 == '') {
		txt16 = eval('document.'+frm+'.txt16.value');
	}
	
	if (txt17 == '-') {
		txt17 = '';
	}
	else if (txt17 == '') {
		txt17 = eval('document.'+frm+'.txt17.value');
	}
	
	if (txt18 == '-') {
		txt18 = '';
	}
	else if (txt18 == '') {
		txt18 = eval('document.'+frm+'.txt18.value');
	}
	
	if (txt19 == '-') {
		txt19 = '';
	}
	else if (txt19 == '') {
		txt19 = eval('document.'+frm+'.txt19.value');
	}
	
	if (txt20 == '-') {
		txt20 = '';
	}
	else if (txt20 == '') {
		txt20 = eval('document.'+frm+'.txt20.value');
	}
	
	var full_url = url+'?pre_url='+pre_url+'&txt1='+txt1+'&txt2='+escape(txt2)+'&txt3='+txt3+'&txt4='+escape(txt4)+'&txt5='+txt5+'&txt6='+escape(txt6)+'&txt7='+txt7+'&txt8='+txt8+'&txt9='+txt9+'&txt10='+txt10+'&txt11='+txt11+'&txt12='+txt12+'&txt13='+txt13+'&txt14='+txt14+'&txt15='+txt15+'&txt16='+txt16+'&txt17='+txt17+'&txt18='+txt18+'&txt19='+txt19+'&txt20='+txt20;
	top.opener.location.href = full_url;
	top.window.close();
}

function onimg(obj,w_px,h_px)
{	
	var doc_obj = eval('document.'+obj);
	var myimage_width = doc_obj.width;
	var myimage_height = doc_obj.height;
	doc_obj.style.visibility = "visible";
	
	if (w_px > 0) {
		if (myimage_width > w_px) {
			myimage_height = parseInt(myimage_height * (w_px/myimage_width));
			myimage_width = w_px;
		}
	}
	
	if (h_px > 0) {
		if (myimage_height > h_px) {
			myimage_width = parseInt(myimage_width * (h_px/myimage_height));
			myimage_height = h_px;
		}
	}
	
	doc_obj.width = myimage_width;
	doc_obj.height = myimage_height;
}	

function defaultSelect(strSelect, strSelectName){
	intExitFlag = false;				
	for(i=0;i<strSelectName.options.length;i++){
		if(strSelect == strSelectName.options[i].value){
			strSelectName.selectedIndex = i;
			intExitFlag = true;
		}
		if(intExitFlag) break;
	}    
}

