﻿if(typeof LOC == 'undefined') {
	var LOC = {};
}
LOC.initBulles = function(){
	var bulles_arr = document.getElementById("navbulles").getElementsByTagName("li");
	for(var i=0; i<bulles_arr.length; i++){
		var text = document.getElementById("anchorText" + i);
		text.style.position = "absolute";
		if(i != 0) text.style.display = "none";
		var bulle = document.getElementById("bulle" + i);
		bulle.i = i;
		bulle.onclick = function(){
			LOC.cache(this.i);
			var text = document.getElementById("anchorText" + this.i);
			text.style.display = "block";
			this.className = (this.i != 0) ? "bulle_on" : "bulle0 bulle_on";
			return false;
		}
	}
	LOC.cache = function(n){
		for(var i=0; i<bulles_arr.length; i++){
			var text = document.getElementById("anchorText" + i);
			if(i != n) text.style.display = "none";
			var bulle = document.getElementById("bulle" + i);
			if(i != n) bulle.className = (bulle.i != 0) ? "bulle" : "bulle bulle0";
		}
	}
}
//OnDOMLoad(LOC.initBulles, window);
//addEvent(window, "load", LOC.initBulles);
addDOMLoadEvent(LOC.initBulles);