function navlinks(id){
	if (!document.getElementById || !document.getElementsByTagName)
		return false;
	this.navLinks = document.getElementById(id);
	this.links = this.navLinks.getElementsByTagName('a');
	this.switchBg = true;
	this.markCurrent = true;
}
navlinks.prototype.init = function(){
	var mainInstance = this;
	for(var i = 0; i < this.links.length; i++){
		this.links[i].onclick = function(){
			if(mainInstance.switchBg) mainInstance.switchLinkBg(this);
		}
		if(!this.markCurrent) this.links[i].className = "";
	}
}
navlinks.prototype.switchLinkBg = function(linkToLeave){
	for(var i = 0; i < this.links.length; i++){
		var className = this.links[i].className;
		className = className.toString();
		if( this.links[i] != linkToLeave)
			this.links[i].className = '';
	}
}