﻿function ConfirmDelete(msg)
{
    if(msg==null)
        msg=DeleteRecordMsg;
    return confirm(msg);
};
function WaitAsyncMessage(msg)
{
    
    var sec=document.getElementById("AsyncMessageSection");
    if(sec!=null)
    {
        sec.style.display = "block";
        var msgSection=document.getElementById("spanmsg");
        if(msgSection!=null)
            msgSection.innerHTML=msg;
    }
};
function FinishAsyncMessage()
{
    var sec=document.getElementById("AsyncMessageSection");
    if(sec!=null)
        sec.style.display = "none";
    
};
function GetProperty(obj,propertyName)
{
    var o=obj.attributes.getNamedItem(propertyName);
    if(o!=null)
        return o;
};
function SetProperty(obj,propertyName,value)
{
    var o=obj.attributes.getNamedItem(propertyName);
    if(o!=null)
    {
        
        o.value=value;
    }
    else
    {
        var newatt=obj.attributes.setNamedItem(propertyName);
        newatt.value=value;
    }
};
function showdetail(obj)
{
    var o=$(obj);
    var img=o.children('img');
    var show=o.attr('show');
    var detail=o.parent().children('div.detail');

    if(show=='0')
    {//hide
        o.attr('show','1');
        img[0].className="s";
        detail.show();
    }
    else
    {//show
        o.attr('show','0');
        img[0].className="h";
        detail.hide();
    }
}
function ShareIt(obj)
{
    var o1=$(obj);
    var rssDataId=o1.attr('rssdataid');
    AjaxUtility.ShareIt(rssDataId,
    function (res)
    {
        ShareIt_CallBack(res);
    },
    
    function (s)
    {
        //GetFeedDataTimeOut();
    });
    o1.parent()[0].className="Unshareit";
    $(o1.parent()[0]).html('<span>Shared</span>');
    return false;
}
function ShareIt_CallBack(obj)
{
}
function SetShareItLink()
{
    
    $(document).ready(function() 
    {
        $('.shareit a').click(function() 
        {   
            ShareIt(this)
        });
    });
}
