// Accommodate browsers that will not dynamically regenerate
// the DOM when the browser window has been resized

function reDo() { 
 window.location.reload(); 
 } 

window.onresize = reDo; 

//Define global variables 
var timerID = null; 
var timerOn = false; 
var timecount = 5000; 
// Change this to the time delay that you desire 
var what = null; 
var newbrowser = true; 
var check = false; 

// Determines browser version and assigns values to variable
function init() { 
 if (document.layers) { 
 layerRef="document.layers"; 
 styleSwitch=""; 
 visibleVar="show"; 
 what ="ns4"; 
 } 
 else if(document.all) { 
 layerRef="document.all"; 
 styleSwitch=".style"; 
 visibleVar="visible"; 
 what ="ie4"; 
 } 
 else if(document.getElementById) { 
 layerRef="document.getElementByID"; 
 styleSwitch=".style"; 
 visibleVar="visible"; 
 what="dom1"; 
 } 
 else { 
 what="none"; 
 newbrowser = false; 
 } 
check = true; 
} 


// Toggles any layer visibility on 
function showLayer(layername) { 
 if(check) { 
 if (what =="none") { 
 return; 
 } 
 else if (what == "dom1") { 
 document.getElementById(layername).style.visibility="visible"; 
 } 
 else { 
 eval(layerRef+'["'+layername+'"]'+styleSwitch+'.visibility="visible"'); 
 } 
 } 
 else { 
 return; 
 } 
 } 


// Toggles any layer visibility off 
function hideLayer(layername) { 
 if(check) { 
 if (what =="none") { 
 return; 
 } 
 else if (what == "dom1") { 
 document.getElementById(layername).style.visibility="hidden"; 
 } 
 else { 
 eval(layerRef+'["'+layername+'"]'+styleSwitch+'.visibility="hidden"'); 
 } 
 } 
 else { 
 return; 
 } 
 }


function hideAll() { 
 hideLayer('about_us_subs'); 
 hideLayer('programs_subs'); 
 hideLayer('how_to_help_subs'); 

 } 


// Deal w/timer
function startTime() { 
 if (timerOn == false) { 
 timerID=setTimeout( "hideAll()" , timecount); 
 timerOn = true; 
 } 
 } 

function stopTime() { 
 if (timerOn) { 
 clearTimeout(timerID); 
 timerID = null; 
 timerOn = false; 
 } 
 } 


// Deal w/page load to start
function onLoad() { 
 init(); 
 } 


