function cambiar_imagen(){
	sel=document.getElementsByClassName('seleccionado');
	obj=sel[0].getElementsByTagName('img');
	o=obj[0].src;
	if(o.substr(o.length-5,1)=="2"){ estado="1"; }
	else { estado="2"; }
	nueva_foto=o.substr(0,o.length-5)+estado+".jpg";
	obj[0].src=nueva_foto;
}


sfHover = function() {
	var sfEls = document.getElementById("menu_desplegable").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			if (this.getElementsByTagName('UL').length > 0)
			{
				this.getElementsByTagName("UL")[0].style.display = "";
				this.className+=" sfhover";
			}
		}
		sfEls[i].onmouseout=function() {
			if (this.getElementsByTagName('UL').length > 0)
			{
				this.getElementsByTagName("UL")[0].style.display = "none";
				this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			}
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover)

window.onresize = function(){
	var sfEls = document.getElementById("menu_desplegable").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].className=sfEls[i].className;
	}
}

