﻿//--------------------------------------------------------//
// This is the javascript file used on the home page      //
// Author: L Wittman                                      //
// Date: 2/11/08                                          //
//--------------------------------------------------------//

//On Load
// Try to this function, if the page is slow to load
// try again a couple more times to be sure it is done.
//setTimeout("OnLoad(1)",100);
//var retrySec = 1000; // milliseconds to wait until retry on error (1000 = 1 second)
var page = "Ministries"; // Page name and part of left menu name
window.onload = function() {
    try
    {
        document.getElementById('Nav_' + page).className = 'mouseover_leftnav';
        document.getElementById('Nav_Welcome').className = 'leftnav';
        navselected = document.getElementById('Nav_' + page).id;
    }catch(e){}
}
//function OnLoad(index)
//{
//    // Highlight the correct navigation menu on the left
//    try
//    {
//        window.status=index; // Retry status
//        var nav = document.getElementById('Nav_' + page);
//        nav.className = 'mouseover_leftnav';
//        navselected = nav.id;
//        window.status = "Done";
//    }
//    catch(e)
//    {
//        if(index == 1){setTimeout("OnLoad(2)",retrySec);}
//        else if(index == 2){setTimeout("OnLoad(3)",retrySec + 1000);}
//        else{window.status=page;}
//    }
//}
