function desplazar_recuadro(ID_DESP,ID_CONTENIDO){
  if(document.getElementById(ID_CONTENIDO)){
    if(document.getElementById(ID_CONTENIDO).style.display=='none' || document.getElementById(ID_CONTENIDO).className.lastIndexOf("novisible")>=0){
      $(document.getElementById(ID_CONTENIDO)).slideDown("slow");
      document.getElementById(ID_CONTENIDO).className=document.getElementById(ID_CONTENIDO).className.replace(' novisible','');
      if(document.getElementById(ID_DESP))
        document.getElementById(ID_DESP).className=document.getElementById(ID_DESP).className.replace(' cajas_despl_abierta','');
        
    }
    else{
      $(document.getElementById(ID_CONTENIDO)).slideUp("slow");
      if(document.getElementById(ID_DESP))
        document.getElementById(ID_DESP).className+=' cajas_despl_abierta';
    }
  }
}
function validarEmail(valor,no_alert) {
    if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(valor.value)){
      return (true)
    }
	  else {
	    if(!no_alert)
        alert("La dirección de email es incorrecta.");
      valor.select();
      valor.focus();
      return (false);
    }
  }
function capa_progresiva_abajo(obj,op){
  if(obj && (op=='1' || op=='2')){
    if(op=='1'){
      $(obj).slideDown("slow");
    }
    else if(op=='2'){
      $(obj).slideUp("fast");
    }
  }
}
function capa_mostrar_ocultar(obj,op){
  if(obj && (op=='1' || op=='2')){
    if(op=='1'){
      obj.style.display='';
    }
    else if(op=='2'){
      obj.style.display='none';
    }
  }
}
function imprSelec(nombre){
  var ficha = document.getElementById(nombre);
  if(ficha){
    var ventimp = window.open(' ', 'popimpr');
    ventimp.document.write( ficha.innerHTML );
    ventimp.document.close();
    ventimp.print( );
    ventimp.close();
  }
}
function mas_caracteristicas(objdesplegable,objflecha){
  if(objdesplegable){
    if(objdesplegable.style.display=="none"){
      $(objdesplegable).slideDown("slow");
      if(objflecha){
        objflecha.style.backgroundPosition='right 0px';
      }
    }
    else{
      $(objdesplegable).slideUp("slow");
      if(objflecha){
        objflecha.style.backgroundPosition='right -50px';
      }
    }
  }
}

