﻿var sURL = unescape(window.location.pathname);

function RemoveNewsArticle(ID)
{
    if (window.confirm('Are you sure you wish to remove this item?'))
    {
        NewsCMSTemplate.NewsAdmin.DBRemoveNewsArticle(ID, OnComplete, OnTimeOut, OnError);  
    }
    else
    {    
        return false;
    }               
}
function DBUpdateArticeLiveStatus(ID)
{

    NewsCMSTemplate.NewsAdmin.DBUpdateArticeLiveStatus(ID, OnLiveComplete, OnTimeOut, OnError);  
}
function RemoveNewsLetter(ID)
{
    if (window.confirm('Are you sure you wish to remove this Newsletter?'))
    {
        NewsCMSTemplate.NewsAdmin.DBRemoveNewsLetter(ID, OnComplete, OnTimeOut, OnError);  
    }
    else
    {    
        return false;
    }               
}
function DBUpdateNewsLetterLiveStatus(ID)
{

    NewsCMSTemplate.NewsAdmin.DBUpdateNewsLetterLiveStatus(ID, OnLiveComplete, OnTimeOut, OnError);  
}
function OnComplete(retResult) 
{
    alert ('Article removed successfully!');
    window.location.replace( sURL );
}
function OnLiveComplete(retResult) 
{
    window.location.replace( sURL );
}
function OnTimeOut(retResult)
{
    alert (retResult);
}

function OnError(retResult)
{
    alert (retResult);
}
