//
//  Generic Show/Hide functions
//
function show(n) { document.getElementById(n).style.display = 'block'; }
function hide(n) { document.getElementById(n).style.display = 'none';  }

function showhide(n)
{
    if (document.getElementById(n).style.display === 'block')
        { document.getElementById(n).style.display = 'none'; }
    else
        { document.getElementById(n).style.display = 'block'; }
}

//  Show/Hide function for testimonials page
function showSwap(n)
{
    if (document.getElementById(n+"_clip").style.display === 'block') {
        document.getElementById(n+"_clip").style.display = 'none';
        document.getElementById(n+"_text").style.display = 'block';
        }
    else {
        document.getElementById(n+"_clip").style.display = 'block';
        document.getElementById(n+"_text").style.display = 'none';
        }
}

//  Show/Hide function for Information Form
function swapInfo_Parent(n)
    {
    if (n === 'yes') {
        document.getElementById("getparent_yes1").style.display = "block";
        document.getElementById("getparent_yes2").style.display = "block";
        document.getElementById("getparent_yes3").style.display = "block";
        document.getElementById("getparent_no").style.display = "none";
        }
    else {
        document.getElementById("getparent_yes1").style.display = "none";
        document.getElementById("getparent_yes2").style.display = "none";
        document.getElementById("getparent_yes3").style.display = "none";
        document.getElementById("getparent_no").style.display = "block";
        }
    }

//
//  Show/Hide the make-up date if the message requires it
//
function checkMakeupDate()
    {
    var select = document.getElementById("stdMessages");
    var msgtxt = select.options[select.selectedIndex].text;

    if ( msgtxt.indexOf('[Make-up Date]') === -1 )
        {
        document.getElementById("makeup1").style.display = "none";
        document.getElementById("makeup2").style.display = "none";
        }
    else
        {
        document.getElementById("makeup1").style.display = "block";
        document.getElementById("makeup2").style.display = "block";
        }
    }

//
//  Show/Hide function for Parent Name input on Information Form.
//
function addMediaHtml (id)
    {
    return;
    if ( !$.browser.msie )  { return; }

    var file;

    if      (id == "Home")        { file = 'TheMonastery.mp3'; }
    else if (id == "About")       { file = 'OldJoeClark.mp3'; }
    else if (id == "Students")    { file = 'AshokanFarewell.mp3'; }
    else if (id == "Testimonials"){ file = 'Sonate_Adagio.mp3'; }
    else if (id == "NetLessons")  { file = 'MorritzsTheme.mp3'; }
    else if (id == "Contact")     { file = 'CapriceInAminor.mp3'; }
    else if (id == "InfoForm")    { file = 'MinuetInG.mp3'; }
    else if (id == "Studio")      { file = 'WaltzingInThePark.mp3'; }
    else if (id == "Bens")        { file = 'Presto_Summer_The4Seasons.mp3'; }

    if ( file ) {
        var code  = '<embed autostart="true" hidden="false" loop="false" '
                  + 'src="http://www.speedybeers.com/music/'+file+'"></embed>';
        document.getElementById("music_player").innerHTML = code;
        }
    }


 function whatBrowser ()
     {
     if (document.all)            { return 'ie';  }
     if (document.layers)         { return 'nav'; }
     if (document.getElementById) { return 'std'; }
     return '';
     }


// Calendar Functions
function nosunlesson() {
    alert("There are no lessons on Sunday.");
}

function fifthday(daytype) {
    alert("There are five "+daytype+"'s in the month.  There will be no lessons on this day.");
}


