function MouseOver(obj){
	obj = document.getElementById(obj)
	if (obj){	
		if (obj.src.indexOf('_on') > -1){
			obj.src = obj.src.replace('_on.gif','.gif')
		}else{
			obj.src = obj.src.replace('.gif','_on.gif')
		}
	}
}

function mOn(obj) {
	if(obj.src.indexOf('_o.gif')==-1 && obj.src.indexOf('_a.gif')==-1){
		obj.src=obj.src.replace('.gif','_o.gif')
	}
}
function mClick(obj) {
	if(obj.src.indexOf('_a.gif')==-1){
		//reset andere open menuitems
		var objs = document.getElementById('menu').getElementsByTagName('IMG')
		for (var c=0; c< objs.length; c++) {
			objs[c].src=objs[c].src.replace('_a.gif','.gif')
		}
		//open menuitem
		obj.src=obj.src.replace('_o.gif','.gif')
		obj.src=obj.src.replace('.gif','_a.gif')
	}else{
		//sluit menuitem
		obj.src=obj.src.replace('_a.gif','.gif')
		obj.src=obj.src.replace('.gif','_o.gif')
	}
}

function mOut(obj) {
	obj.src=obj.src.replace('_o.gif','.gif')
}

function nav(id,active,showSub) {
	var obj = document.getElementById(id)
	var ext = 'gif'//obj.src.substr((obj.src.length-0),obj.src.length)
	if(!active) {
		if(obj.src.indexOf('_on.'+ext)==-1){
			obj.src=obj.src.replace('.'+ext,'_on.'+ext)
		}else{
			obj.src=obj.src.replace('_on.'+ext,'.'+ext)
		}
	}

	if(showSub){
		ypSlideOutMenu.showMenu(id);
	}else{
		ypSlideOutMenu.hideMenu(id);
	}
}

ypSlideOutMenu.parentMenuShow = function(thisId,otherId,state,isCurrentMain) {
	if (state == 'off') {
		if (isCurrentMain == 1) {
			document.getElementById(otherId).src=menu_states[otherId]['on'];
		} else {
			document.getElementById(otherId).src=menu_states[otherId][state];
		}
	} else {
		document.getElementById(otherId).src = menu_states[otherId][state];
	}
}