function photo_in(foto) {
	var mydiv = "fotogrande";
	var lafoto = "fotobig";
	var _src = "img/"+foto;
	var ancho;
	document.getElementById(lafoto).src=_src;
	document.getElementById(mydiv).style.top = document.body.scrollTop+20;
	document.getElementById(mydiv).style.display = 'inline';
	
}

function photo_out() {
	var mydiv = "fotogrande";
	var lafoto = "fotobig";
	var _src = "img/cargando.gif";
	document.getElementById(lafoto).src=_src;
	document.getElementById(mydiv).style.display = 'none';
}

function displaymenu(id) {
	if(document.getElementById("m"+id).value=='0') {
		document.getElementById("m"+id).style.borderTop='1px solid #0099cc';
		document.getElementById("m"+id).style.backgroundColor='#A6D3EE';
		document.getElementById("m"+id).value='1';
	} else {
		document.getElementById("m"+id).style.borderTop='0px';
		document.getElementById("m"+id).style.backgroundColor='transparent';
		document.getElementById("m"+id).value='0';

	}
	for (var i=1; i<7; i++) {
		if(id!=i) {
			document.getElementById("m"+i).style.borderTop='0px';
			document.getElementById("m"+i).value='0';
			document.getElementById("m"+i).style.backgroundColor='transparent';

		}
	}
	
}

function verproducto() {
	document.location.href=document.getElementById("producto").value;
}

function cambiafondo(photo){
	document.getElementById("cuerpo").style.background='#ffffff url(img/'+photo+') no-repeat top left';
}

function menin(event) {
	this.style.width='150px';
	this.style.borderTop='1px solid #0099cc';
	this.style.borderBottom='1px solid #cccccc';
	this.style.backgroundColor='#A6D3EE';
	this.firstChild.style.color='#FFFFFF';
	this.style.cursor='pointer';
}

function menout(event) {
	this.style.width='150px';
	this.style.borderTop='0px';
	this.style.borderBottom='0px';
	this.style.backgroundColor='transparent';
	this.style.cursor='auto';
	this.firstChild.style.color='#0099CC';

}

function menredir(event) {
	document.location.href = this.firstChild.href;
}

function menu() {
	var z = document.getElementById("menu").getElementsByTagName("p").length;
	for (var i=1; i<=z; i++ ) {
		document.getElementById('m'+i).onmouseover = menin;
		document.getElementById('m'+i).onmouseout  = menout;
		document.getElementById('m'+i).onclick = menredir;
	}
}

window.onload = menu;




