// CSS Switcher Function
function switchStylestyle(styleName) {
    $('link[@rel*=style][title]').each(function(i) {
        this.disabled = true;
        if (this.getAttribute('title') == styleName) this.disabled = false;
    });
    createCookie('style', styleName, 365);
}

// Greeting
function greeting() {
    day = new Date()
    hr = day.getHours()

    if ((hr >= 0) && (hr <= 11))
        document.write("Good Morning")
    if ((hr >= 12) && (hr <= 17))
        document.write("Good Afternoon")
    if ((hr >= 18) && (hr <= 23))
        document.write("Good Evening")
}

// Configure status message not to show
var statusmsg = ""
function hidestatus() {
    window.status = statusmsg
    return true
}

// Contact Form Only allow numeric input
function isNumberKey(evt) {
    var charCode = (evt.which) ? evt.which : evt.keyCode;

    if (charCode > 31 && (charCode < 48 || charCode > 57))
        return false;

    return true;
}

// Breadcrumb
jQuery(document).ready(function() {

    // Bread Crumb
    jQuery("#breadCrumb").jBreadCrumb();
    jQuery("#breadCrumbFooter").jBreadCrumb();

    // Drop Down
    jQuery("body .msDropDown").msDropDown();

    // Fader
    jQuery('.fade_effect').fadeIn(2000);

    // CSS Switcher
    $('.styleswitch').click(function() {
        switchStylestyle(this.getAttribute("rel"));
        return false;
    });
    var c = readCookie('style');
    if (c) switchStylestyle(c);
});

// Resource Center Audio Player http://flash-mp3-player.net/players/maxi/
function play() {
document.getElementById("audioplayer").SetVariable("player:jsPlay", "");
}