<!--
//The function to be called for the onload
function doOnload(strPage)
{
	var Home = "home"
	var Notices = "notices"
	var Timetable = "timetable"
	var Fellowship = "fellowship"
	var MusicGroup = "music_group"
	var Kids = "kids"
	var ContactUs = "contact_us"
	var Links = "links" 

	
	if (strPage == Home)
	{
		//do nothing
	}
	else if (strPage == Notices)
	{
		//do nothing
	}
	else if (strPage == Timetable)
	{
		switchDiv('monday',false);
		switchDiv('tuesday',false);
		switchDiv('wednesday',false);
		switchDiv('thursday',false);
		switchDiv('friday',false);
		switchDiv('saturday',false);
		switchDiv('sunday',true);
		
	}
	else if (strPage == Fellowship)
	{
		//do nothing
	}
	else if (strPage == MusicGroup)
	{
		//do nothing
	}
	else if (strPage == Kids)
	{
		//do nothing
		//alert('Welcome to Kids@COS');
	}
	else if (strPage == ContactUs)
	{
		//do nothing
	}
	else if (strPage == Links)
	{
		//do nothing
	}
	else
	{
	//do nothing
	}
	
}


// Javascript for timetable page

//=======================================================
     //detect browser settings for showing and hiding DIVs
     isNS4 = (document.layers) ? true : false;
     isIE4 = (document.all && !document.getElementById) ? true : false;
     isIE5 = (document.all && document.getElementById) ? true : false;
     isNS6 = (!document.all && document.getElementById) ? true : false;
//=======================================================



function switchDiv(strDivName,bolVisible){
 //identify the element based on browser type
 if (isNS4) {
   objElement = document.layers[strDivName];
 } else if (isIE4) {
   objElement = document.all[strDivName].style;
 } else if (isIE5 || isNS6) {
   objElement = document.getElementById(strDivName).style;
 }
 
 if(isNS4){
     if(!bolVisible) {
       objElement.visibility ="hidden"
     } else {
       objElement.visibility ="visible"
     }     
 }else if(isIE4){
     if(!bolVisible) {
       objElement.visibility = "hidden";
     } else {
       objElement.visibility = "visible";
     }
 } else if (isIE5 || isNS6) {
      if(!bolVisible){
         objElement.display = "none";
      } else {
        objElement.display = "";
        }
      }
}


function popUp(URL) {

day = new Date();
id = day.getTime();
window.open(URL,  id , 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=0,width=400,height=400,left = 200,top = 100');
}

//-->

