﻿var pageMethodOutcome;

function SealOrder()
{
    // IMD change AJAX call to seal to ASPX now the confirm page is not posting directly to ePDQ or PayPal
    if (!confirm("You will no longer be able to amend your order once the payment process has started.\nAre you sure you wish to proceed to the payment process now?"))
        return false;
    else
        return true;
//    PageMethods.SealOrder(OnSucceeded, OnFailed);
//    return pageMethodOutcome;
}

// Callback function invoked on successful 
// completion of the page method.
function OnSucceeded(result, userContext, methodName) 
{
    if (methodName == "SetOrderSealed")
        pageMethodOutcome = result;
}

// Callback function invoked on failure 
// of the page method.
function OnFailed(error, userContext, methodName) 
{
    if(error !== null)
        alert(error.get_message());
    pageMethodOutcome = false;
}

/* ------------------------------------------------- browsetracks.aspx ------------------------------------------------- */
var ContentIDPassed;
var f;

function NewCustomDiskRequired(contentID)
{
    ContentIDPassed = contentID;
    var f = PageMethods.IsNewCustomDiskRequired(ContentIDPassed, OnSucceeded_NewCustomDiskRequired);
    alert(f);
}

// Callback function invoked on successful 
// completion of the page method.
function OnSucceeded_NewCustomDiskRequired(result, userContext, methodName) 
{
    f = result;
}

// Callback function invoked on failure 
// of the page method.
function OnFailed_NewCustomDiskRequired(error, userContext, methodName) 
{
    if(error !== null)
        alert(error.get_message());
    pageMethodOutcome = false;
}

function AddNewCustomDiskWithContent()
{
}
/* ------------------------------------------------- browsetracks.aspx ------------------------------------------------- */

if (typeof(Sys) !== "undefined") Sys.Application.notifyScriptLoaded();

