    var current_alert_box = 0;

    function ShowAlertBox(id)
    {
        if (current_alert_box == id)
        {
            $('#AlertBox' + current_alert_box).toggle();
            return;
        }

        if (document.getElementById('AlertBox' + current_alert_box) != undefined)
        {
            $('#AlertBox' + current_alert_box).css("display", "none");
        }

        $('#AlertBox' + id).css("display", "block");

        $('#AlertBubble' + id).fadeOut(500);

        current_alert_box = id;
    }

    var alert_already_full = 0;

    var mail = null, req = null, pop = null, select = null;

    if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ //test for MSIE x.x;
        var Audio = null;
    }

    if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){ //test for Firefox/x.x or Firefox x.x (ignoring remaining digits);
        mail = new Audio("http://www.authenticsociety.com/file2ff.wav");
        req = new Audio("http://www.authenticsociety.com/file6ff.wav");
        pop = new Audio("http://www.authenticsociety.com/popff.wav");
        select = new Audio("http://www.authenticsociety.com/select.wav");
    }
    else
    if (Audio != undefined)
    {
        mail = new Audio("http://www.authenticsociety.com/file2.mp3");
        req = new Audio("http://www.authenticsociety.com/file6.mp3");
        pop = new Audio("http://www.authenticsociety.com/pop.mp3");
        select = new Audio("http://www.authenticsociety.com/select.mp3");
    }

    var snd_arr = [mail, req, pop, select];

    function selsnd()
    {
        if (snd_arr[3] != null)
            snd_arr[3].play();
    }

    function pops()
    {
        if (snd_arr[2] != null)
            snd_arr[2].play();
    }

    function haha()
    {
        if (snd_arr[0] != null)
            snd_arr[0].play();

        var theSquare = $('#NewMailMessageIcon');

        $(theSquare).animate({
                top:"+=25",
                width:"+=5",
                height:"+=5"
            },1000,'easeOutElastic')


    }

    function hahaha()
    {
        if (snd_arr[1] != null)
            snd_arr[1].play();

        var theSquare = $('#FriendRequestIcon');

        $(theSquare).animate({
                top:"+=25",
                width:"+=5",
                height:"+=5"
            },1000,'easeOutElastic')


    }

    function reset()
    {
        var theSquare1 = $('#NewMailMessageIcon');

        $(theSquare1).animate({
                top:"-64px",
                width:"37px",
                height:"20px"
            },1000,'easeOutElastic')

        var theSquare2 = $('#FriendRequestIcon');

        $(theSquare2).animate({
                top:"-64px",
                width:"37px",
                height:"20px"
            },1000,'easeOutElastic')
    }


