function ChangeColor(tableRow, highLight) {
	if (highLight) {
		tableRow.style.backgroundColor = '#fff';
	} else {
		tableRow.style.backgroundColor = '#e5e5e5';
	}
}
function DoNav(theUrl) {
	document.location.href = theUrl;
}
function nImg(a) {
	var x = new Image();
	x.src = a;
	return x;
}
function preCacheImages(arr) {
	var names = ['home','gall','info','blog','home_l','gall_l','info_l','bio','albums','blog_l'];
	var ret = [];
	for (var i=0; i<names.length; i++) {
		ret.push(nImg('/img/'+names[i]+'_on.gif'));
		ret.push(nImg('/img/'+names[i]+'_off.gif'));
	}
	return preCacheImages.cache = ret;
}
preCacheImages();
function rot13(text) {
	var chr, i, ret='';
	for (i=0; i<text.length; i++) {
		chr = text.charCodeAt(i);
		if (chr>=97 && chr<=122) 
			chr=(chr-97+13)%26+97;
		if (chr>=65 && chr <= 90) 
			chr=(chr-65+13)%26+65;
		ret+=String.fromCharCode(chr);
	}
	return ret;
}
function $(a) { return document.getElementById(a); }
function o(o,e,f) {
	if (o.attachEvent) return o.attachEvent('on'+e,f);
	if (o.addEventListener) return o.addEventListener(e,f,false);
	o['on'+e]=f;
}
function navHovers() {
	var 
		i,nav = $('nav') || $('nav2'),
		links = nav.getElementsByTagName('a');
	for (i=0; i<links.length; i++) 
		if (links[i].getElementsByTagName('img').length>0)
			(function (index, img) {
				var 
					cur = img.src,
					over = cur.replace(/on|off/i,'on'),
					out = cur.replace(/on|off/i,'off');
				o(this,'mouseover',function () {
					img.src = over;
				});
				o(this,'mouseout',function () {
					img.src = cur;
				});
			}).apply(links[i],[i,links[i].getElementsByTagName('img')[0]])
}
o(window,'load',navHovers);