function dentro(src,tema) {
	if (!src.contains(event.fromElement)) {
		src.style.cursor = 'hand';
		src.className = tema + 'boton_menu_ON';
	}
}

function fuera(src,tema) {
	if (!src.contains(event.toElement)) {
		src.style.cursor = 'default';
		src.className = tema + 'boton_menu_OFF';
	}
}

function dentroFamilia(src,tema) {
	if (!src.contains(event.fromElement)) {
		src.style.cursor = 'hand';
		src.className = tema + 'caja_familia_ON';
	}
}

function fueraFamilia(src,tema) {
	if (!src.contains(event.toElement)) {
		src.style.cursor = 'default';
		src.className = tema + 'caja_familia_OFF';
	}
}

function ventana(enlace) {
	window.open(enlace, "", "width=700,height=400,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=1,resizable=0");
}

var estilos = "css/estilos.css"
var titulo = "Toldos Gómez"

var esaventana
function afoto(cual)
{
if(esaventana){esaventana.close()}
	esaventana=window. open('','esaventana','resize=yes,scrollbars=no,resizable=yes')

	esaventana.document.writeln ('<html><head><link href="' + estilos + '" rel="stylesheet" type="text/css">')
	esaventana.document.writeln('<title>' + titulo + '</title></head>')
	esaventana.document.writeln('<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" style="overflow:hidden" bgcolor="#999999"><div align="center" class="texto"><img id="foto" alt="pulsar para cerrar" src="' + cual + '" onLoad="opener.redimensionar(this.width, this.height)" onClick="window.close();" border="1">')
	esaventana.document.write('</div>')
	esaventana.document.writeln ('</body></html>')
	esaventana.document.close()
}
var cont

function redimensionar(ancho, alto)
{
	esaventana.resizeTo(ancho+12,alto+12)
	esaventana.moveTo((screen.width - ancho)/2,(screen.height - (alto+60))/2)
}

function enlacepadre(enlace) {
	window.opener.top.location.replace(enlace);
	window.close();
}