function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function pie(){
		document.write('<p>&copy; 2007 ScubAventura. Todos los derechos reservados. <a href="http://www.scubaventura.com/utilidades/acceso.php?texto=2">Aviso Legal.</a> Web: <a href="http://www.ozonea.com/" target="_blank">www.ozonea.com</a>.</p>');
}

	var IE4 = (document.all && !document.getElementById) ? true : false;
	var NS4 = (document.layers) ? true : false;
	var IE5 = (document.all && document.getElementById) ? true : false;
	var N6 = (document.getElementById && !document.all) ? true : false;
	if(N6){
		var mano =  " style=\"cursor:pointer \"";
	}
	else if(NS4){
		var mano = "";
	}
	else {
		var mano = " style=\"cursor:hand \"";
	}

function dentro(which, idCelda){
	document.getElementById(idCelda).className='celdadentro';
	}

function fuera(which, idCelda){
	document.getElementById(idCelda).className='celda';
	}

function dentromenu(which, idCelda){
	document.getElementById(idCelda).className='celdamenudentro';
	}

function fueramenu(which, idCelda){
	document.getElementById(idCelda).className='celdamenu';
	}

function menu(a,b) {
	inicio = '0';
	escuela = '0';
	centro = '0';
	sobre = '0';
	fotos = '0';
	utilidades = '0';
	contactar = '0';
	switch(a){
		case 1 : inicio = '1';
		break;
		case 2 : escuela = '1';
		break;
		case 3 : centro = '1';
		break;
		case 4 : sobre = '1';
		break;
		case 5 : fotos = '1';
		break;
		case 6 : utilidades = '1';
		break;
		case 7 : contactar = '1';
		break;
	}
	ruta = "";
	for(i=0; i<b; i++){
		ruta = ruta + "../";
	}
	document.write('<table width="140" border="0" cellspacing="0" cellpadding="0">');
	document.write('<tr>');
	document.write('<td height="26">');
	document.write('<a href="'+ruta+'index.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'inicio\',\'\',\''+ruta+'img/botones/inicio_1.gif\',1)"><img src="'+ruta+'img/botones/inicio_'+inicio+'.gif" name="inicio" width="140" height="25" border="0"></a>');
	document.write('</td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td height="26">');
	document.write('<a href="'+ruta+'escuela/escuela.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'escuela\',\'\',\''+ruta+'img/botones/escuela_1.gif\',1)"><img src="'+ruta+'img/botones/escuela_'+escuela+'.gif" name="escuela" width="140" height="25" border="0"></a>');
	document.write('</td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td height="26">');
	document.write('<a href="'+ruta+'centro/centro.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'centro\',\'\',\''+ruta+'img/botones/centro_1.gif\',1)"><img src="'+ruta+'img/botones/centro_'+centro+'.gif" name="centro" width="140" height="25" border="0"></a>');
	document.write('</td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td height="26">');
	document.write('<a href="'+ruta+'buceo/buceo.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'sobre\',\'\',\''+ruta+'img/botones/sobre_1.gif\',1)"><img src="'+ruta+'img/botones/sobre_'+sobre+'.gif" name="sobre" width="140" height="25" border="0"></a>');
	document.write('</td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td height="26">');
	document.write('<a href="'+ruta+'imagenes/imagenes.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'imagenes\',\'\',\''+ruta+'img/botones/fotos_1.gif\',1)"><img src="'+ruta+'img/botones/fotos_'+fotos+'.gif" name="imagenes" width="140" height="25" border="0"></a>');
	document.write('</td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td height="26">');
	document.write('<a href="'+ruta+'utilidades/utilidades.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'utilidades\',\'\',\''+ruta+'img/botones/utilidades_1.gif\',1)"><img src="'+ruta+'img/botones/utilidades_'+utilidades+'.gif" name="utilidades" width="140" height="25" border="0"></a>');
	document.write('</td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td height="26">');
	document.write('<a href="'+ruta+'contactar/contactar.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'contactar\',\'\',\''+ruta+'img/botones/contactar_1.gif\',1)"><img src="'+ruta+'img/botones/contactar_'+contactar+'.gif" name="contactar" width="140" height="25" border="0"></a>');
	document.write('</td>');
	document.write('</tr>');
	document.write('</table>');
}
