// popup window ´Ý±â
function fnCloseWin() {
    /*
    if ( popwinL1 != null ) {
         popwinL1.close();
         popwinL1 = null;
    }
    if ( popwinL2 != null ) {
         popwinL2.close();
         popwinL2 = null;
    }
    if ( popwinL3 != null ) {
         popwinL3.close();
         popwinL3 = null;
    }
    if ( popwinLogin != null ) {
         popwinLogin.close();
         popwinLogin = null;
    }

    if (popwin1 != null) {
        popwin1.close();
        popwin1 = null;
    }
    if (popwin2 != null) {
        popwin2.close();
        popwin2 = null;
    }
    if (popwin3 != null) {
        popwin3.close();
        popwin3 = null;
    }
    if (popwin4 != null) {
        popwin4.close();
        popwin4 = null;
    }
    if (popwin5 != null) {
        popwin5.close();
        popwin5 = null;
    }
    if (popwin6 != null) {
        popwin6.close();
        popwin6 = null;
    }

    if (popwin_list1 != null) {
        popwin_list1.close();
        popwin_list1 = null;
    }
    if (popwin_list2 != null) {
        popwin_list2.close();
        popwin_list2 = null;
    }
    if (popwin_list3 != null) {
        popwin_list3.close();
        popwin_list3 = null;
    }
    */
}

function fnSelect_Move(sel, target) {
    var index = sel.selectedIndex;

    if ( sel.options[index].value != '' ) {
         if ( target == 'blank' ) {
              window.open("http://" + sel.options[index].value, 'win1');
         } else {
              var frameobj;
              if ( target == '' ) target = 'self';
              if ( (frameobj = eval(target) ) != null ) frameobj.location = "http://" + sel.options[index].value;
         }
    }
}


function fnSelect_Move_blog(sel, target) {
    var index = sel.selectedIndex;
   location = "http://" + sel.options[index].value;
}


function checkKP() {
    if (event.ctrlKey)
    if ((event.keyCode == 78) || (event.keyCode == 104))
    event.returnValue = false;
}

// ºó °ø¹é ¹®ÀÚ¿­ CHECK
function isempty(s) {
    return ((s == null) || (s.length == 0))
}

// ÀÚ·áÀÇ ±æÀÌ CHECK
function validlength(data_val, len) {
    return (data_val.length >= len);
}

function invalidlength(date_val, len, len2) {
    return ((date_val.length >= len) && (date_val.length <= len2));
}

// ´ÜÀÏ ¹®ÀÚÇü ÀÚ·á CHECK
//function isletter (c)
//{   return ( ((c >= "a") && (c <= "z")) || ((c >= "A") && (c <= "Z")) );
//}

// ´ÜÀÏ ¼ýÀÚÇü ÀÚ·á CHECK
//function isdigit (c)
//{   return ((c >= "0") && (c <= "9"));
//}

// ¹®ÀÚÇü ÀÚ·á CHECK
function isletter (str) {
    var len=str.length;
    for(f=0; f<len; f++) {
        if ( ((str.charAt(f) >= "a") && (str.charAt(f) <= "z")) || ((str.charAt(f) >= "A") && (str.charAt(f) <= "Z")) ) {
        }
        else {
               return false;
        }
    }
    return true;
}

// ID CHECK (¹®ÀÚÇü ¹× ¼ýÀÚÇü ÀÚ·á)
/*
function idCheck (str) {
    var len=str.length;
    for(f=0; f<len; f++) {
        if ( ((str.charAt(f) >= "a") && (str.charAt(f) <= "z")) || ((str.charAt(f) >= "A") && (str.charAt(f) <= "Z")) || (str.charAt(f) >= "0") && (str.charAt(f) <= "9") ) {
        }
        else {
               return false;
        }
    }
    return true;
}
*/
//2008-11-26 by strawbs ¼öÁ¤
function idCheck (str) {
    var len=str.length;
	if(len>=4){
		for(f=0; f<len; f++) {
			if ( !( (str.charAt(f) >= "a") && (str.charAt(f) <= "z") || (str.charAt(f) >= "A") && (str.charAt(f) <= "Z") || (str.charAt(f) >= "0") && (str.charAt(f) <= "9") ) ) {
				return false;
			}
		}
	}
	else{
		return false;
	}
    return true;
}

// SpecialChar CHECK (Æ¯¼ö¹®ÀÚ Ã¼Å© - Å°º¸µå»ó)
function SCharCheck (str) {
    var len=str.length;
    for( f=0; f<len; f++ ) {
         if ( (str.charCodeAt(f) >= 33 && str.charCodeAt(f) <= 47 ) || (str.charCodeAt(f) >= 58 && str.charCodeAt(f) <= 64 ) || (str.charCodeAt(f) >= 91 && str.charCodeAt(f) <= 96 ) || (str.charCodeAt(f) >= 123 && str.charCodeAt(f) <= 126 )) {
              return false;
         }
    }
    return true;
}

// ¼ýÀÚÇü ÀÚ·á CHECK
function isdigit (str) {
    var len=str.length;
    for(f=0; f<len; f++) {
        if ((str.charAt(f) >= "0") && (str.charAt(f) <= "9")) {
        }
        else {
             return false;
        }
    }
    return true;
}
// ¼Ò¼öÁ¤¼öÇü ÀÚ·á CHECK
function isdecimal (str) {
    var len = str.length;
    for( f = 0; f < len; f++ ) {
         if ( (str.charAt(f) >= "0") && (str.charAt(f) <= "9") || str.charAt(f) == "." || str.charAt(f) == "-" || str.charAt(f) == "+" ) {
         }
         else {
              return false;
         }
    }
    return true;
}

// ÀÌ¸ÞÀÏ ÀÔ·Â CHECK
function isemail(checkstr) {
    var checkok = "@";
    if (checkstr.length == 0) {return (true);}

    for (i = 0;  i < checkstr.length;  i++) {
         ch = checkstr.charAt(i);
         if (ch == checkok) {return (true) }
    }
    return (false);
}

// ´ÜÀÏ¹®ÀÚ ´ëÃ¼ (¿øº»¹®ÀÚ¿­, ´ëÃ¼´ë»ó ¹®ÀÚ, ´ëÃ¼ÇÒ ¹®ÀÚ)
function replacechar(str, tarch, repch) {
    var nowch  = "";
    var sumstr = "";

    var len=str.length;
    for(f=0; f<len; f++) {
        if (str.charAt(f) == tarch) {
            nowch = repch;
        }
        else {
            nowch = str.charAt(f);
        }
        sumstr = sumstr + nowch;
    }
    return sumstr;
}

function sumcomma(str) {
    this.str = str;
    var len  = str.length;
    var str1 = "";

    for(f=1; f<=len; f++) {
        str1 = str.charAt(len-f)+str1;
        if((f%3 == 0)&&(len-f != 0)) str1 = ","+str1;
    }
    return str1;
}

function addcomma(str) {
    var str1 = "";
    for ( f=0; f<str.length; f++ ) {
          if ( f > 0 && (f%3)==0 ) {
               str1 = str.charAt(str.length - f -1) + "," + str1;
          }
          else {
               str1 = str.charAt(str.length - f -1) + str1;
          }
    }
    return str1;
}

// ÄÞ¸¶¸¦ »èÁ¦ÇÔ
function delcomma(str) {
    var str1 =  replacechar(str,",","");
    return str1;
}


// ÁÖ¹Îµî·Ï¹øÈ£ CHECK
function socialcheck(soid) {
    var IDtot = 0;
    var IDAdd = "234567892345";

    for ( f=0; f<12; f++ ) {
          IDtot = IDtot + parseInt(soid.substring(f,f+1)) * parseInt(IDAdd.substring(f,f+1));
    }

    IDtot= 11 - (IDtot%11);

    if ( IDtot == 10 ) { IDtot = 0; }
    else if ( IDtot == 11 ) { IDtot = 1; }

    var tid = parseInt(soid.substring(12,13));

    if ( tid == IDtot ) return true;
}

// VBÀÇ Trim ¸Þ¼Òµå
function fnc_Validation_Trim(strVal) {
    try {
      // LTrim
      while ( strVal.search(/^\s/) != -1 ) {
              strVal = strVal.replace(/^\s/,"");
      }
      // RTrim
      while ( strVal.search(/\s$/) != -1 ) {
              strVal = strVal.replace(/\s$/,"");
      }
    }
    catch( ex ) {
           return strVal;
    }
    return strVal;
}

/*/ ÀÌ¸ÞÀÏ, ÀüÈ­¹øÈ£, »çÀÌÆ® ¸µÅ© Æ÷ÇÔ¿©ºÎ °Ë»ç
function fnc_Validation_isLigal(strContent) {
   var bln = false
   var val = strContent
   if (!fnc_Validation_IsBlank(val))
   {
      if(strContent.search(/^(.+@.+\..+)|(.+\..+\..+)|(\d{2,3}-\d{3,4}-\d{4})$/) == -1)
      {
         bln=true;
      }
   }
   return bln;
}
*/
// ÀÌ¸ÞÀÏ, ÀüÈ­¹øÈ£, »çÀÌÆ® ¸µÅ© Æ÷ÇÔ¿©ºÎ °Ë»ç
function fnc_Validation_isLigal(obj) {
    var bln = false
    var val = obj.value;
    if ( !fnc_Validation_IsBlank(val) ) {
         arr = val.match(/(\w{3,10}@\w{3,10}\.\w{2,10})|([a-zA-Z0-9]{3,10}\.[a-zA-Z0-9]{3,10}\.[a-zA-Z]{2,10})|(\d{2,3}-\d{3,4}-\d{4})/ig)
         if ( arr != null ) {
              fnc_Validation_Select(obj, arr[0]);
         }
         else {
              bln = true;
         }
    }
    return bln;
}

// ÇØ´ç ÄÁÆ®·Ñ¿¡¼­ Æ¯Á¤ ¹®ÀÚ¿­À» ÇÏÀÏ¶óÀÌÆ®
function fnc_Validation_Select(obj, val) {
    //var obj = document.getElementById(id)
    var rang = obj.createTextRange();
    rang.findText(val);
    rang.select();
}

// ¼¿·¢Æ® ¸®½ºÆ®ÀÇ ¼±ÅÃ ¿©ºÎ °Ë»ç
function fnc_Validation_IsSelected(objElemnet) {
    var bln = true;
    if ( objElemnet.selectedIndex == 0 ) {
         bln = false;
    }
    return bln;
}

// ¼ýÀÚ°ªÀÎÁö °Ë»ç
function fnc_Validation_IsNumberic(strNum) {
    var val = strNum;
    var bln = false;
    var regExp = /[^0-9]/;
    if ( !fnc_Validation_IsBlank(val) ) {
         bln = !regExp.test(val);
    }
    return bln;
}

// ÄÞ¸¶¸¦ »èÁ¦ÇÑ ¹®ÀÚ¿­À» ¸®ÅÏ
function fncDelComma(strVal) {
    var MileageUsedPrice = "";
    for( x = 0; x < strVal.length ; x++ ) {
         ch = strVal.substring(x,x+1)
         if( ch != ",")  MileageUsedPrice += ch;
    }
    return MileageUsedPrice;
}

// ¿µ¹®°ú ¼ýÀÚÀÇ Á¶ÇÕÀÎ°¡¸¦ Ã¼Å©
function fnc_Validation_IsCharNumberic(strVal) { // ¿µ¹®/¼ýÀÚ
    var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1abcdefghijklmnopqrstuvwxyz0123456789";
    for ( i = 0;  i < strVal.length;  i++ ) {
          ch = strVal.charAt(i);
          for ( j = 0; j < checkOK.length; j++ )
                if ( ch == checkOK.charAt(j) )
                     break;
                if ( j == checkOK.length) {
                     return (false);
                     break;
                }
    }
    k = strVal.length - 1
    if ( strVal.charAt(k) == "." )
         return (false);
    return (true);
}

// ¿µ¹®°ú ¼ýÀÚ¿Í Á¶ÇÕÀÎ°¡¿Í !@$%^&* Æ÷ÇÔ¿¡¼­Ã¼Å©
function fnc_Validation_IsCharNumbericspeciality(strVal) { // ¿µ¹®/¼ýÀÚ
    var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1abcdefghijklmnopqrstuvwxyz0123456789!@$%^&*";
    for ( i = 0;  i < strVal.length;  i++ ) {
          ch = strVal.charAt(i);
          for ( j = 0;  j < checkOK.length;  j++ ) {
                if ( ch == checkOK.charAt(j) )
                     break;
                if ( j == checkOK.length ) {
                     return (false);
                     break;
                }
          }
    }
    k = strVal.length - 1
    if ( strVal.charAt(k) == "." )
         return (false);
    return (true);
}


// ±Ý¾× ¼ýÀÚ¸¦ ÇÑ±Û·Î.. : num_han, ciphers_han, NUM_HAN
function num_han(num) {
    if ( num == "1" )       return "ÀÏ";
    else if ( num == "2" )  return "ÀÌ";
    else if ( num == "3" )  return "»ï";
    else if ( num == "4" )  return "»ç";
    else if ( num == "5" )  return "¿À";
    else if ( num == "6" )  return "À°";
    else if ( num == "7" )  return "Ä¥";
    else if ( num == "8" )  return "ÆÈ";
    else if ( num == "9" )  return "±¸";
    else if ( num == "½Ê" ) return "½Ê";
    else if ( num == "¹é" ) return "¹é";
    else if ( num == "Ãµ" ) return "Ãµ";
    else if ( num == "¸¸" ) return "¸¸ ";
    else if ( num == "¾ï" ) return "¾ï ";
    else if ( num == "Á¶" ) return "Á¶ ";
    else if ( num == "0" )  return "";
}

function onlyNumber() {
   if( (event.keyCode < 48)||(event.keyCode > 57) ) {
       event.returnValue = false;
   }
}

function onlyOneNumber(strValue) {
    if ( strValue.length != 0 && event.keyCode == 49 ) { // 1ÀÌÁö¸¸ ¾ÕÀÚ¸®°¡ 1ÀÌ ¾Æ´Ï¸é ÀÔ·Â X
         event.returnValue = false;
    }
    if ( (event.keyCode < 48)||(event.keyCode > 49) ) {  // 0,1¸¸ ÀÔ·Â °¡´É
          event.returnValue = false;
    }
}

function NUM_HAN(num,mode,return_input) {
    onlyNumber();

    if ( num == "" || num == "0" ) {
         if ( mode == "3" ) {
              return_input.value = "";
         }
         else if ( mode == "4" ) {
              return "";
         }
         return;
    }

    num = new String(num);
    num = num.replace(/,/gi,"");

    var len  = num.length;
    var temp1 = "";
    var temp2 = "";

    if ( len/4 > 3 && len/4 <= 4 ) {
         if ( len%4 == 0 ) {
              temp1 = ciphers_han(num.substring(0,4)) + "Á¶" + ciphers_han(num.substring(4,8)) + "¾ï" + ciphers_han(num.substring(8,12)) + "¸¸" + ciphers_han(num.substring(12,16));
         }
         else {
              temp1 = ciphers_han(num.substring(0,len%4)) + "Á¶" + ciphers_han(num.substring(len%4,len%4+4)) + "¾ï" + ciphers_han(num.substring(len%4+4,len%4+8)) + "¸¸" + ciphers_han(num.substring(len%4+8,len%4+12));
         }
    }
    else if ( len/4 > 2 && len/4 <= 3 ) {
         if ( len%4 == 0 ) {
              temp1 = ciphers_han(num.substring(0,4)) + "¾ï" + ciphers_han(num.substring(4,8)) + "¸¸" + ciphers_han(num.substring(8,12));
         }
         else {
              temp1 = ciphers_han(num.substring(0,len%4)) + "¾ï" + ciphers_han(num.substring(len%4,len%4+4)) + "¸¸" + ciphers_han(num.substring(len%4+4,len%4+8));
         }
    }
    else if ( len/4 > 1 && len/4 <= 2 ) {
         if ( len%4 == 0 ) {
              temp1 = ciphers_han(num.substring(0,4)) + "¸¸" + ciphers_han(num.substring(4,len));
         }
         else {
              temp1 = ciphers_han(num.substring(0,len%4)) + "¸¸" + ciphers_han(num.substring(len%4,len));
         }
    }
    else if ( len/4 <= 1 ) {
         temp1 = ciphers_han(num.substring(0,len));
    }

    for ( var i = 0; i < temp1.length; i++ ) {
          temp2 = temp2 + num_han(temp1.substring(i, i+1));
    }

    temp3 = new String(temp2);
    temp3 = temp3.replace(/¾ï ¸¸/gi,"¾ï ");
    temp3 = temp3.replace(/Á¶ ¾ï/gi,"Á¶ ");

    if ( mode == 1 ) {
         alert(temp3 + " ¿ø");
    } else if ( mode == 2 ) {
         return_input.value = "( " + temp3  + "" + document.Form1.ItemType.options[2].text +")";
    } else if ( mode == 3 ) {
         return_input.value = "( " + temp3 + " ¿ø )";
    } else if ( mode == 4 ) {
         return "( " + temp3 + " ¿ø )";
    }
}

function ciphers_han(num) {
    var len  = num.length;
    var temp = "";

    if ( len == 1 ) {
        temp = num;
    }
    else if ( len == 2 ) {
        temp = num.substring(0,1) + "½Ê" + num.substring(1,2);
    }
    else if ( len == 3 ) {
        temp = num.substring(0,1) + "¹é" + num.substring(1,2) + "½Ê" + num.substring(2,3);
    }
    else if ( len == 4 ) {
        temp = num.substring(0,1) + "Ãµ" + num.substring(1,2) + "¹é" + num.substring(2,3) + "½Ê" + num.substring(3,4);
    }

    num = new String(temp);
    num = num.replace(/0½Ê/gi,"");
    num = num.replace(/0¹é/gi,"");
    num = num.replace(/0Ãµ/gi,"");
    return num;
}

// ±Ý¾×¿¡ , Âï±â..
function numchk(num) {
    num=new String(num);
    num=num.replace(/,/gi,"");
    if ( num.length > 0 ) {
    return numchk1_1(num);
    }
    else {
    return 0;
    }
}

function numchk2(num) {
    num=new String(num);
    num=num.replace(/,/gi,"");
    if ( num.length > 0 ) {
    return numchk2_1(num);
    }
    else {
    return "";
    }
}

function numchk3(num) {   // ¼ýÀÚ¸¸ Check
    num=new String(num);
    num=num.replace(/,/gi,"");
    if ( isNaN(num) ) {
       alert("¼ýÀÚ¸¸ ÀÔ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù");
         return "";
    }
    return num;
}

function numchk1_1(num) {
    var sign="";
    if ( isNaN(num) ) {
         alert("¼ýÀÚ¸¸ ÀÔ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù");
         if ( !isNaN(document.forms[0].WantPrice.value.replace(/,/gi,"")) ) {
              if ( typeof(document.forms[0].HanWantQuantity)!="undefined" )
                   document.forms[0].HanWantQuantity.value = "";
              if ( typeof(document.forms[0].ShortCmd)!="undefined" )
                   document.forms[0].ShortCmd.value = "";
         }
        return "";
    }
    if ( num == 0 ) {
        return num;
    }

    if ( num < 0 ) {
         num=num*(-1);
         sign="-";
    }
    else {
         num=num*1;
    }
    num = new String(num)
    var temp="";
    var pos=3;
    num_len=num.length;
    while ( num_len > 0 ) {
            num_len=num_len-pos;
            if ( num_len < 0 ) {
                 pos = num_len+pos;
                 num_len = 0;
            }
            temp=","+num.substr(num_len,pos)+temp;
    }
    return sign+temp.substr(1);
}

function numchk2_1(num) {
    var sign="";
    if ( isNaN(num) ) {
       alert("¼ýÀÚ¸¸ ÀÔ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù");
         return "";
    }
    if ( num == 0 ) {
        return num;
    }

    if ( num < 0 ) {
         num=num*(-1);
         sign="-";
    }
    else {
         num=num*1;
    }
    num = new String(num)
    var temp="";
    var pos=3;
    num_len=num.length;
    while ( num_len > 0 ) {
            num_len=num_len-pos;
            if ( num_len < 0 ) {
                 pos = num_len+pos;
                 num_len = 0;
            }
            temp=","+num.substr(num_len,pos)+temp;
    }
    return sign+temp.substr(1);
}

function MakeFlash(Url,Width,Height){
    document.writeln("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\"" + Width + "\" height=\"" + Height + "\" align=\"middle\">");
    document.writeln("<param name=\"allowScriptAccess\" value=\"sameDomain\">");
    document.writeln("<param name=\"movie\" value=\"" + Url + "\">");
    document.writeln("<param name=\"quality\" value=\"high\" />");
    document.writeln("<param name=\"wmode\" value=\"transparent\">");
    //document.writeln("<param name=\"bgcolor\" value=\"#000000\">");
    document.writeln("<embed src=\"" + Url + "\" quality=\"high\" width=\"" + Width + "\"  height=\"" + Height + "\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\">");
    document.writeln("</object>");
}




function MakeMovie(Url,Width,Height) {
//   Url = decodeURIComponent(Url) ;
//   Url = Url.replace(/\+/g," ");
//alert(Url);
    if ( isempty(Width)  ) { Width  = "370"; }
    if ( isempty(Height) ) { Height = "290"; }
    //if ( isempty(Width)  ) { Width  = document.all.div_movie.width; }
    //if ( isempty(Height) ) { Height = document.all.div_movie.height; }

    document.writeln("<object id=\"vodplayer\" width=\"" + Width + "\" Height=\"" + Height + "\" classid=\"CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95\" codebase=\"http://www.webcinema.co.kr/download/mpie4ful.exe\" standby=\"Loading Microsoft Windows Media Player components...\" type=\"application/x-oleobject\" align=\"middle\" VIEWASTEXT>");
    document.writeln("<param NAME=\"FileName\"                  VALUE=\"" + Url + "\">");

    document.writeln("<param NAME=\"CurrentPosition\"           VALUE=\"0\">");
    document.writeln("<param NAME=\"SetCurrentEntry\"           VALUE=\"1\">");
    document.writeln("<param NAME=\"ClickToPlay\"               VALUE=\"1\">");
    document.writeln("<param NAME=\"AutoSize\"                  VALUE=\"0\">");
    document.writeln("<param NAME=\"AutoResize\"                VALUE=\"0\">");
    document.writeln("<param NAME=\"AutoStart\"                 VALUE=\"1\">");
    document.writeln("<param NAME=\"ShowControls\"              VALUE=\"1\">");
    document.writeln("<param NAME=\"ShowAudioControls\"         VALUE=\"1\">");
    document.writeln("<param NAME=\"ShowDisplay\"               VALUE=\"0\">");
    document.writeln("<param NAME=\"ShowTracker\"               VALUE=\"1\">");
    document.writeln("<param NAME=\"ShowStatusBar\"             VALUE=\"1\">");
    document.writeln("<param NAME=\"EnableContextMenu\"         VALUE=\"0\">");
    document.writeln("<param NAME=\"ShowPositionControls\"      VALUE=\"1\">");
    document.writeln("<param NAME=\"DisplayBackColor\"          VALUE=\"0\">");
    document.writeln("<param NAME=\"ShowTracker\"               VALUE=\"0\">");
    document.writeln("<param NAME=\"SendOpenStateChangeEvents\" VALUE=\"0\">");
    document.writeln("<param NAME=\"SendPlayStateChangeEvents\" VALUE=\"0\">");
    document.writeln("<param NAME=\"ShowCaptioning\"            VALUE=\"0\">");

    document.writeln("<embed TYPE=\"application/x-mplayer2\" pluginspage=\"http://www.microsoft.com/windows/mediaplayer/en/download/Win32IE4x86.asp\" filename=\"" + Url + "\" Name=\"Vod Player\" ShowControls=\"0\" AutoStart=\"1\" ShowDisplay=\"0\" ShowPositionControls=\"0\" ShowTracker=\"1\" autoresize=\"0\" ShowStatusBar=\"0\" ClickToPlay=\"1\" EnableFullScreenControls=\"1\" SendKeyboardEvents=\"1\" volume=\"-720\" sendMouseClickEvents=\"1\" SendMouseMoveEvents=\"1\" width=\"" + Width + "\" Height=\"" + Height + "\"></embed>");
    document.writeln("</object>");

}

function mSelect(input_name,input_value) {
      if(!(fn = document.getElementById(input_name))) {
        name = document.getElementsByName(input_name);
        fn = name[0];
      }
      if(fn!=null && input_value != '') {
        if(fn.type=='radio') {
          count = count = document.getElementsByName(input_name).length;
          for(i=0;i<count;i++) {
            if(document.getElementsByName(input_name)[i].value==input_value) {
              document.getElementsByName(input_name)[i].checked=true;
            }
          }
        } else {
        switch (fn.type) {
      case 'checkbox' :
//       alert("dfdf");
         count = count = document.getElementsByName(input_name).length;
         for(i=0;i<count;i++) {
            if(document.getElementsByName(input_name)[i].value==input_value) {
                 document.getElementsByName(input_name)[i].checked=true;
            }
         }

//       if(fn.value==input_value) {
//       fn.checked = true;
//       }
      break;
      case 'select-one' :
         fn.value = input_value;
         if(fn.value=='') {
         fn.options[0].selected = true;
         }
      break;
      case 'text' :
      case 'textarea' :
         fn.value = input_value;
         break;
      default :
          }
    }
  }
}

function fnGet_sel(target,code_cls_cd  ,code_cls_level,s_v) { //sel Àº this sel.options[sel.selectedIndex].value //s_v ´Â ¼±ÅÃ°ª
// if(sel)   var sel_v = sel.options[sel.selectedIndex].value; // Ã¹¹øÂ° selectboxÀÇ ¼±ÅÃµÈ ÅØ½ºÆ® //s_v ´Â ¼±ÅÃ°ª
// alert(code_cls_cd);
   sel = document.getElementById(target); //
   var form = sel.form.name; //
// alert(form);
   url = "/common/function/get_select_data.php?form=" + form + "&target=" + target + "&code_cls_cd=" + code_cls_cd + "&code_cls_level=" + code_cls_level+"&chk_v="+s_v;
// t_d = eval(dy);
// t_d.src = null;
   dynamic.src = url;
// t_d.src = null;
// get_select_frm.action = url;
// get_select_frm.submit();
// exit;
}

function fnGet_post(trigger) { //sel Àº this sel.options[sel.selectedIndex].value //s_v ´Â ¼±ÅÃ°ª
   var sel = document.frmList.addr2; //
   var form = sel.form.name; //
   url = "/common/function/get_select_post.php?form=" + form + "&target=addr2&trigger=" + trigger;
// alert(url);
   dynamic.src = url;
}
//===================================================================
//	°ªÀÌ ÀÖ´ÂÁö ¾ø´ÂÁö °Ë»ç	by tjsys 2008³â 11¿ù 19ÀÏ ¼ö¿äÀÏ
//===================================================================
function is_empty(input_name) {

	var chk_v = "N";
	if(!(fn = document.getElementById(input_name))) {
		name = document.getElementsByName(input_name);
		fn = name[0];
	}

	if(fn!=null ) {
//		alert(fn.type);
		if(fn.type=='radio' || fn.type=='checkbox') {
			count = count = document.getElementsByName(input_name).length;
			for(i=0;i<count;i++) {
				if(document.getElementsByName(input_name)[i].checked) {
					chk_v ="Y";
				}
			}
		} else {
			if(fn.value != "") {
				chk_v ="Y";
			}
		}
		if(chk_v == "Y") {
			return false; //alert('°ªÀÌ ÀÖÀ½');//  
		}
		else {
			return true; //alert('°ªÀÌ ¾øÀ½');// 
		}
	} 
}
function set_focus(input_name) {
	fn = document.getElementsByName(input_name);
	fn[0].focus();
}
//###############  È¸¿øÁ¤º¸ÆË¾÷¿¡¼­ ¸ÞÀÏ º¸³»±â by tjsys 2008³â 12¿ù 15ÀÏ ¿ù¿äÀÏ ###############
///content/bbs/bbs_user_info.html ¿¡¼­ »ç¿ë
function fnBbsEmail_email(user_id) { 
    var page5 = "/contents/bbs/pop_mail_form.html?user_id="+user_id;//°Ô½ÃÆÇ°ú ¹«°üÇÏ°Ô ¸ÞÀÏÀü¼Û
    popwin5   = window.open(page5,'mail','left=10, top=10, height=440, width=500,menubar=no,directories=no,resizable=no,status=no,scrollbars=yes,toolbar=no,Path=no');
}
//###############  by tjsys 2008³â 12¿ù 15ÀÏ ¿ù¿äÀÏ ###############
function fnMsg_Resist_id(id,homepage_id) {
    var pageI1 = "/contents/user/message/msg_regist.html?homepage_id="+homepage_id+"&rece_user_id="+id;
    popwinI1 = window.open(pageI1,'popI1','left=300, top=100, height=450, width=600,menubar=no,directories=no,resizable=no,status=no,scrollbars=yes,toolbar=no,Path=no');
}

//http://koreaipm.com/contents/sms/pop_phone_message.php?homepage_id=homepage_id&get_code=undefined&all_id='strawbs','tjsys10','tjsys1','tjsys'&b=undefined
///content/bbs/bbs_user_info.html ¿¡¼­ »ç¿ë
//###############  by tjsys 2008³â 12¿ù 15ÀÏ ¿ù¿äÀÏ ###############
function fnPhoneMessage_id(GET_CODE,id,m,to_nm) {//m ¼ö½Å¹øÈ£/to_nm ¼ö½ÃÀÚÀÌ¸§

	id = "'"+id+"'";
	popurlL2 = "/contents/sms/pop_phone_message.php?get_code="+GET_CODE+"&all_id="+id+"&m="+m+"&to_nm="+to_nm;
//	alert(popurlL2);
    popwinL2 = window.open(popurlL2,'popurlL2','left=160, top=80, height=504,width=254,menubar=no,directories=no,resizable=no,status=no,scrollbars=no,toolbar=no,Path=no');

}

function go_sms1(id) {//http://koreaipm.com/contents/sms/sms_buy.php?homepage_id=koreaipm
 var url = '/contents/sms/sms_buy.php?homepage_id='+id;
// "left=0, top=0, height=800, width=1004,menubar=no,directories=no,resizable=yes,status=no,scrollbars=yes,toolbar=yes,Path=no"
	window.open(url, "sms_url1" ,"left=0, top=0, height=520, width=800,menubar=no,directories=no,resizable=no,status=no,scrollbars=no,toolbar=no ,Path=no");
}


function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//2009-01-08 by strawbs ¸ÞÀÎÆäÀÌÁö ÅÇ ·Ñ¿À¹ö ½ºÅ©¸³Æ® ½ÃÀÛ
// ·Ñ¿À¹ö ÀÌ¹ÌÁö
function kipm_ch_img(name, nsdoc, rpath, preload)
{
  var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
  if (name == '')
    return;
  if (img) {
    img.altsrc = img.src;
    img.src    = rpath;
  }
}



//2009-02-06 tab ÀÚµ¿ º¯°æ
var curDiv = 1;

//tabÀüÈ¯
var tShowTab = null;
var objShowTab = null;
var tName = null;
var tG = null;
var tT = null;
var tCh1 = null;
var tCh2 = null;
var tCh3 = null;
var tCh4 = null;
var tCls = null;

function clearShowTabTimeInterval() {
	clearTimeout(tShowTab);
}
function tab_view(name,g,t,tObj,ch1,ch2,ch3,ch4,cls,bNow) {
	clearTimeout(tShowTab);
	if(!bNow) {

		var tObj2 = document.getElementById(tObj);		
		objShowTab = document.getElementById(tObj);
		tName=name;
		tG=g;
		tT=t;
		tCh1 = ch1;
		tCh2 = ch2;
		tCh3 = ch3;
		tCh4 = ch4;
		tCls = cls;
		tObj2.onmouseout = clearShowTabTimeInterval;
		tShowTab = setTimeout('tab_view(tName,tG,tT,objShowTab,tCh1,tCh2,tCh3,tCh4,tCls,true);', 300); //½Ã°£ Á¶Á¤
		return;
	}

	t = t+1;
	for (i=1; i <t ; i++) {
		var dis_v ="";
		if(i != g) {
			dis_v = "none";
		}
		document.all(name+i).style.display = dis_v;
	}
	//2008-12-23 by strawbs ¿ÜºÎ ÇÔ¼ö ¾ÈÀ¸·Î µé¿©¿È
	kipm_ch_img(ch1,ch2,ch3,ch4);
	more_url(cls);
}

//2009-02-06 by strawbs tab ÀÚµ¿ º¯°æ
function tab_view_wrap(tab_arr,n) {
	n = n-1;
	tab_view(tab_arr[n][0],tab_arr[n][1],tab_arr[n][2],tab_arr[n][3],tab_arr[n][4],tab_arr[n][5],tab_arr[n][6],tab_arr[n][7],tab_arr[n][8]);
}

//2009-02-06 by strawbs tab ÀÚµ¿ º¯°æ
function moveItfuture(tab_arr){
	curDiv++;
	if (curDiv > tab_arr.length ){
		curDiv = 1;
	}
	tab_view_wrap(tab_arr,curDiv);
}


// ÅÇÀüÈ¯2 ·Ñ¿À¹ö
var previd1 = null;
var previd2 = null;

function displaySub(subID1,subID2)
{
    if (previd1 != null)
	{
		if (previd1 != subID1)
		{
		    previd1.style.display = "none";
		    
		}
	}
	
	if (previd2 != null)
	{
		if (previd2 != subID2)
		{
		    previd2.style.display = "none";
		    
		}
	}
//alert(subID1.name);
	if (subID1.style.display == "none") 
	{
		subID1.style.display = "block";
		subID2.style.display = "block";
	}
	else
	{
		subID1.style.display = "none";
		subID2.style.display = "none";
	}

	previd1 = subID1;
	previd2 = subID2;
	
    //titleID.style.bold = true;

	//ifHeight();
}

var gCls = "";

//more link ÀüÈ¯
function more_url(cls) {
//    document.all.mLink.value = cls;
	gCls = cls;
}

function nq_more(mLink) {
	if(gCls==""){
		document.location.href = "/contents/bbs/bbs_list.html?bbs_cls_cd=" + mLink;
	}
	else{
		document.location.href = "/contents/bbs/bbs_list.html?bbs_cls_cd=" + gCls;
	}
}


//2009-01-08 by strawbs ¸ÞÀÎÆäÀÌÁö ÅÇ ·Ñ¿À¹ö ½ºÅ©¸³Æ® ³¡


function fnPopup_Bbs_Add(bbs_cls_cd) {//
	popurlL2 = "/contents/bbs/inc/bbs_add_new_lec.php?bbs_cls_cd="+bbs_cls_cd;
	popwinL2 = window.open(popurlL2,'fnPopup_Bbs_Add','left=160, top=80, height=350,width=750,menubar=no,directories=no,resizable=no,status=no,scrollbars=yes,toolbar=no,Path=no');
}

