﻿// JScript File

function openRatingEditWindow() {
    popupWin=window.showModalDialog('../../myProfile/Rating/RatingEditPopup.aspx','','dialogHeight: 200px; dialogWidth: 500px; center: Yes; help: No; status: No;')
    if ( popupWin == true ) {
        window.location.href = window.document.location.href;
    }
}

function openVehicleInfoEditWindow() {
    popupWin=window.showModalDialog('../../MaintainInventory/VehicleInfo/VehicleInfoEditPopup.aspx','','dialogHeight: 600px; dialogWidth: 600px; center: Yes; help: No; status: No;')
    if ( popupWin == true ) {
        window.location.href = window.document.location.href;
    }
}

function openPlaceBidWindow() {
    popupWin=window.showModalDialog('PlaceBidPopup.aspx','','dialogHeight: 125px; dialogWidth: 300px; center: Yes; help: No; status: No;')
    if ( popupWin == true ) {
        window.location.href = window.document.location.href;
    }
}

function openWillSwapCriteriaPopupWindow() {

    popupWin=window.showModalDialog('WillSwapCriteriaPopup.aspx','','dialogHeight: 200px; dialogWidth: 300px; center: Yes; help: No; status: No;')
    if ( popupWin == true ) {
        window.location.href = window.document.location.href;
    }
}

function openWillSwapCriteriaPopupWindow() {

    popupWin=window.showModalDialog('/DealerNetworkPlus.Web/DNPInventory/WillSwapCriteriaPopup.aspx','','dialogHeight: 200px; dialogWidth: 300px; center: Yes; help: No; status: No;')
    if ( popupWin == true ) {
        window.location.href = window.document.location.href;
    }
}


function openCheckoutCommentsPopupWindow() {
    popupWin=window.showModalDialog('CheckoutCommentsPopup.aspx','','dialogHeight: 200px; dialogWidth: 400px; center: Yes; help: No; status: No;')
    if ( popupWin == true ) {
        window.location.href = window.document.location.href;
    }
}

function openSelectSwapVehiclePopupWindow() {
    popupWin=window.showModalDialog('SelectSwapVehiclePopup.aspx','','dialogHeight: 150px; dialogWidth: 650px; center: Yes; help: No; status: No;')
    if ( popupWin == true ) {
        window.location.href = window.document.location.href;
    }
}

//used to close window
function SelectAndCloseWindow(IsParentPostBackNeeded) { 
	window.returnValue = IsParentPostBackNeeded;
	window.close();
}