// Google Internal Site Search script- By JavaScriptKit.com (http://www.javascriptkit.com)
// For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/
// This notice must stay intact for use

var domainroot="www.deafoutreachbc.ca"; //Enter domain of site to search.

function Gsitesearch(curobj){
	curobj.q.value="site:"+domainroot+" "+curobj.search.value;
}


// alternate row colors for data tables 

function alternateColors() {
	if (!document.getElementById || !document.getElementsByTagName) {
		return false;
	}
	var tables, rows;
	tables = document.getElementsByTagName("table");
	for (var i=0; i<tables.length; i++) {
		if (tables[i].className.match("alternateRows")) {
			rows = tables[i].getElementsByTagName("tr");
				for (var i=0; i<rows.length; i=i+2) {
					rows[i].className = 'odd';
				}
		}
	}
}


// highlight link to current page (side navigation)

function highlightNavigation () {
	if (!document.getElementById || !document.getElementsByTagName) {
		return false;
	}
	var navigation, nav_links;
	navigation = document.getElementById("nav");
	nav_links = navigation.getElementsByTagName("a");
	for (var i=0; i<nav_links.length; i++) {
		if (document.location.href.indexOf(nav_links[i].href)!=-1) {
		   nav_links[i].className = "active";
		}
	}
}


window.onload = function () {
	alternateColors();
	highlightNavigation ()
}