//initialize rollovers.
window.onload = rolloverInit;

//go thru imgs inside A tags
function rolloverInit() {
	for (var i=0; i<document.images.length; i++) {
		if (document.images[i].parentNode.tagName == "A") {
			setupRollover(document.images[i]);	
		}
	}
}

//set sources & swap
function setupRollover(thisImage) {
	thisImage.outImage = new Image();
	thisImage.outImage.src  = thisImage.src;
	thisImage.onmouseout = rollOut;
	
	thisImage.overImage = new Image();
	thisImage.overImage.src = "nav/images/" + thisImage.id + "Ov.jpg";
	thisImage.onmouseover = rollOver;
}

function rollOut() {
	this.src = this.outImage.src;	
}

function rollOver() {
	this.src = this.overImage.src;	
}

//add bookmark
function bookmarkMe(title,url){
if (window.sidebar)
	window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){
	var elem = document.createElement('a');
	elem.setAttribute('href',url);
	elem.setAttribute('title',title);
	elem.setAttribute('rel','sidebar');
	elem.click();
} 
else if(document.all)
	window.external.AddFavorite(url, title);
}