function chgMenuPic(state,obj) {
	var topMenuAct=0;
	for(var i=1;i<=6;i++) {
		if(document.getElementById('navTop'+i+'a')) { topMenuAct=i; break; }
	}
    if(!obj) { return false; }
    var id=obj.id;
    id=parseInt(id.substring(id.length-1));
    if(!id || id==topMenuAct) return false;
	var topMenu="navTop"+id;
	if(!document.getElementById(topMenu)) return false;
    if(state) {
		var url="url(fileadmin/images/nav_t_"+id+"b.gif)";
		if(topMenuAct>0 && (id-1)==topMenuAct) url="url(fileadmin/images/nav_t_"+id+"b_b.gif)";
		if(topMenuAct>0 && (id+1)==topMenuAct) url="url(fileadmin/images/nav_t_"+id+"b_a.gif)";
        document.getElementById(topMenu).style.backgroundImage = url;
		document.getElementById(topMenu).style.zIndex = 21;
        //if(topMenuAct>0 && (id+1)==topMenuAct) document.getElementById('navTop'+topMenuAct+'a').style.backgroundImage = "url(fileadmin/images/nav_t_"+topMenuAct+"b_b.gif)";
        //if(topMenuAct>0 && (id-1)==topMenuAct) document.getElementById('navTop'+topMenuAct+'a').style.backgroundImage = "url(fileadmin/images/nav_t_"+topMenuAct+"b_a.gif)";
    }
    else {
        document.getElementById(topMenu).style.backgroundImage = "none";        
		document.getElementById(topMenu).style.zIndex = 5;
        if(topMenuAct>0 && (((id+1)==topMenuAct) || ((id-1)==topMenuAct))) document.getElementById('navTop'+topMenuAct+'a').style.backgroundImage = "url(fileadmin/images/nav_t_"+topMenuAct+"b.gif)";
    }
    return true;
}
