
var divAnterior='divInicial';

function firstLoader()
{
 if (document.images)
  {cargador=new Image(100,127); 
   cargador.src="2da1ravez-cargando-anim.gif";
   
     imageObj = new Image();
	 images = new Array();  
	 
     images[0]="2da1ravez-botoncontacto.gif"
     images[1]="2da1ravez-botoncontacto2.gif"
	 images[2]="2da1ravez-botongaleria.gif"
     images[3]="2da1ravez-botongaleria2.gif"
	 images[4]="2da1ravez-botonquienes.gif"
     images[5]="2da1ravez-botonquienes2.gif"
	 images[6]="2da1ravez-botonubic.gif"
     images[7]="2da1ravez-botonubic2.gif"
	 images[8]="2da1ravez-botonadel.gif"
 	 images[9]="2da1ravez-botonadel2.gif"
	 images[10]="2da1ravez-botonatras.gif"
	 images[11]="2da1ravez-botonatras2.gif"
	 images[12]="2da1ravez-somos1raParte.gif"
	 images[13]="2da1ravez-somos1raParte2.gif"
	 images[14]="2da1ravez-somos2daParte.gif"
	 images[15]="2da1ravez-somos2daParte2.gif"
	 images[16]="2da1ravez-somos1.gif"
	 images[17]="2da1ravez-somos2.gif"
	 images[18]="2da1ravez-instrMapa.gif"
	 images[18]="2da1ravez-contacto.gif"
 
	 for (i = 1; i<images.length; i++)
	   {imageObj.src = images[i];
	   }
  }
}

function precargar() { 
if (document.getElementById) { // DOM3 = IE5, NS6 

document.getElementById('divPreloader').style.display = 'none'; 
document.getElementById('divContent').style.display = ''; 
} 
else { 
if (document.layers) { // Netscape 4 
document.divPreloader.display = 'none'; 
document.divContent.display = '';
} 
else { // IE 4 
document.all.divPreloader.style.display = 'none';
document.all.divContent.style.display = '';
} 
} 
} 
// End --> 

function showInicial() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('divInicial').style.display = ''; 
} 
else { 
if (document.layers) { // Netscape 4 
document.divInicial.display = '';
} 
else { // IE 4 
document.all.divInicial.style.display = '';
} 
} 
}


function showContact() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('divContacto').style.display = ''; 
} 
else { 
if (document.layers) { // Netscape 4 
document.divContacto.display = '';
} 
else { // IE 4 
document.all.divContacto.style.display = '';
} 
} 
}

function showUbic() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('divUbic').style.display = ''; 
} 
else { 
if (document.layers) { // Netscape 4 
document.divUbic.display = '';
} 
else { // IE 4 
document.all.divUbic.style.display = '';
} 
} 
}

function showSomos1() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('divSomos1').style.display = ''; 
} 
else { 
if (document.layers) { // Netscape 4 
document.divSomos1.display = '';
} 
else { // IE 4 
document.all.divSomos1.style.display = '';
} 
} 
}

function showSomos2() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('divSomos2').style.display = ''; 
} 
else { 
if (document.layers) { // Netscape 4 
document.divSomos2.display = '';
} 
else { // IE 4 
document.all.divSomos2.style.display = '';
} 
} 
}

function showGaleria() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('divGaleria').style.display = ''; 
} 
else { 
if (document.layers) { // Netscape 4 
document.divGaleria.display = '';
} 
else { // IE 4 
document.all.divGaleria.style.display = '';
} 
} 
}

function showpreGaleria() {
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('preGaleria').style.display = ''; 
} 
else { 
if (document.layers) { // Netscape 4 
document.preGaleria.display = '';
} 
else { // IE 4 
document.all.preGaleria.style.display = '';
} 
} 
}




function anunciarActivo(nombreDiv) 
{ divAnterior=nombreDiv; alert("Valor de divAnterior: " + divAnterior); }



function switchearDiv(desactivar,activar) 
{ 

   //alert("Div que se va a esconder: " + desactivar); 
 if (desactivar == activar) 
  {//alert("se esta tratando de desactivar el mismo que se quiere activar"); 
  }
  else
  {	 switch(desactivar)
	 {
		case 'divInicial': hideInicial(); break;
		case 'divContacto': hideContact(); break;
		case 'divUbic': hideUbic(); break;
		case 'divSomos1': hideSomos1(); break;
		case 'divSomos2': hideSomos2(); break;
		case 'divGaleria': hideGaleria(); break;
		case 'preGaleria': hidepreGaleria(); break;
	 }
	     divAnterior=activar; 
		 //alert ("El nuevo div activo es: " + divAnterior);
		 
	  switch(activar)
	 {
		case 'divInicial': showInicial(); break;
		case 'divContacto': showContact(); break;
		case 'divUbic': showUbic(); break;
		case 'divSomos1': showSomos1(); break;
		case 'divSomos2': showSomos2(); break;
		case 'divGaleria': showGaleria(); break;
		case 'preGaleria': showpreGaleria(); break;
	 }	 
  }
	 
}


function hideInicial() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('divInicial').style.display = 'none'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.divInicial.display = 'none';
} 
else { // IE 4 
document.all.divInicial.style.display = 'none';
} 
} 
}


function hideContact() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('divContacto').style.display = 'none'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.divContacto.display = 'none';
} 
else { // IE 4 
document.all.divContacto.style.display = 'none';
} 
} 
}

function hideUbic() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('divUbic').style.display = 'none'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.divUbic.display = 'none';
} 
else { // IE 4 
document.all.divUbic.style.display = 'none';
} 
} 
}

function hideSomos1() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('divSomos1').style.display = 'none'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.divSomos1.display = 'none';
} 
else { // IE 4 
document.all.divSomos1.style.display = 'none';
} 
} 
}

function hideSomos2() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('divSomos2').style.display = 'none'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.divSomos2.display = 'none';
} 
else { // IE 4 
document.all.divSomos2.style.display = 'none';
} 
} 
}

function hideGaleria() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('divGaleria').style.display = 'none'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.divGaleria.display = 'none';
} 
else { // IE 4 
document.all.divGaleria.style.display = 'none';
} 
} 
}

function hidepreGaleria() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('preGaleria').style.display = 'none'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.preGaleria.display = 'none';
} 
else { // IE 4 
document.all.preGaleria.style.display = 'none';
} 
} 
}
