/*
 * Copyright (c) 2008, Aleajecta
 * All rights reserved.
 * 
 * The Service and any necessary software used in connection with the 
 * Service ("Software") contain proprietary and confidential information 
 * that is protected by applicable intellectual property and other laws.
 * You agree not to modify, rent, lease, loan, sell, distribute or create
 * derivative works based on the Service or the Software, in whole or in part.
 */
/**
 * @author Greenseed
 */
function ConfirmBox(){}(function()
{
    ConfirmBox.eleWrapper = null;
    ConfirmBox.eleText = null;
    ConfirmBox.eleYes = null;
    ConfirmBox.eleNo = null;
    ConfirmBox.eleCancel = null;
    ConfirmBox.savedData = null;
    
    ConfirmBox.show = function(text,onYes,onNo,onCancel)
    {
        ConfirmBox.eleText.innerHTML = text;
        ConfirmBox.eleYes.onmousedown = onYes;
        ConfirmBox.eleNo.onmousedown = onNo;
        ConfirmBox.eleCancel.onmousedown = onCancel;        
        ConfirmBox.eleWrapper.style.display = "block";
    };
    ConfirmBox.hide = function()
    {
        ConfirmBox.eleWrapper.style.display = "none";
        ConfirmBox.eleText.innerHTML = "";
        ConfirmBox.eleYes.onmousedown = "";
        ConfirmBox.eleNo.onmousedown = "";
        ConfirmBox.eleCancel.onmousedown = "";
        ConfirmBox.savedData = null;
    };
})();
commonInit.push
(
    function()
    {
        ConfirmBox.eleWrapper = GetElementById("confirmationBoxWrapper");
        ConfirmBox.eleText = GetElementById("confirmationText");
        ConfirmBox.eleYes = GetElementById("confirmationYes");
        ConfirmBox.eleNo = GetElementById("confirmationNo");
        ConfirmBox.eleCancel = GetElementById("confirmationCancel");
    }
);
