function custom_alert(output_msg, title_msg)
{
    if (!title_msg)
        title_msg = 'Alert';

    if (!output_msg)
        output_msg = 'No Message to Display.';

    $("<div></div>").html(output_msg).dialog({
        title: title_msg,
        resizable: false,
        modal: true,
        buttons: {
            "OK": function() 
            {
                $( this ).dialog( "close" );
            }
        }
    });
}

function expired_alert()
{
    title_msg = 'Expired Demo';
    output_msg = "<p>This <b>demo has expired!</b> Only twenty entries will be displayed in the data tables.</p><p>Please <b>buy</b> the application, <b>enter your license code</b> to authenticate the installation or contact us to extend your demo.</p>";

    $("<div></div>").html(output_msg).dialog({
        title: title_msg,
        resizable: false,
        modal: true,
        buttons: {
			"Buy Now": function() 
            {
				window.open('lib/php/links.php?r=buynow');
                $( this ).dialog( "close" );
            },
            "OK": function() 
            {
                $( this ).dialog( "close" );
            }
        },
		open: function ()
        {
			$('.ui-button').blur();
        }
    });
}