running=false
var len=0
var myel=0
var timeout

var hicolor="aktiv"
var locolor="nav"
function Init(el){
		hicolor=document.all?"aktiv":"#EDB019"
		locolor=document.all?"nav":"#ffffff"
        len=el.length;
	if(!running){
		running=true		
		myel=el
		RunIt(0,len)
	}
	
}


function RunIt(count,len) {
	//lo
	if(count>0){
	    setColor(myel[count-1],locolor)
//		myel[count-1].className=locolor
	}
	//hi
	if (count<len){
		setColor(myel[count],hicolor)
	}
	count+=1	
	//lastel
	if (count>len){	
		setColor(myel[len-1],locolor)
//		myel[len-1].className=locolor
		running=false
		return
	}
//  	window.status = count+" "+len
    	timeout=setTimeout("RunIt("+count+","+len+")",70) 
}


function test(name){
	el=document.all?document.all(name):document.getElementsByName(name)
//	alert(name+"/n "+typeof(el)+el.length)
	Init(el)
}


function setColor(el,color){
	if(document.all){
		el.className=color
	}else{
		el.style.color=color
	}
}





