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

//광고 팝업 띄우기
function ad_pop(uid, url, width, height){
    new Ajax.Request("/main/count_hit.html",{
            method : 'POST',
            parameters : "uid=" + uid
            });

    var imgwidth = Number(width) + Number(20);
    var imgheight = Number(height) + Number(30);

    if (width) {
        window.open(url,'pop','width=' + imgwidth + ',height='+imgheight);
    } else {
        window.open(url,'pop');
    }
}
function search(){
    doc = document.search_form;
    if(doc.code.options[doc.code.selectedIndex].value != '') {
        doc.more.value = 'Y';
    }
    doc.submit();
}
