function easeInOut(minValue,maxValue,totalSteps,actualStep,powr) { 
//Generic Animation Step Value Generator By www.hesido.com 
    var delta = maxValue - minValue; 
    var stepp = minValue+(Math.pow(((1 / totalSteps) * actualStep), powr) * delta); 
    return Math.ceil(stepp) 
    } 

function doWidthChangeMem(elem,startWidth,endWidth,steps,intervals,powr) { 
//Width changer with Memory by www.hesido.com
    if (elem.widthChangeMemInt)
	window.clearInterval(elem.widthChangeMemInt);
    var actStep = 0;
    elem.widthChangeMemInt = window.setInterval(
	function() { 
	  elem.currentWidth = easeInOut(startWidth,endWidth,steps,actStep,powr);
	  elem.style.width = elem.currentWidth + "px"; 
	  actStep++;
	  if (actStep > steps) window.clearInterval(elem.widthChangeMemInt);
	} 
	,intervals);
}

function widthChange(item) { 
    if (!item.currentWidth) item.currentWidth = 150; 
	//if no memory is set, set it first; 
    doWidthChangeMem(item,item.currentWidth,180,10,10,0.5); 
	//item.style.marginTop="3px";
	//item.style.marginBottom="3px";
	//item.style.backgroundColor="#C3CDDF";
	item.className="selected";
    } 

function widthRestore(item) { 
    if (!item.currentWidth) return; 
    doWidthChangeMem(item,item.currentWidth,140,10,20,0.5); 
	//item.style.marginTop="2px";
	//item.style.marginBottom="2px";
	//item.style.backgroundColor="#939DC6";
	item.className="";
    }
    
function goBig(item) {
	var anim2 = Animator.apply(item, "width: 220px; padding:20px; background-color: #C3CDDF", {duration: 1000});
	anim2.play();
	}


/* This simple JavaScript rewrites the hovers as mouseover events, 
and works for all versions of IE/Win 5x and 6x. Much thanks to Patrick Griffiths 
and Dan Webb, whose “Suckerfish Dropdowns” got me started with CSS-based menu systems. 
Their snippet of JavaScript looks like this:
 */

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



window.onload=startList;
