function applyClassToChildren(aClass,aParent)
{
    var parent1 = document.getElementById(aParent);
    var thisChild = parent1.firstChild;
    while ( thisChild != parent1.lastChild )
    {
        if ( thisChild.nodeType == 1 )
	{
            if((''+thisChild.firstChild)==(''+window.location)) 
                thisChild.className=aClass;
            //alert(window.location);
        }
	    thisChild = thisChild.nextSibling;
    }
}

function clicked(el)
{
	window.location = el.firstChild;
	el.className='topmenuhover';
}

function init()
{
    applyClassToChildren('topmenuhover','topmenulist');
}
window.onload=init;
