﻿function goTo(url) {
    location.href = url;
}

function resizeFrame(iframeObj) {

    var innerBody = iframeObj.contentWindow.document.body;
    var innerHeight = innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight);

    if (innerHeight > 250) {
        iframeObj.style.height = innerHeight;
    }
    else {
        iframeObj.style.height = 250;
    }
}


function winOpen(strFNAM, strWIDTH, strHEIGHT) {

    posX = (screen.availWidth - strWIDTH) / 2;
    posY = (screen.availHeight - strHEIGHT) / 2;

    window.open(strFNAM, "", "top=" + posY + ", left=" + posX + ", width=" + strWIDTH + ", height=" + strHEIGHT);
}

/* Trim() 함수 생성 */
var TRIM_PATTERN = /(^\s*)|(\s*$)/g;

String.prototype.Trim = function() {
    return this.replace(TRIM_PATTERN, "");
}


/* 아이디를 통한 오브젝트 반환 */
function get_object_byid(strID) {
    return document.getElementById(strID);
}


/* 엔터키 이벤트에 따른 함수 실행 */
function enterKey(strFUNC) {

    if (event.keyCode == 13) {
        eval(strFUNC);
    }
}

/* 일반적인 링크 */
function linkACT(strURL) {

    location.href = strURL;
}

function btnSER() {
    __doPostBack("top1$lkbSER", "");
}


//원본사이즈 보기
function originalView(strFNAM, strWIDTH, strHEIGHT) {

    cWIDTH = (screen.availWidth - strWIDTH) / 2;
    cHEIGHT = (screen.availHeight - strHEIGHT) / 2;

    window.open("originalView.aspx?FNAM=" + strFNAM, "", "top=" + cHEIGHT + ",left=" + cWIDTH + ",width=" + strWIDTH + ",height=" + strHEIGHT + ",scrollbars=yes");
}

function imgVIEW(strFNAM) {

    document.form1.imgORIG.src = "/upload/product/sang/" + strFNAM;
}


