//ÆË¾÷Ã¢ ¶ç¿ì±â
function Pop_Open(ref, title, w, h) {
    var window_left = (screen.width-640)/2;
    var window_top = (screen.height-550)/2;
    popup=window.open(ref,title,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no, width=' + w + ',height=' + h + ',top=' + window_top + ',left=' + window_left + '');
    popup.focus();
}

// open modal window
function openModal(obj, file_name, width, height)
{
    var rand = Math.random() * 4;
    window.showModalDialog(file_name + '?rand=' + rand, obj, 'dialogWidth=' + width + 'px;dialogHeight=' + height + 'px;dialogLeft=300px;dialogTop=100px;resizable=no;status=no;scroll=no;help=no');
}

// ¼¿·ºÆ®¹Ú½º¿¡¼­ url ÀÌµ¿ÇÏ±â 2003-07-16
function goSvc(sel)
{
    var gourl = sel[sel.selectedIndex].value;
    if (gourl != "") {
        window.location.href = gourl;
    }
}


function MM_NewwinMenu(targ,selObj,restore){ //v3.0
  open(selObj.options[selObj.selectedIndex].value);
  if (restore) selObj.selectedIndex=0;
}



function confirm_go(gourl, msg) {
    if(confirm(msg)==true) {
        location.href = gourl;
    }
    else 
    return false; 
}



//¼¿·ºÆ®½Ã¿¡ ¼±ÅÃÇÑ Ç×º¹À» selected ÇÏ°Ô ÇÔ 2004-05-25 
function setSelect(obj,value){
    if(value){
      var str = "document.all['"+obj+"'].value = '"+value+"';";
      eval(str);
    }
}

//Ã¼Å©¹Ú½º Ç¥½ÃÇÏ±â
function set_chkbox(form_, seq)
{
    var tempval=eval(form_ + "[" + seq + "]")
    tempval.checked=true;
}



// getÀ¸·Î ³Ñ±æ¶§ 
function goSearch(urlData) {
    location.href = urlData;
}



//ÄÞ¸¶ ³Ö±â(Á¤¼ö¸¸ ÇØ´ç) 
function comma(val) { 
    val = get_number(val); 
    if(val.length <= 3) return val; 

    var loop = Math.ceil(val.length / 3); 
    var offset = val.length % 3; 

    if(offset==0) offset = 3; 
    var ret = val.substring(0, offset); 

    for(i=1;i<loop;i++) { 
        ret += "," + val.substring(offset, offset+3); 
        offset += 3; 
    } 
    return ret; 
} 



//¹Ì´Ï HEADER Ãâ·Â
function Mini_Header()
{
    var str = "";
    
    str +=" <HTML>\n";
    str +=" <HEAD>\n";
    str +=" <meta http-eqiiv=\"Content-Type\" CONTENT=\"text/html; charset=EUC-KR\">\n";
    str +=" <title>::: ÆË¾÷ :::</title>\n";
    str +=" <meta http-equiv=\"Cache-Control\" content=\"No-Cache\">\n";
    str +=" <meta http-equiv=\"Pragma\" content=\"No-Cache\">\n";
    str +=" <meta http-equiv=\"Expires\" content=\"-1\">\n";
    str +=" <style type=\"text/css\">\n";
    str +=" body, table, tr, td, select, textarea, input{ \n";
    str +="         font-family: tahoma, µ¸¿ò, ±¼¸², seoul, arial, helvetica;\n";
    str +="         font-size: 9pt;\n";
    str +="         color: #000000;\n";
    str +=" }\n";
    str +=" IMG {BORDER: NONE;}\n"; 
    str +=" </style>\n";
    str +=" </HEAD>\n";

    return str;
}



//¹Ì´Ï FOOTER Ãâ·Â
function Mini_Footer(){

    var str = "";

    str += "</body>\n";
    str += "</html>\n";
    return str;
}


// ·Î±×ÀÎ
function login(the_form) {
    alert(the_form);
    the_form.submit();
}

// ·Î±×¾Æ¿ô
function logout(the_form) {
    the_form.submit();
}

//Áñ°ÜÃ£±â ½ºÅ©¸³Æ®
function bookmark(){
    window.external.AddFavorite('http://d.cafe24.com', 'cafe24 µðÀÚÀÎ¼¾ÅÍ')
}

//ÇÃ·¡½Ã ÄÁÆ®·Ñ È°¼ºÈ­
if(!document.__define_CObjectLoader__)
{
    document.__define_CObjectLoader__ = true

    CObjectLoader();
    function CObjectLoader()
    {
        CObjectLoader.load = function(loadStr)
        {
            document.write(loadStr);
        }
    }

}