﻿function getUnreadMessages()
{          
    $.ajax({  
        type: "POST",  
        url: "Service/KhoroWebService.asmx/GetUnreadMessages",  
        success: function(msg) {
            var result = $(msg).find('string').text();            
            if(result == "0")
            {
                $("#InboxCount1",window.parent.document).html('Inbox'); 
                $("#InboxCount2",window.parent.document).html('Inbox'); 
                $("#InboxCount3",window.parent.document).html('Inbox(0)'); 
            }
            else
            { 
                $("#InboxCount1",window.parent.document).html('Inbox('+result+')'); 
                $("#InboxCount2",window.parent.document).html('Inbox('+result+')'); 
                $("#InboxCount3",window.parent.document).html('Inbox('+result+')'); 
            }
        }
    });
}