  var bandera_prueba=false;
  var ID_Pagina = 403;  //405;//numero de id de typo de la pagina de respuestas

  function ir_segun(x){
    var nwpg="";
    var lugar="";
    var z=100;
    var site = "index.php?id=" + ID_Pagina + "&no_cache=1&";
    for(i=0;i<3;i++)
      if( x[i].checked ) z=i;
    switch(z){
      case 0:
          nwpg='que=simce&nivel=' + document.frm.nivel.value + '&subsector=' + document.frm.subsector.value +'&especialidad=' + document.frm.eje.value + '&internacional=' + document.frm.pruebaint[0].checked+'&tipoPregunta='+document.frm.tipoPreg.value;
          lugar='todo';
          break;
      case 1:
          nwpg='que=sinf&nivel=' + document.frm.nivel.value + '&subsector=' + document.frm.subsector.value +'&especialidad=' + document.frm.eje.value + '&internacional=' + document.frm.pruebaint[0].checked+'&tipoPregunta='+document.frm.tipoPreg.value;
          lugar='todo';
          break;
      case 2:
          nwpg='que=online&nivel=' + document.frm.nivel.value + '&subsector=' + document.frm.subsector.value +'&especialidad=' + document.frm.eje.value + '&internacional=' + document.frm.pruebaint[0].checked;
          lugar='todo';
          break;
      case 100:
          nwpg='about:blank';
          lugar='pdfzone';
          break;
    }
    openLink(site+nwpg,lugar);
    return false;
  }

  function help(){
    //alert('aca debe ir la ayuda');
    prueba_ayuda=window.open('index.php?id=325&l=88','ayuda_pop','height=457, width=640 ,resizable=no, scrollbars=yes, status=no, titlebar=no, toolbar=no');
    //typo3conf/ext/racl_basepreguntassimce/prueba/ayuda.html
    //this.blur();
    prueba_ayuda.focus();
  }

  function preg(x){
    var z=100;
    if(bandera_prueba){
      for(i=0;i<4;i++)
        if(document.frm.opcionP[i].checked) z=i;
    }
    else bandera_prueba=true;
    openLink("pregunta.php?ir=" +x +"&op="+z,'contenido');
  }

  function resp(x){
    openLink("resp.php?ir=" +x,'contenido');
  }

  function finaliza(){
    openLink("totales.php",'todo');
  }

  function dar_nuevamente(){
    bandera_prueba=false;
    openLink("introPregunta.php",'todo');
  }

  function menu_principal(){
    bandera_prueba=false;
    openLink("formulario.php",'todo');
  }

  function ve_online(x){
    //alert(x);
    if(x=='3'){
      document.getElementById('online').style.visibility="visible";
      document.getElementById('txonline').style.color="#333333";
      if(document.frm.tipoFormato[2].checked)
          document.frm.tipoFormato[2].checked=false;
    }
    else{
      document.getElementById('online').style.visibility="hidden";
      document.getElementById('txonline').style.color="#999999";
    }
  }

  function ver_internacional(x,prueba){
    var resultado;
    //alert(x + " - " +  prueba);
    prueba = eval(prueba);
    switch (prueba) {
    // CUARTO BASICO
      case 1:
      //  Cuarto Basico - Educacion matematica
          resultado = true;
          break;
      case 2:
  //  Cuarto Basico - Lenguaje y Comunicacion
          resultado = true;
          break;
      case 3:
  //  Cuarto Basico - Compresion del medio
          resultado = false;
          break;
    // OCTAVO BASICO
      case 4:
      //  Octavo Basico - Educacion matematica
          resultado = true;
          break;
      case 5:
  //  Octavo Basico - Lenguaje y Comunicacion
          resultado = false;
          break;
      case 6:
  //  Octavo Basico - Compresion de la Naturaleza
          resultado = true;
          break;
      case 7:
  //  Octavo Basico - Compresion de la Sociedad
          resultado = false;
          break;
    // SEGUNDO MEDIO
      case 8:
      //  Segundo Medio - Educacion matematica
          resultado = true;
          break;
      case 9:
  //  Segundo Medio - Lengua Castellana
          resultado = true;
          break;
      default:
          resultado = false;
    }
    if(x<=9 && resultado){
      document.getElementById('coninternacionales').style.display="block";
      document.frm.pruebaint[0].checked=false;
      document.frm.pruebaint[1].checked=true;
    }
    else{
      document.getElementById('coninternacionales').style.display="none";
      document.frm.pruebaint[0].checked=false;
      document.frm.pruebaint[1].checked=true;
    }
  }

function verAdvertenciaFraccion(ejeX){
  if((ejeX==1) || (ejeX==10))
    document.getElementById('mesgNoFraccion').style.display="block";
  else
    document.getElementById('mesgNoFraccion').style.display="none";
}

