﻿function goList(SCIdx) {
    var CIdx = document.getElementById("hdnSelCIdx").value;
    document.location.href = "/Style/CategoryMain.aspx?CategoryIdx=" + CIdx + "&SCtIdx=" + SCIdx;
}
function goDetailPage(SCIdx, strStyleCode) {
    document.location.href = "/Style/StyleDetail.aspx?StyleCode=" + strStyleCode + "&SCtIdx=" + SCIdx + "&" + document.getElementById("hDetailViewParam").value;
}

function popCloseUpStyle(StyleCode) {
    if (StyleCode == "") {
        alert("스타일 코드가 없습니다.");
        return false;
    }
    var boxwidth = "638";
    var boxheight = "386";
    var strURL = "/Style/PopStyleCloseUp.aspx?StyleCode=" + StyleCode;
    var mask = $J("<div />");
    mask.addClass('mask');
    mask.attr('id', 'mask');
    mask.height($J(document).height() + "px");
    mask.appendTo('body');

    var box = $J('<div />');
    box.addClass('box');
    box.attr('id', 'pe_pop');
    box.attr('style', 'display:block');
    box.attr('style', 'boarder:0');
    //box.attr('style', 'padding-top:0px;padding-left:3px;');
    box.width(boxwidth + "px");
    box.height(boxheight + "px");
    box.css('left', (document.documentElement.offsetWidth - boxwidth) / 2);

//    alert($J(window).scrollTop());
    
    box.css('top', $J(window).scrollTop() + 200);
    box.appendTo('body');

    var iframe = $J('<iframe  frameborder=0 scrolling=no />');
    iframe.attr('id', 'Ifrm');
    iframe.attr("src", strURL);
    iframe.width("650px");
    iframe.height("400px");
    iframe.appendTo('#pe_pop');
}

function popSizeView() {
    var boxwidth = "566";
    var boxheight = "514";
    var strURL = "/Style/PopSizeView.aspx"
    var mask = $J("<div />");
    mask.addClass('mask');
    mask.attr('id', 'mask');
    mask.height($J(document).height() + "px");
    mask.appendTo('body');

    var box = $J('<div />');
    box.addClass('box');
    box.attr('id', 'pe_pop');
    box.attr('style', 'display:block');
    box.attr('style', 'boarder:0');
    //box.attr('style', 'padding-top:0px;padding-left:3px;');
    box.width(boxwidth + "px");
    box.height(boxheight + "px");

    
    box.css('left', (document.documentElement.offsetWidth - boxwidth + 273) / 2);

    //    alert($J(window).scrollTop());

    box.css('top', $J(window).scrollTop() + 200);
    box.appendTo('body');

    var iframe = $J('<iframe  frameborder=0 scrolling=no />');
    iframe.attr('id', 'Ifrm');
    iframe.attr("src", strURL);
    iframe.width("566px");
    iframe.height("514px");
    iframe.appendTo('#pe_pop');
}

function closePop() {
    $J("#mask").remove();
    $J("#pe_pop").remove();
}
