// ######################################################################################################################### //
// 2006.08.07 ADDED
// ######################################################################################################################### //

// str의 byte 길이를 리턴.
function getByteLength(str)
{
    var len = 0;
    if( str == null )
        return 0;

    for( var i = 0 ; i < str.length ; i++ )
    {
        var c = escape(str.charAt(i));
        if ( c.length == 1 )
            len ++;
        else if( c.indexOf("%u") != -1 )
            len += 2;
        else if( c.indexOf("%") != -1 )
            len += c.length/3;
    }
    return len;
}

function isEmpty( data )
{
    for( var i = 0 ; i < data.length ; i++ )
    {
        if( data.substring( i , i + 1 ) != " " )
        {
            return false;
        }
    }
    return true;
}

function isEmptyMsg(field, error_msg)
{
    // error_msg가 ""이면 alert와 focusing을 하지 않는다
    if(error_msg == "") {
        if(!CheckValid(field.value, false)) 	{
            return true;
        } else {
            return false;
        }
    } else {
        if(!CheckValid(field.value, false)) {
            alert(error_msg);
            field.focus() ;
            return true;
        } else {
            return false;
        }
    }
}

function CheckValid(String, space)
{

   var retvalue = false;

   for (var i=0; i<String.length; i++)
   {		//String이 0("" 이나 null)이면 무조건 false
      if (space == true)
      {
         if (String.charAt(i) == ' ')
         {			//String이 0이 아닐때 space가 있어야만 true(valid)
            retvalue = true;
            break;
         }
      } else {
         if (String.charAt(i) != ' ')
         {			//string이 0이 아닐때 space가 아닌 글자가 있어야만 true(valid)
            retvalue = true;
            break;
         }
      }
   }

   return retvalue;
}

// 메세지를 출력하고, Object로 focus를 돌려준다.
function ErrMsg( obj, msg )
{
    try
    {
        alert( msg );

        if( obj.type == "select-one" )
        {
            obj.focus();
        }
        else
        {
            obj.focus();
            obj.select();
        }
        return false;
    }
    catch(errorObject)
    {
        var msg = errorObject.description + "\n\n"
               + "Error Number : " + (errorObject.number>>16 & 0x1FFF) + "\n\n";
        alert(msg);
        return false;
    }
}


function trim(Str)
{
    var tempStr = "";

    for (i = 0 ; i < Str.length; i++)
    {
        if(Str.charAt(i) == " " || Str.charCodeAt(i) == 13 || Str.charCodeAt(i) == 10 )
        {
            tempStr = tempStr;
        }
        else
        {
            tempStr = tempStr + Str.charAt(i);
        }
    }
    return tempStr;
}


function chkString( str, type )
{
    for(var i=0; i<str.length; i++)
    {
        if(((str.charCodeAt(i) >= 48 && str.charCodeAt(i) <=57) || (str.charCodeAt(i) >=65 && str.charCodeAt(i) <= 90) || (str.charCodeAt(i) >= 97 && str.charCodeAt(i) <= 122)))
        {
            return true;
        }
        else
        {
            return false;
        }
    }
}

// Object에 value가 숫자로만 되어있는지 체크한다.
function isDigit(obj)
{
    try
    {
        inputStr = obj.value;
        for( var i = 0 ; i < inputStr.length ; i++ )
        {
            var oneChar = inputStr.charAt(i)
            if (oneChar < "0" || oneChar > "9")
            {
                return false;
            }
        }
        return true;
    }
    catch(errorObject)
    {
        var msg = errorObject.description + "\n\n"
               + "Error Number : " + (errorObject.number>>16 & 0x1FFF) + "\n\n";
        alert(msg);
        return false;
    }
}

// value가 숫자로만 되어있는지 체크한다.
function isDigitValue(value)
{
    try
    {
        inputStr = value;
        for( var i = 0 ; i < inputStr.length ; i++ )
        {
            var oneChar = inputStr.charAt(i)
            if (oneChar < "0" || oneChar > "9")
            {
                return false;
            }
        }
        return true;
    }
    catch(errorObject)
    {
        var msg = errorObject.description + "\n\n"
               + "Error Number : " + (errorObject.number>>16 & 0x1FFF) + "\n\n";
        alert(msg);
        return false;
    }
}

// Object에 value가 숫자로만 되어있는지 체크한다.
function isTel(obj)
{
    try
    {
        inputStr = obj.value;
        for( var i = 0 ; i < inputStr.length ; i++ )
        {
            var oneChar = inputStr.charAt(i)
            if( oneChar < "0" || oneChar > "9" )
            {
                if( oneChar != "-" )
                {
                    return false;
                }
            }
        }
        return true;
    }
    catch(errorObject)
    {
        var msg = errorObject.description + "\n\n"
               + "Error Number : " + (errorObject.number>>16 & 0x1FFF) + "\n\n";
        alert(msg);
        return false;
    }
}


// 한글로 되어 있는지 체크한다.
function isKorean( value )
{
    for( var i = 0; i < value.length; i++ )
    {
        if(!((value.charCodeAt(i) > 0x3130 && value.charCodeAt(i) < 0x318F) || (value.charCodeAt(i) >= 0xAC00 && value.charCodeAt(i) <= 0xD7A3)))
        {
            return false;
        }
    }
    return true;
}


//숫자만 입력가능하게함 사용예<   OnKeyPress="numChk()"   >
function numChk()
{
    if ((event.keyCode<48) || (event.keyCode>57))
        event.returnValue=false;
}

function numDotChk()
{
    if ((event.keyCode != 46) && (event.keyCode<48) || (event.keyCode>57))
    {
        event.returnValue=false;
    }
}

// 확장자 검사
function isExtCheck( filename )
{
    var strFileName = filename.toUpperCase();

    if ( filename.match(/\.(GUL|JPG|GIF|BMP|XLS|PPT|DOC|HWP|PDF|TIF)$/i) )
    {
        return true;
    }
    else
    {
        return false;
    }
}



// 콤보박스를 선택한다.
function setSelect(obj, val)
{
    if( val != "" )
    {

        for( var i = 0 ; i < obj.length ; i++ )
        {
            if( obj.options[i].value == val )
            {
                obj.options[i].selected = true;
                break;
            }
        }
    }
}

// 콤보박스를 선택한다.
function setSelects(index, obj, val)
{
    try
    {
        if( obj[1].value != null )
        {
            for( var i = 0 ; i < obj.length ; i++ )
            {
                if( i == index )
                {
                    setSelect(obj[i], val);
                }
            }
        }
    }
    catch(err)
    {
        setSelect(obj, val);
    }
}

function putSelects(index, obj , flag , min , max)
{
    if( obj.length != null && obj.length != 0 )
    {
        for( var i = 0 ; i < obj.length ; i++ )
        {
            if( i == index )
            {
                putSelect( obj[i] , flag , min , max );
            }
        }
    }
    else
    {
        putSelect( obj , flag , min , max );
    }
}


function setRadios(index, obj, val)
{
    try
    {
        if( obj[1].value != null )
        {
            for( var i = 0 ; i < obj.length ; i++ )
            {
                if( i == index )
                {
                    setRadio(obj[i], val);
                }
            }
        }
    }
    catch(err)
    {
        setRadio(obj, val);
    }
}

function setRadio(obj, val)
{
    if( val != "" )
    {
        for( var i = 0 ; i < obj.length ; i++ )
        {
            if( obj[i].value == val )
            {
                obj[i].checked = true;
                break;
            }
        }
    }
}


function setCheck(obj, val)
{
    if( val != "" )
    {
        if( obj != null )
        {
            if( obj.length == null )
            {
                obj.checked = true;
            }
        }
    }
}

function isExtCheck( filename )
{
    var strFileName = filename.toUpperCase();

    if ( filename.match(/\.(GUL|JPG|GIF|BMP|XLS|PPT|DOC|HWP|PDF|TIF)$/i) )
    {
        return true;
    }
    else
    {
        return false;
    }
}


function dateBetween( src, des )
{
    var srcdate = src.split("-");
    var desdate = des.split("-");

    var date1 = new Date(srcdate[0],srcdate[1]-1,srcdate[2]);
    var date2 = new Date(desdate[0],desdate[1]-1,desdate[2]);

    if (date1=="NaN" || date2=="NaN")
    {
        return "0";
    }
    else
    {
        var newdate = (date2.getTime()-date1.getTime())/(1000*60*60*24);

        return Math.round(newdate);
    }
}

// ######################################################################################################################### //
// 2006.08.07 ADDED
// ######################################################################################################################### //


//FOR POPUP WINDOW - SCROLL TYPE "NO"
function popwindow(pop,width,height)
{
    var url = pop;
    var wd = width;
    var he = height;
    window.open(url,"","toolbar=0,menubar=0,scrollbars=no,resizable=no,width=" + wd +",height=" + he + ";")
}

//FOR POPUP WINDOW - SCROLL TYPE "YES"
function popwindow2(pop,width,height)
{
    var url = pop;
    var wd = width;
    var he = height;
    window.open(url,"","toolbar=0,menubar=0,scrollbars=yes,resizable=no,width=" + wd +",height=" + he + ";")
}

//FOR POPUP WINDOW - SCROLL TYPE "NO",name
function popwindow3(pop,popname,width,height)
{
    var url = pop;
    var wd = width;
    var he = height;
    var openWindow=window.open(url,popname,"toolbar=0,menubar=0,scrollbars=no,resizable=no,width=" + wd +",height=" + he + ";")
    openWindow.focus();
}



// FOR PRODUCT PAGES PRINTING SCRIPT
function printDiv () {
  if (document.all && window.print) {
    window.onbeforeprint = beforeDivs;
    window.onafterprint = afterDivs;
    window.print();
  }
}
function beforeDivs () {
  if (document.all) {
    objContents.style.display = 'none';
    objSelection.innerHTML = document.all['d1'].innerHTML;
  }
}
function afterDivs () {
  if (document.all) {
    objContents.style.display = 'block';
    objSelection.innerHTML = "";
  }
}


/***********************************************************************
* 아이프레임 사이즈자동조절 소스 2
***********************************************************************/
function Resize_Frame(name)
{
    Resize_Proc(name);

    var fName = "Resize_Proc('" + name + "')";

    setTimeout(fName,1);
}

function Resize_Proc(name)
{
    var Frame_Body  = document.frames(name).document.body;
    var Frame_name  = document.all(name);

    Frame_name.style.width = Frame_Body.scrollWidth + (Frame_Body.offsetWidth-Frame_Body.clientWidth);
    Frame_name.style.height = Frame_Body.scrollHeight + (Frame_Body.offsetHeight-Frame_Body.clientHeight);

    if (Frame_name.style.height == "0px" || Frame_name.style.width == "0px")
    {
        Frame_name.style.width = "300px";       //기본 iframe 너비
        Frame_name.style.height = "30px";      //기본 iframe 높이
        window.status = 'iframe resizing fail.';
    }
    else
    {
        window.status = '';
    }
}


function reSize() {
    try{
    var objBody = ifrm.document.body;
    var objFrame = document.all["ifrm"];

    ifrmHeight = objBody.scrollHeight + (objBody.offsetHeight - objBody.clientHeight);

    if (ifrmHeight > 300) {
        objFrame.style.height = ifrmHeight
    }else{
        objFrame.style.height = 300;
    }
        objFrame.style.width = '750'
    }catch(e){}
}


function flash(url, width, height){
    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+width+'" height="'+height+'">');
    document.write('<param name="allowScriptAccess" value="sameDomain" />');
    document.write('<param name="movie" value="'+url+'" />');
    document.write('<param name="quality" value="high" />');
    document.write('<param name=wmode value=transparent />');
    document.write('<embed src="'+url+'" quality="high" bgcolor="#000000" width="'+width+'" height="'+height+'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
    document.write('</object>');
}

function openWin(url,winName,width,height,scroll)
{
    window.open( url , winName,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=" + scroll + ",resizable=no,width=" + width + ",height=" + height);
    return ;
}

//win open
function winOpen2(location, name, w, h,scYn)
{
      LeftPosition=(screen.width)?(screen.width-w)/2:100;
      TopPosition=(screen.height)?(screen.height-h)/2:100;
      var OpenWindow = window.open(location, name, 'resizable=0,scrollbars='+scYn+',status=0,width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition);
      OpenWindow.focus();
}
//win open
function winOpen3(location, name, w, h,scYn)
{
      LeftPosition=50;
      TopPosition=50;
      var OpenWindow = window.open(location, name, 'resizable=0,scrollbars='+scYn+',status=0,width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition);
      OpenWindow.focus();
}


function openWinModal( url,winName,width,height,scroll )
{
    var result = "false";
    result = window.showModalDialog(url,winName,"dialogWidth:" + width + "px;dialogHeight:" + height + "px;center:yes; help:no; status:no; scroll:" + scroll + "; resizable:no");

    if( result == null )
        return;

    return result;
}


/*  Function Equivalent to java.net.URLEncoder.encode(String, "UTF-8")

    Copyright (C) 2002, Cresc Corp.

    Version: 1.0

*/
function encodeURL(str){

    var s0, i, s, u;

    s0 = "";                // encoded str

    for (i = 0; i < str.length; i++){   // scan the source

        s = str.charAt(i);

        u = str.charCodeAt(i);          // get unicode of the char

        if (s == " "){s0 += "+";}       // SP should be converted to "+"

        else {

            if ( u == 0x2a || u == 0x2d || u == 0x2e || u == 0x5f || ((u >= 0x30) && (u <= 0x39)) || ((u >= 0x41) && (u <= 0x5a)) || ((u >= 0x61) && (u <= 0x7a))){       // check for escape

                s0 = s0 + s;            // don't escape

            }

            else {                  // escape

                if ((u >= 0x0) && (u <= 0x7f)){     // single byte format

                    s = "0"+u.toString(16);

                    s0 += "%"+ s.substr(s.length-2);

                }

                else if (u > 0x1fffff){     // quaternary byte format (extended)

                    s0 += "%" + (oxf0 + ((u & 0x1c0000) >> 18)).toString(16);

                    s0 += "%" + (0x80 + ((u & 0x3f000) >> 12)).toString(16);

                    s0 += "%" + (0x80 + ((u & 0xfc0) >> 6)).toString(16);

                    s0 += "%" + (0x80 + (u & 0x3f)).toString(16);

                }

                else if (u > 0x7ff){        // triple byte format

                    s0 += "%" + (0xe0 + ((u & 0xf000) >> 12)).toString(16);

                    s0 += "%" + (0x80 + ((u & 0xfc0) >> 6)).toString(16);

                    s0 += "%" + (0x80 + (u & 0x3f)).toString(16);

                }

                else {                      // double byte format

                    s0 += "%" + (0xc0 + ((u & 0x7c0) >> 6)).toString(16);

                    s0 += "%" + (0x80 + (u & 0x3f)).toString(16);

                }

            }

        }

    }

    return s0;

}



/*  Function Equivalent to java.net.URLDecoder.decode(String, "UTF-8")

    Copyright (C) 2002, Cresc Corp.

    Version: 1.0

*/

function decodeURL(str){

    var s0, i, j, s, ss, u, n, f;

    s0 = "";                // decoded str

    for (i = 0; i < str.length; i++){   // scan the source str

        s = str.charAt(i);

        if (s == "+"){s0 += " ";}       // "+" should be changed to SP

        else {

            if (s != "%"){s0 += s;}     // add an unescaped char

            else{               // escape sequence decoding

                u = 0;          // unicode of the character

                f = 1;          // escape flag, zero means end of this sequence

                while (true) {

                    ss = "";        // local str to parse as int

                        for (j = 0; j < 2; j++ ) {  // get two maximum hex characters for parse

                            sss = str.charAt(++i);

                            if (((sss >= "0") && (sss <= "9")) || ((sss >= "a") && (sss <= "f"))  || ((sss >= "A") && (sss <= "F"))) {

                                ss += sss;      // if hex, add the hex character

                            } else {--i; break;}    // not a hex char., exit the loop

                        }

                    n = parseInt(ss, 16);           // parse the hex str as byte

                    if (n <= 0x7f){u = n; f = 1;}   // single byte format

                    if ((n >= 0xc0) && (n <= 0xdf)){u = n & 0x1f; f = 2;}   // double byte format

                    if ((n >= 0xe0) && (n <= 0xef)){u = n & 0x0f; f = 3;}   // triple byte format

                    if ((n >= 0xf0) && (n <= 0xf7)){u = n & 0x07; f = 4;}   // quaternary byte format (extended)

                    if ((n >= 0x80) && (n <= 0xbf)){u = (u << 6) + (n & 0x3f); --f;}         // not a first, shift and add 6 lower bits

                    if (f <= 1){break;}         // end of the utf byte sequence

                    if (str.charAt(i + 1) == "%"){ i++ ;}                   // test for the next shift byte

                    else {break;}                   // abnormal, format error

                }

            s0 += String.fromCharCode(u);           // add the escaped character

            }

        }

    }

    return s0;

}

function goElearnSubPage(type, sub)
{
    if( type == "1" ) goElearnPage("2", "");
    if( type == "3" ) goElearnPage("2", "");
    if( type == "2" ) goElearnPage("2", "");
}

function allChecked(allCheckObj, checkBoxName){
    var checked	= false;
    var checkObj = document.getElementsByName(checkBoxName);

    if(checkObj==null) return;
    for(ci=0;ci<checkObj.length;ci++){
        if(checkObj[ci].type!='checkbox') return;
    }
    var checkedCnt=0;
    for(ci=0;ci<checkObj.length;ci++){
         if(checkObj[ci].checked) checkedCnt++;
    }
    if(checkedCnt==checkObj.length){
        for(ci=0;ci<checkObj.length;ci++){
            checkObj[ci].checked=false;
        }
    }else if(checkedCnt<checkObj.length){
        if (allCheckObj.checked) {
            checked = true;
        } else {
            checked = false;
        }
        for(ci=0;ci<checkObj.length;ci++){
            checkObj[ci].checked=checked;
        }
    }
}

function send()
{
    var f = document.form1;
    if( f.rloginID.value == "" )
    {
        alert("아이디를 입력하세요");
        f.rloginID.focus();
        return;
    }
    if( f.rloginPWD.value == "" )
    {
        alert("비밀번호를 입력하세요");
        f.rloginPWD.focus();
        return;
    }

    f.submit();
}

function enter(index)
{
    var f = document.form1;

    if( event.keyCode == 13 )
    {
        if( index == 1 )
        {
            f.rloginPWD.focus();
        }
        else if( index == 2 )
        {
            send();
        }
    }
}
function noticeToggle(checkVar){

   if(checkVar=="Y"){//공지게시물
      document.getElementsByName("allCateYN")[0].disabled=false;
      if (document.getElementsByName("allCateYN")[0].checked) {
          document.all.table_tag.style.display="none";
      } else {
          document.all.table_tag.style.display="";
      }
    }
    else if(checkVar=="N"){//일반게시물
      cate_views_disabledYN('');
      document.getElementsByName("allCateYN")[0].checked=false;
      document.getElementsByName("allCateYN")[0].disabled=true;
      document.all.table_tag.style.display="";
    }
}

function init()
{
    document.form1.rloginID.focus();
}

/*
 * Function Equivalent to java.net.URLEncoder.encode(String, "UTF-8")
*/
function encodeURL(str){

    var s0, i, s, u;
    s0 = "";                // encoded str
    for (i = 0; i < str.length; i++){   // scan the source
        s = str.charAt(i);
        u = str.charCodeAt(i);          // get unicode of the char
        if (s == " "){s0 += "+";}       // SP should be converted to "+"
        else {
            if ( u == 0x2a || u == 0x2d || u == 0x2e || u == 0x5f || ((u >= 0x30) && (u <= 0x39)) || ((u >= 0x41) && (u <= 0x5a)) || ((u >= 0x61) && (u <= 0x7a))){       // check for escape
                s0 = s0 + s;            // don't escape
            }
            else {                  // escape
                if ((u >= 0x0) && (u <= 0x7f)){     // single byte format
                    s = "0"+u.toString(16);
                    s0 += "%"+ s.substr(s.length-2);
                }
                else if (u > 0x1fffff){     // quaternary byte format (extended)
                    s0 += "%" + (oxf0 + ((u & 0x1c0000) >> 18)).toString(16);
                    s0 += "%" + (0x80 + ((u & 0x3f000) >> 12)).toString(16);
                    s0 += "%" + (0x80 + ((u & 0xfc0) >> 6)).toString(16);
                    s0 += "%" + (0x80 + (u & 0x3f)).toString(16);
                }
                else if (u > 0x7ff){        // triple byte format
                    s0 += "%" + (0xe0 + ((u & 0xf000) >> 12)).toString(16);
                    s0 += "%" + (0x80 + ((u & 0xfc0) >> 6)).toString(16);
                    s0 += "%" + (0x80 + (u & 0x3f)).toString(16);
                }
                else {                      // double byte format
                    s0 += "%" + (0xc0 + ((u & 0x7c0) >> 6)).toString(16);
                    s0 += "%" + (0x80 + (u & 0x3f)).toString(16);
                }
            }
        }
    }
    return s0;
}

function decodeURL(str){
    var s0, i, j, s, ss, u, n, f;
    s0 = "";                // decoded str
    for (i = 0; i < str.length; i++){   // scan the source str
        s = str.charAt(i);
        if (s == "+"){s0 += " ";}       // "+" should be changed to SP
        else {
            if (s != "%"){s0 += s;}     // add an unescaped char
            else{               // escape sequence decoding
                u = 0;          // unicode of the character
                f = 1;          // escape flag, zero means end of this sequence
                while (true) {
                    ss = "";        // local str to parse as int
                        for (j = 0; j < 2; j++ ) {  // get two maximum hex characters for parse
                            sss = str.charAt(++i);
                            if (((sss >= "0") && (sss <= "9")) || ((sss >= "a") && (sss <= "f"))  || ((sss >= "A") && (sss <= "F"))) {
                                ss += sss;      // if hex, add the hex character
                            } else {--i; break;}    // not a hex char., exit the loop
                        }
                    n = parseInt(ss, 16);           // parse the hex str as byte
                    if (n <= 0x7f){u = n; f = 1;}   // single byte format
                    if ((n >= 0xc0) && (n <= 0xdf)){u = n & 0x1f; f = 2;}   // double byte format
                    if ((n >= 0xe0) && (n <= 0xef)){u = n & 0x0f; f = 3;}   // triple byte format
                    if ((n >= 0xf0) && (n <= 0xf7)){u = n & 0x07; f = 4;}   // quaternary byte format (extended)
                    if ((n >= 0x80) && (n <= 0xbf)){u = (u << 6) + (n & 0x3f); --f;}         // not a first, shift and add 6 lower bits
                    if (f <= 1){break;}         // end of the utf byte sequence
                    if (str.charAt(i + 1) == "%"){ i++ ;}                   // test for the next shift byte
                    else {break;}                   // abnormal, format error
                }
            s0 += String.fromCharCode(u);           // add the escaped character
            }
        }
    }
    return s0;
}

String.prototype.trim = function()
{
 return this.replace(/(^\s*)|(\s*$)/gi, "");
}

//뉴스레터 신청
function openNewsletter(){
    newsWindow = window.open("/devmain/news/newsletter/newsletter_form.jsp?", "newsletter","height=340,width=550, menubar=no,directories=no,resizable=no,status=no,scrollbars=no");
    newsWindow.focus();
}

//fckeditor 셋팅
function setFckeditorText(siteType, inputName, width, height, toolbar) {
    var oFCKeditor = new FCKeditor( inputName ) ;
    oFCKeditor.BasePath = '/common/FCKeditor/' ;
    oFCKeditor.Width  = width ;
    oFCKeditor.Height   = height ;
    oFCKeditor.ToolbarSet    = toolbar ;
    //oFCkeditor.CheckBrowser = true;
    oFCKeditor.ReplaceTextarea();
}

//fckeditor 셋팅
function setFckeditor(siteType, inputName, width, height, toolbar, value) {
    var oFCKeditor = new FCKeditor( inputName ) ;
    oFCKeditor.BasePath = '/common/FCKeditor/' ;
    oFCKeditor.Width  = width ;
    oFCKeditor.Height   = height ;
    oFCKeditor.ToolbarSet    = toolbar ;
    oFCKeditor.Value    = value ;
    oFCKeditor.Create();
}

//fckeditor 셋팅
function adminFckeditor(inputName, width, height, toolbar) {
    setFckeditorText('devadmin', inputName, width, height, toolbar)
}

//fckeditor 셋팅
function mainFckeditor(inputName, width, height, toolbar) {
    setFckeditorText('devmain', inputName, width, height, toolbar)
}

//RSS주소복사
function copyClipboard(inElement){
    var browserName = navigator.appName;
    if (browserName.search("Explorer") > 0)
    {
        var clip = document.body.createTextRange();
        clip.moveToElementText(inElement);
        //clip.select();
        clip.execCommand('Copy');
    }
    else
    {
        var flashcopier = 'flashcopier';
        if(!document.getElementById(flashcopier))
        {
            var divholder = document.createElement('div');
            divholder.id = flashcopier;
            document.body.appendChild(divholder);
        }
        document.getElementById(flashcopier).innerHTML = '';
        var divinfo = '<embed src="/images/main/image/clipboard.swf" FlashVars="clipboard='+encodeURIComponent(inElement.innerHTML.replace("&amp;","&"))+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';
        document.getElementById(flashcopier).innerHTML = divinfo;
    }
    alert('RSS 주소가 복사 되었습니다.');
}