function redireccionar(pagina) 
{
switch(pagina)
			  {
			  case 0: 				   
			   		{
			 		 location.href='iniciok.asp';
					 break;								
			 		 }
			  case 1: 				   
			   		{
			 		 location.href='panelctrl.asp';
					 break;
			 		 }
			  case 2: 				   
			   		{
			 		 location.href='listaalbums.asp';
					 break;
			 		 }
			  case 3: 				   
			   		{
			 		 location.href='gestalbums.asp';
					 break;
			 		 }
			  case 4: 				   
			   		{
			 		 location.href='imagalbums.asp?op=9';
					 break;
			 		 }
			  case 5: 				   
			   		{
			 		 location.href='veralbum.asp';
					 break;
			 		 }
			  case 6: 				   
			   		{
			 		 location.href='altaalbum.asp';
					 break;
			 		 }
			  case 7: 				   
			   		{
			 		 location.href='finproc.asp';
					 break;
			 		 }
			  case 8: 				   
			   		{
			 		 location.href='gestcdo.asp';
					 break;
			 		 }
			  case 9: 				   
			   		{
			 		 location.href='altausuarios.asp';
					 break;
			 		 }
			  case 10: 				   
			   		{
			 		 location.href='panelctrl.asp';
					 break;
			 		 }
			  case 11: 				   
			   		{
			 		 location.href='gestspaces.asp';
					 break;
			 		 }
			  case 12: 				   
			   		{
			 		 location.href='nwprtl.asp';
					 break;
			 		 }
			  case 13: 				   
			   		{
			 		 location.href='imagAlbum.asp';
					 break;
			 		 }
			  case 14: 				   
			   		{
			 		 location.href='altaAlbum.asp';
					 break;
			 		 }
			  case 15: 				   
			   		{
			 		 location.href='indexcdo.asp?op=1';
					 break;
			 		 }
			  case 16: 				   
			   		{
			 		 location.href='indexcdo.asp?op=2';
					 break;
			 		 }
			  case 17: 				   
			   		{
			 		 location.href='gestmenus.asp';
					 break;
			 		 }
			  case 18: 				   
			   		{
			 		 location.href='altamenu.asp?paso=1';
					 break;
			 		 }
			  case 41:
			  	   {
				    location.href='altaanexo.asp?paso=1';
					break;
				   }	   
			  case 42:
			  	   {
				    location.href='gestanexos.asp';
					break;
				   }	   
					 
			  }
}

function redireccionarinicio(portal) 
{
	 ruta = "http://www.diocesisdecordoba.com/nueva/iniciok.asp?p=" + portal; 
	 location.href= ruta;
} 

function esDigito(sChr){
var sCod = sChr.charCodeAt(0);
return ((sCod > 47) && (sCod < 58));
}

function valSep(oTxt){
var bOk = false;
bOk = bOk || ((oTxt.value.charAt(2) == "-") && (oTxt.value.charAt(5) == "-"));
bOk = bOk || ((oTxt.value.charAt(2) == "/") && (oTxt.value.charAt(5) == "/"));
return bOk;
}

function finMes(oTxt){
var nMes = parseInt(oTxt.value.substr(3, 2), 10);
var nRes = 0;
switch (nMes){
case 1: nRes = 31; break;
case 2: nRes = 29; break;
case 3: nRes = 31; break;
case 4: nRes = 30; break;
case 5: nRes = 31; break;
case 6: nRes = 30; break;
case 7: nRes = 31; break;
case 8: nRes = 31; break;
case 9: nRes = 30; break;
case 10: nRes = 31; break;
case 11: nRes = 30; break;
case 12: nRes = 31; break;
}
return nRes;
}

function valDia(oTxt){
var bOk = false;
var nDia = parseInt(oTxt.value.substr(0, 2), 10);
bOk = bOk || ((nDia >= 1) && (nDia <= finMes(oTxt)));
return bOk;
}

function valMes(oTxt){
var bOk = false;
var nMes = parseInt(oTxt.value.substr(3, 2), 10);
bOk = bOk || ((nMes >= 1) && (nMes <= 12));
return bOk;
}

function valAno(oTxt){
var bOk = true;
var nAno = oTxt.value.substr(6);
bOk = bOk && ((nAno.length == 2) || (nAno.length == 4));
if (bOk){
for (var i = 0; i < nAno.length; i++){
bOk = bOk && esDigito(nAno.charAt(i));
}
}
return bOk;
}

function valFecha(oTxt){
var bOk = true;
if (oTxt.value != ""){
bOk = bOk && (valAno(oTxt));
bOk = bOk && (valMes(oTxt));
bOk = bOk && (valDia(oTxt));
bOk = bOk && (valSep(oTxt));
if (!bOk){
alert("Fecha inválida");
oTxt.value = "";
oTxt.focus();
}
}
}

function activarCSS(title) { 
  // Obtengo los elementos link 
  var links = document.getElementsByTagName("link"); 
  // Los recorro todos y el que tenga  
  // el title que queremos lo activamos 
  // el resto los desactivamos 
  for (var i=0; i<links.length; i++) { 
if (links[i].getAttribute("title") == title) { 
  links[i].disabled = false; 
} else { 
  links[i].disabled = true; 
} 
  } 
} 

function tamano(mas) { 
  var signo = (mas)? 1 : -1; // Para sumar o restar el porcentaje 
  // Obtenemos el objeto que contiene el texto 
  var obj=document.getElementById("prueba"); 
  // Obtenemos el tamaño de letra y lo modificamos 
  var fontsize = obj.style.fontSize; 
  fontsize = parseInt(fontsize.replace(/%/g, '')); 
  fontsize += signo*10; 
  if (fontsize > 0 && fontsize < 0) { 
obj.style.fontSize = fontsize+"%"; 
  } 
} 

function Fecha()
{
var fecha=new Date();
var diames=fecha.getDate();
var diasemana=fecha.getDay();
var mes=fecha.getMonth() +1 ;
var ano=fecha.getFullYear();

var textosemana = new Array (7); 
  textosemana[0]="Domingo";
  textosemana[1]="Lunes";
  textosemana[2]="Martes";
  textosemana[3]="Miércoles";
  textosemana[4]="Jueves";
  textosemana[5]="Viernes";
  textosemana[6]="Sábado";

var textomes = new Array (12);
  textomes[1]="Enero";
  textomes[2]="Febrero";
  textomes[3]="Marzo";
  textomes[4]="Abril";
  textomes[5]="Mayo";
  textomes[6]="Junio";
  textomes[7]="Julio";
  textomes[8]="Agosto";
  textomes[9]="Septiembre";
  textomes[10]="Octubre";
  textomes[11]="Noviembre";
  textomes[12]="Diciembre";

this.document.write("<div class='Titulartxtng-' style='float:right;'>" + textosemana[diasemana] + ", " + diames + " de " + textomes[mes] + " de " + ano + "</div>");

}

function zoomText(Accion,Elemento){
//inicializacion de variables y parámetros 
var obj=document.getElementById(Elemento);
var max = 200 //tamaño máximo del fontSize
var min = 70 //tamaño mínimo del fontSize
if (obj.style.fontSize==""){
obj.style.fontSize="100%";
}
actual=parseInt(obj.style.fontSize); //valor actual del tamaño del texto 
incremento=10;// el valor del incremento o decremento en el tamaño 
	//accion sobre el texto 
	if( Accion=="reestablecer" ){
	obj.style.fontSize="100%"
	}
	if( Accion=="aumentar" && ((actual+incremento) <= max )){
	valor=actual+incremento;
	obj.style.fontSize=valor+"%"
	}
	if( Accion=="disminuir" && ((actual+incremento) >= min )){
	valor=actual-incremento;
	obj.style.fontSize=valor+"%"
	}
} 