﻿
// 모달 팝업을 생성한다. (공통모달)
function openModalDialog(wndID, title, width, height, url) {

    openProtoTypeMWnd(wndID, title, width, height, url);

}

// 모달 팝업(ProtoType Alphacube)
function openProtoTypeMWnd(wndID, title, width, height, url) {
    // Window with scrollable text
    var optionValue = {className: 'alphacube',  width: width, height: height, zIndex: 100, resizable: false, title: title, showEffect:Element.show, hideEffect: Element.hide};

    win = new Window(wndID, optionValue);

	win.setURL(url);
	win.setDestroyOnClose();
	win.showCenter(true);
}


// 모달 팝업을 생성한다. (결제모달)
function openPaymentDialog(wndID, title, width, height, url) {

    openPaymentMWnd(wndID, title, width, height, url);

}

// 모달 팝업(ProtoType)
function openPaymentMWnd(wndID, title, width, height, url) {
    // Window with scrollable text
//    var optionValue = {className: 'payment',  width: width, height: height, zIndex: 100, resizable: false, title: title, destroyOnClose: true, recenterAuto:false};
    var optionValue = {className: 'payment',  width: width, height: height, zIndex: 100, resizable: false, title: title, showEffect:Element.show, hideEffect: Element.hide, destroyOnClose: true, recenterAuto:true};

    win = new Window(wndID, optionValue);

	win.setURL(url);
	win.setDestroyOnClose();
//	win.showNCenter(true);
	win.showCenter(true);	
}

// 모달 팝업을 생성한다. (에디터모달)
function openEditorDialog(wndID, title, width, height, url) {

    openEditorMWnd(wndID, title, width, height, url);

}

// 모달 팝업(ProtoType)
function openEditorMWnd(wndID, title, width, height, url) {
    // Window with scrollable text
    var optionValue = {className: 'editor',  width: width, height: height, zIndex: 120, resizable: false, title: title, showEffect:Element.show, hideEffect: Element.hide, destroyOnClose: true, recenterAuto:false};

    win = new Window(wndID, optionValue);

	win.setURL(url);
	win.setDestroyOnClose();
//	win.showNCenter(true);
	win.showCenter(false);	
}




// 모달 팝업을 종료한다.
function closeModalWindow() {

//       Windows.focusedWIndow.getId().setCloseCallback(return false;);      
      Windows.close(Windows.focusedWindow.getId(),event);
//    return false;
//    return false;
//    return true;
    
}

// 모달 팝업을 종료하며 해당 컨트롤로 포커싱한다
//function closeModalWindow(control) {
//    Windows.close(Windows.focusedWindow.getId());
//    control.focus();
//}

function gotoLoginPage() {

    document.location.href='/Member/Login/Login.aspx';
}


function gotoPageHttp(url)
{   
    var fullpath = "http://" + location.host + url;
    location.href = fullpath;
}

function getFullPathHttp(url)
{
    var fullpath = "http://" + location.host + url;
    return fullpath;
}


function gotoPageHttps(url)
{   
    var fullpath = "https://" + location.host + url;
    location.href = fullpath;
}

function getFullPathHttps(url)
{
    var fullpath = "https://" + location.host + url;
    return fullpath;
}
