function activePageHighlight(elm) { var thispage = "/about-boc"; var chosen = ""; if (typeof elm == 'string') elm = document.getElementById(elm); if (!elm) return; var links = elm.getElementsByTagName('a'), chosen = null; //alert(thispage); for (var i = 0; i < links.length; i++) { if(links[i].getAttribute("href",2) == thispage) { chosen = links[i]; } } // alert(chosen); // alert(chosen.nodeName); while (chosen && chosen.className != 'menulist') { if (chosen.nodeName.toLowerCase() == 'li') { chosen.getElementsByTagName('a').item(0).className = 'current-page'; } chosen = chosen.parentNode; } // alert(chosen.nodeName); }; function goToPage(page) { document.location = page; } function getCalendar(year,month,divid,size) { //alert(year+' : '+month); new Ajax.Request('/_ajax/get_calendar.php', { method:'get', parameters:{year:year, month:month, divid:divid, size:size}, onSuccess: function(transport){ //alert(response); var response = transport.responseText || "no response text"; $(divid).update(response); // set up all anchor elements with a class to work with Shadowbox Shadowbox.setup("a.elink", { title: "Branches Of Christ EventsX close", overlayOpacity: 0.8 }); } }); } function printThis(divnum) { if(!divnum) { var newhref = '/_style/printstyle.css'; } else { var newhref = '/_style/print-stylesheet.php?div=' + divnum } var x = document.getElementById('printstyle'); x.setAttribute('href',newhref); window.print(); } // end print stylesheet