window.addEvent('domready', function() { var myMenu = new MenuMatic(); if ($("wereldklok_select")) { $("wereldklok_select").addEvent('change', function(event) { if (this.value != '') document.location.href ='/world-clock/'+this.value+'.html'; }); } if ($("wereldklok_primary_select")) { $("wereldklok_primary_select").addEvent('change', function(event) { if (this.value != '') document.location.href ='/world-clock/'+this.value+'.html'; }); } if ($("change_calendar")) { $("change_calendar").addEvent('change', function(event) { //setHrefValue(); document.location.href ='/calendar/'+this.value+'.html'; }); } if ($("change_mooncalendar")) { $("change_mooncalendar").addEvent('change', function(event) { //setHrefValue(); document.location.href ='/moon-calendar/'+this.value+'.html'; }); } if ($('send_date')) { $('send_date').addEvent('click',function(event) { setDateUrl(); }); } activateDays(); }); function activateDays() { $$('[id^=day]').each(function(item) { item.addEvents({ 'mouseenter': function(){ sDay = this.id.replace('day_',''); $('sun_'+sDay).addClass('mo'); }, 'mouseleave': function(){ sDay = this.id.replace('day_',''); $('sun_'+sDay).removeClass('mo'); } }); }); var zTables = new ZebraTables('table1'); } function setDateUrl() { location.href ='/calculate/'+$('bereken_datum_start').value+'_'+$('bereken_datum_end').value+'.html'; } function bookmark(url, description) { if (document.all) { window.external.AddFavorite(url, description); } else if (window.sidebar) { window.sidebar.addPanel(description, url, ""); } } var ZebraTables = new Class({ //initialization initialize: function(table_class) { //add table shading $$('table.' + table_class + ' tr').each(function(el,i) { if (!el.hasClass('none')) { //do regular shading var _class = i % 2 ? 'even' : 'odd'; el.addClass(_class); //do mouseover el.addEvent('mouseenter',function() { if(!el.hasClass('highlight')) { el.addClass('mo').removeClass(_class); sDay = el.id.replace('sun_',''); if ($('day_'+sDay)) $('day_'+sDay).addClass('sun_hover'); } }); //do mouseout el.addEvent('mouseleave',function() { if(!el.hasClass('highlight')) { el.removeClass('mo').addClass(_class); sDay = el.id.replace('sun_',''); if ($('day_'+sDay)) $('day_'+sDay).removeClass('sun_hover'); } }); } }); } });