function DialogMessage(type, element)
{
    var title = "";
    var message = "";
    
    if(type == "no_selected_msg")
    {
        title = "No Selected...";
        message = "No selected track(s) or album(s). Please, select and try again.";
    }
    
    if(type == "add_tracks")
    {
        title = "Add Tracks...";
        message = "Selected tracks were successfully added to your cart.";
    }
    
    if(type == "update_tracks")
    {
        title = "Update Tracks...";
        message = "Selected tracks already exists in your cart and they were updated.";
    }
    
    if(type == "add_album")
    {
        title = "Add Album...";
        message = "Selected album was successfully added to your cart.";
    }
    
    if(type == "update_album")
    {
        title = "Update Album...";
        message = "Selected album already exists in your cart and it was updated.";        
    }
    
    if(type == "buy_empty_msg")
    {
        title = "Buy Selected";
        message = "No selected track(s) or album(s) for buying. Please, select and try again.";
    }
    
    if(type == "buy_balance_msg")
    {
        title = "Refill Balance";
        message = "You don't have enough funds for purchase selected track(s) or album(s). Please, refill your balance and try again.";
    }
    
    if(type == "remove_empty_msg")
    {
        title = "Remove Selected";
        message = "No selected track(s) or album(s) for removal. Please, select and try again.";
    }
    
    jQuery("#container")
        .dialog("option", "title", title)
        .dialog("option", "buttons", {
            "Ok": function(){
                jQuery(this)
                    .dialog("close");
            }
        })
        .dialog("open")
        .html('<p><span class="ui-icon ui-icon-circle-check" style="float:left; margin:0 7px 50px 0;"></span>' + message + '</p>');
}