     
     
   function verperfil(el_url) { 
       var especificaciones="top=10, left=10, toolbar=no,location=no, status=no,menubar=no,scrollbars=yes, resizable=no, width=600,height=550" 
       var titulo="Perfiles"
   window.open(el_url,titulo,especificaciones); 
   }


   function verperfil(el_url) { 
       var especificaciones="top=10, left=10, toolbar=no,location=no, status=no,menubar=no,scrollbars=yes, resizable=no, width=600,height=550" 
       var titulo="Perfiles"
   window.open(el_url,titulo,especificaciones); 
   }

function verificarform(idioma,cant_encabezado)
{

    var correctas = 0;
    var totales = 0;
    var objeto = "resu-1";
    var objetodiv = document.getElementById(objeto); 
    var objetoresultado = document.getElementById("resultado");
    var mensaje= "";
    //alert("entre al verificar");
    var okey= "<IMG src=\'/images_config/tilde.gif\' border=0>";
    var notokey= "<IMG src=\'/images_config/cruz.gif\' border=0>";

    for (i=cant_encabezado;i<document.encuesta.elements.length;i=i+7) 
    {

       totales ++;

       id =document.encuesta.elements[i+6].value;
     
       objeto = "resu-" + id
       objetodiv = document.getElementById(objeto); 
       if ((document.encuesta.elements[i+1].value =="VERDADERO")&(document.encuesta.elements[i].checked))
       {
         correctas ++;   
      
         //objetodiv.innerHTML = okey + objetodiv.innerHTML;
         objetodiv.innerHTML = okey ;
       }
       else if ((document.encuesta.elements[i+3].value =="VERDADERO")&(document.encuesta.elements[i+2].checked))
       {
         correctas ++;   
         objetodiv.innerHTML = okey ;
       }
       else if ((document.encuesta.elements[i+5].value =="VERDADERO")&(document.encuesta.elements[i+4].checked))
       {
         correctas ++;   
         objetodiv.innerHTML = okey ;
       }
       else 
       {
         objetodiv.innerHTML = notokey ;
       }

    }
    if (idioma == "ingles")
    {
        mensaje = "You have "+correctas+" right answers of "+totales ;
    }
    else
    {
        mensaje = "Tienes "+correctas+" respuestas correctas de "+totales ;
    }
    objetoresultado.innerHTML = mensaje;

    
} 


function subirform(idioma,cant_encabezado)
{

 	 	 var x=document.forms.encuesta;
                 verificarform(idioma,cant_encabezado);
                 var action = "/subirform.cgi";
                 x.action=action;       
                 x.submit();
          
}


function Abrir_ventana (pagina) {
var opciones="toolbar=no, location=no, directories=no, titlebar=no,toolbar=no,status=no, menubar=no, scrollbars=no, resizable=no, width=300, height=265, top=140, left=140";
window.open(pagina,"",opciones);
}

function mostrar_capa (capa) {
  document.getElementById(capa).style.display="inline";

}



function mostrar_foto (foto) {
var i = 0;
var salir = 0;
  document.getElementById("capafotos").style.display="inline";
  document.getElementById("capatransparente").style.display="inline";
  document.images['imagen'].src=foto;
  while ((i <= album.length - 1) & (salir == 0))
  {
     if (album[i]== foto)
     {
	salir = 1;
	indice_album = i;
     }
     i++;
  }
  

}

function ocultar_foto () {
  document.getElementById("capafotos").style.display="none";
  document.getElementById("capatransparente").style.display="none";

  window.clearInterval(intval);
  intval = 0;
  indice_album=0;

}


function ocultar_capa (capa) {
  
  document.getElementById(capa).style.display="none";
}


    var album = new Array();
    var i = 0;



function album_insertar_foto (foto) {
 
  if (foto != "/images/no-image.gif")
  {
  
     album[album.length]=foto;
     i = album.length;
  }


}

function album_siguiente_foto () {
  i ++;
  document.images['imagen'].album[i];
}


var album = new Array();
var album_indice = new Array();
var indice_album = 0;
var intval=0;
   





function album_foto (comando) {

	if (comando == "next")
	{
		
		if ((indice_album != album.length-1) & (intval == 0))
 		{
			indice_album ++;
			document.images['imagen'].src=album[indice_album];
		}
		else if ((indice_album == album.length-1) & (intval != 0))
 		{
			indice_album = 0;
			document.images['imagen'].src=album[indice_album];
		}
		else if ((indice_album != album.length-1) & (intval != 0))
 		{
			indice_album ++;
			document.images['imagen'].src=album[indice_album];
		}

 	}
	else if (comando == "previous")
	{
		if ((indice_album != 0)&(intval ==0))
 		{
			indice_album =	indice_album -1;
			document.images['imagen'].src=album[indice_album];
	
		}
		else if ((indice_album == 0)&(intval != 0))
 		{
			indice_album = album.length-1;
			document.images['imagen'].src=album[indice_album];	
		}
		else if ((indice_album != 0)&(intval != 0))
 		{
			indice_album =	indice_album -1;
			document.images['imagen'].src=album[indice_album];
		}

	}
	else if (comando == "first")
	{
			indice_album =	0;
			document.images['imagen'].src=album[indice_album];
	}
	else if (comando == "last")
	{
			indice_album =	album.length-1;
			document.images['imagen'].src=album[indice_album];
	
	}
	else if (comando == "play")
	{
		intval = setInterval("album_foto('next')",3000)
	}		
	else if (comando == "pause")
	{
		window.clearInterval(intval);
		intval = 0;
	}


}








function ponerclima()
{
var divclima = document.getElementById("clima"); 
var divclima2 = document.getElementById("climaamplio"); 
var html = "";

//if (1==1)

if (iconomañana == "")
{
html =  "<TABLE  valign='top' width=397 height=10  border=0 onclick=\"document.getElementById('climaamplio').style.display = 'none'\"><TR><TD><A href=\"#\"><IMG SRC=\"/images/no-image.gif\" border=0 width=395 height=8></A></TD></TR></TABLE>";
html =  html + "<CENTER><TABLE  valign='middle' width=395 class='climadetalle' border=0 onclick=\"document.getElementById('climaamplio').style.display = 'none'\">";
html = html + "<TR><TD valign='top' width=107 ><b>Temp 21hs.:</b>"+temperatura+"</TD>";
html = html + "<TD valign='top' width=18 ></TD>";
html = html +  "<TD valign='top' width=270 >"+pronosticotarde + "</TD></TR>";

//html = html + "<TR><TD valign='top' colspan=3 ><b><U>Para Mañana:</b></TD></TR>";
html = html + "<TR><TD valign='top' ><b>Mañana a la Mañana:</b></TD>";
html = html + "<TD valign='top' ><IMG src='/images_config/" + iconomañanamañana + ".gif' width=18></TD>";
html = html +  "<TD valign='top' >"+pronosticomañanamañana + " </TD></TR>";

html = html + "<TR><TD valign='top'><b>Mañana a la Tarde:</b></TD>";
html = html + "<TD valign='top'><IMG src='/images_config/" + iconotardemañana + ".gif' width=18></TD>";
html = html +  "<TD valign='top'>"+pronosticomañanatarde + " </TD></TR>";

html = html + "</TABLE>";

html2 = "<TABLE  valign='top' class='clima'><TR><TD><FONT class='clima'><b>San Javier - Argentina | "+fecha+"</TD><TD>";
html2 = html2 + "<TD> <b>| Temp 21 hs.:"+temperatura+"</TD>";
html2 = html2 + "<TD><IMG src='/images_config/" + iconotarde + ".gif' width=25 height=25></TD>";
html2 = html2 + "<TD onclick=\"document.getElementById('climaamplio').style.display = 'inline'\"><A href=\"#\"><FONT color='\#1D456A'>Pronóstico <IMG src='/images_config/desplegar.gif' border=0 ></A></TD>";
html2 = html2 + "</TR></TABLE>";
divclima.innerHTML = html2;
divclima2.innerHTML = html;

}
else
{
html =  "<TABLE  valign='top' width=397 height=10  border=0 onclick=\"document.getElementById('climaamplio').style.display = 'none'\"><TR><TD><A href=\"#\"><IMG SRC=\"/images/no-image.gif\" border=0 width=395 height=8></A></TD></TR></TABLE>";
html = html + "<CENTER><TABLE  valign='middle' width=395 class='clima' border=0 onclick=\"document.getElementById('climaamplio').style.display = 'none'\">";
html = html + "<TR ><TD valign='top' width=60><FONT class='clima'><b>Mañana:</b></TD>";
html = html + "<TD valign='top' width=30><IMG src='/images_config/" + iconomañana + ".gif' width=25 height=25></TD>";
html = html +  "<TD valign='top' width=305>"+pronosticomañana + " </TD><TD valign='top' width=12><A href=\"#\"><IMG src='/images/no-image.gif' width=12 height=12 border=0></A></TD></TR>";
html = html + "<TR><TD valign='top'><FONT class='clima'><b>Tarde:</b></TD>";
html = html + "<TD valign='top'><IMG src='/images_config/" + iconotarde + ".gif' width=25 height=25></TD>";
html = html +  "<TD valign='top'>"+pronosticotarde + " </TD></TR>";
html = html + "</TABLE>";

html2 = "<TABLE  valign='top' class='clima'><TR><TD><FONT class='clima'><b>San Javier - Argentina | "+fecha+"</TD><TD>";
html2 = html2 + "<TD> <b>| Máx.:"+maxima+" Mín:"+minima+"</TD>";
if (hora >12)
{
  html2 = html2 + "<TD><IMG src='/images_config/" + iconotarde + ".gif' width=25 height=25></TD>";
}
else
{
  html2 = html2 + "<TD><IMG src='/images_config/" + iconomañana + ".gif' width=25 height=25></TD>";
}
html2 = html2 + "<TD onclick=\"document.getElementById('climaamplio').style.display = 'inline'\"><A href=\"#\"><FONT color='\#1D456A'>Pronóstico <IMG src='/images_config/desplegar.gif' border=0 ></A></TD>";
html2 = html2 + "</TR></TABLE>";
divclima.innerHTML = html2;
divclima2.innerHTML = html;
}


}




