    var ca_tz = new Array("Atlantic","Newfoundland","Eastern","Central","Mountain","Pacific")
    var us_tz = new Array("Atlantic","Eastern","Central","Mountain","Pacific","Hawaii")

    function getSchedule(frm)
    {
        var zone = frm.timezone.value;
        var channel = frm.channel.value;
        var country = frm.country.value;
        location.href = "schedule_pop.php?tz=" + zone + "&channel=" + channel + "&country=" + country;
        return false;
    }

    function updateTimezone(country)
    {
       var selZone = document.getElementById("timezone");
       var selectedZone = selZone.value;
       var zoneList;
       switch (country)
       {
            case 'us':
                zoneList = us_tz;
                break;
            case 'ca':
                zoneList = ca_tz;
                break;
       }
       //remove options
        while(selZone.options.length)
         {
           z = selZone.options.length - 1;
           selZone.remove(z);
         }
         //add options

        for(var i = 0; i < zoneList.length; i++)
        {
            selZone.options[i] =  new Option();
             selZone.options[i].text = zoneList[i];
             selZone.options[i].value = zoneList[i];
             if (selZone.options[i].value == selectedZone)
               selZone.options[i].selected = true;
        }
    }

    var stripe = function() {

        var table = document.getElementById("scheduleTable");
        var tbodies = table.getElementsByTagName("tbody");
        
        for (var h = 0; h < tbodies.length; h++) {
          //var even = true;
          var trs = tbodies[h].getElementsByTagName("tr");
          
          for (var i = 0; i < trs.length; i++) {
          
            trs[i].onmouseover=function(){
              this.className += " ruled_2"; return false
            }
            trs[i].onmouseout=function(){
              this.className = this.className.replace("ruled_2", ""); return false
            }

          }
        }
    }  
    
    function doaltListFlyout(hovId, flyId)
    {
        var hov = document.getElementById(hovId);
        var fly = document.getElementById(flyId);
        var hovCoords = findElementPos(hov);
        var scrollTop = Math.max(document.body.scrollTop,document.documentElement.scrollTop);
        //console.log("avleft: " + avCoords.x + ", avTop:" +  avCoords.y);
        fly.style.display = "block";

        //position a bit above the avatar unless near top of browser
        var y = hovCoords.y + 15;
        if (hovCoords.y < (scrollTop + 10))
            y = scrollTop + 5;

        fly.style.left = (hovCoords.x - 50) + "px";
        fly.style.top = y + "px";
    }

    function killaltListFlyout(flyId)
    {
       var fly = document.getElementById(flyId);
       fly.style.display = "none";
    }

    window.onload = stripe;
    
