var ns4 = (document.layers);
var ie4 = (document.all && !document.getElementById);
var ie5 = (document.all && document.getElementById);
var ns6 = (!document.all && document.getElementById);

//startID is the id tag of the first item to toggle
//finishID is the id tag of the last item to toggle
//multiple is the number of id tags to skip
//same applies to toggleSession, toggleWeek and toggleAll
//each id must be numeric and consectutive


function toggleSession(startID,finishID,multiple,toggle) 
{  

  if (toggle == 1) 
  {
 
    // Netscape 4 NOT FINISHED YET
    if(ns4)
    {
      document.layers[id].visibility = "show";
    }
	
    // Explorer 4 NOT FINISHED YET
    else if(ie4)
    {
      document.all[id].style.visibility = "visible";
    }

    // Explorer 5+ and Netscape 6+
    else if(ie5 || ns6)
    {	
      document.getElementById(startID).style.display = "none";
      startID = startID + 1;
      for(count = startID ; count < finishID + 1; count)
      {       
        document.getElementById(startID).style.display = "";
        startID = startID + multiple;
        count = count + multiple;
      }
    }
  }

  else 
  {

    // Netscape 4 NOT FINISHED YET
    if(ns4)
    {
      document.layers[id].visibility = "show";
    }

    // Explorer 4 NOT FINISHED YET
    else if(ie4)
    {
      document.all[id].style.visibility = "visible";
    }
	
    // Explorer 5+ and Netscape 6+
    else if(ie5 || ns6)
    {
      document.getElementById(startID).style.display = "";
      startID = startID + 1;
      for(count = startID ; count < finishID + 1; count) 
      { 
        document.getElementById(startID).style.display = "none";
        startID = startID + multiple;
        count = count + multiple;
      }
    }
  }
}


function pop(theURL,winName,features) {
  popwin = window.open(theURL,winName,features);
  popwin.focus();
}
