﻿
function LoginPage() {
    var result = window.showModalDialog('/PorLogin.aspx', '', 'dialogWidth:300px;dialogHeight:230px;');
    if (result == 'ok') {
        try {
            $(".setuser").click()
        } catch (e) {

        }

//        var btnFresh = $("");  //document.getElementById('ctl00_btnSetUser');
//        if (btnFresh != null) {
//            btnFresh.click();
//        }
    }
    else if (result == 'register') {
        window.location.href = "/UserMag/register.aspx";
    }
}



function OpenInfoPage(Target) {
    var result = window.showModalDialog('/NM/NMOrder.aspx?ProId=' + Target, '', 'dialogWidth:500px;dialogHeight:360px;');
    //window.open('/NM/NMOrder.aspx?ProId='+Target,'','dialogWidth:400px;dialogHeight:330px;');
    if (result == 'register') {
        window.location.href = "/UserMag/register.aspx";
    }
    if (result == 'ok') {
        var btnFresh = document.getElementById('btnSetUser');
        if (btnFresh != null) {
            btnFresh.click();
        }
    }
}

function Conf() {

    return confirm('确定进行删除操作吗？');

}


function setIframeHeight(iframe) {
    if (document.getElementById) {
        if (iframe && !window.opera) {
            if (iframe.contentDocument && iframe.contentDocument.body.offsetHeight)
                iframe.height = iframe.contentDocument.body.offsetHeight;
            else if (iframe.Document && iframe.Document.body.scrollHeight)
                iframe.height = iframe.Document.body.scrollHeight;
        }
    }
}

