function initMenu()
{
	/*var nodes = document.getElementById("nav").getElementsByTagName("a");
	for (var i=0; i<nodes.length; i++)
	{
		nodes[i].onclick = function ()	{
				if(this.parentNode.className.indexOf("active") !=-1) {
					this.parentNode.className = this.parentNode.className.replace("active", "");
				}
				else {
					this.parentNode.className += " active";
				}
				return false;
			}
	}
	*/
	var nod = document.getElementById("navigation").getElementsByTagName("li");
	var width = document.getElementById("navigation").offsetWidth - document.getElementById("navigation").getElementsByTagName("ul")[0].offsetWidth;
	width = width / (nod.length)/2.5;

	for (var i=0; i<nod.length; i++)
	{
		nod[i].style.marginRight = width + "px";
		nod[i].style.marginLeft = width + "px";
	}
}

/**
 * Clock script
 * made by: Nicolas - http://www.javascript-page.com
 * modified by Tijuan - http://www.tijuan.net
 **/
var clockID = 0;

function UpdateClock() {
   if(clockID) {
      clearTimeout(clockID);
      clockID  = 0;
   }

   var tDate = new Date();

   //updated part by tijuan
   var Hours = tDate.getHours();
   Hours = (Hours<10)?"0"+Hours:Hours;
   var Minutes = tDate.getMinutes();
   Minutes = (Minutes<10)?"0"+Minutes:Minutes;

   document.getElementById("clock").innerHTML = ""
                                   + Hours + ":"
                                   + Minutes;
   ////
   clockID = setTimeout("UpdateClock()", 1000);
}
function StartClock() {
   clockID = setTimeout("UpdateClock()", 500);
}

///// LAUNCH FUNCTIONS
if (window.addEventListener){
	window.addEventListener("load", initMenu, false);
	window.addEventListener("load", StartClock, false);
}
else if (window.attachEvent){
	window.attachEvent("onload", initMenu);
	window.attachEvent("onload", StartClock);
}
