function checkLinks() {
    var navigationContainer = document.getElementById('navigation');
	var lists = navigationContainer.getElementsByTagName('li');

    var locationhref = location.href;
    var lastPos = locationhref.length-1;
    if (locationhref.charAt(lastPos)=="/") {locationhref = locationhref+"index.php";}
    locationhref = locationhref.toLowerCase();
    
	for (var i=0; i<lists.length; i++){
	var anchors = lists[i].getElementsByTagName('a');
	    for (var x=0; x<anchors.length; x++){
		    var anchor = anchors[x];
    		var anchorhref = anchor.href;
			var lastPosA = anchorhref.length-1;
    		if (anchorhref.charAt(lastPosA)=="/") {anchorhref = anchorhref+"index.php";}
		    if (anchorhref.toLowerCase() == locationhref){
			    if (lists[i].getAttribute("id")!= null)
			    {
			       lists[i].firstChild.className = "on";
			       return;
			    }    	
		    }
	    }
	}
}