var W3CDOM = (document.createElement && document.getElementsByTagName);

var mouseOvers = new Array();
var mouseOuts = new Array();


function init()
{

	if (!W3CDOM) return;
	var nav = document.getElementById('headNavig');
	var imgs = nav.getElementsByTagName('li');
	for (var i=0;i<imgs.length;i++)
	{
		imgs[i].onmouseover = mouseGoesOver;
		//imgs[i].onmouseout = mouseGoesOut;
		//var suffix = imgs[i].src.substring(imgs[i].src.lastIndexOf('.'));
		//mouseOuts[i] = new Image();
		//mouseOuts[i].src = imgs[i].src;
		//mouseOvers[i] = new Image();
		//mouseOvers[i].src = imgs[i].src.substring(0,imgs[i].src.lastIndexOf('.')) + "_over" + suffix;
		//imgs[i].number = i;
	}
}

function mouseGoesOver()
{
	this.src = mouseOvers[this.number].src;
}

function mouseGoesOut()
{
	this.src = mouseOuts[this.number].src;
}

startList = function() {
if (document.all&&document.getElementById) {
 navRoot = document.getElementById("headNavig");
  for (i=0; i<navRoot.childNodes.length; i++) {
   node = navRoot.childNodes[i];
  
   if (node.nodeName=="LI") {
    node.onmouseover=function() {
     this.className+=" over";
     //cont.style.zIndex=-1;
    }
    node.onmouseout=function() {
     this.className=this.className.replace(" over", "");
     //cont.style.zIndex=0;
    }
   }
  }
 }
}

//window.onload = init;
window.onload=startList;
