// Hacemos un chequeo del navegador y definimos funciones para efectos y para simplificacion del codigo
//var moz = ($ && !document.all) ? 1 : 0;

//function browser(v) { return(Math.max(navigator.userAgent.toLowerCase().indexOf(v),0)); }
//function xy(e,v) { return(v?(browser('msie')?event.clientY+document.body.scrollTop:e.pageY):(browser('msie')?event.clientX+document.body.scrollTop:e.pageX)); }
//function uni(v,id,s,top) { var ob=$S(id),b=v/100; ob.opacity=b; ob.top=top+'px'; ob.MozOpacity=b; ob.KhtmlOpacity=b; ob.filter="alpha(opacity="+v+")"; }
//function zero(v) { v=parseInt(v); return(!isNaN(v)?v:0); }
//
//function CE(v) { return(document.createElement(v)); }
//function CTN(v) { return(document.createTextNode(v)); }
//
//function isArray(v) {
//     return v && typeof v === 'object' && typeof v.length === 'number' &&
//	          !(v.propertyIsEnumerable('length'));
//}

var moz = ($ && !document.all) ? 1 : 0;

function $t(v) { return(top.document.getElementById(v)); }
function $tS(v) { return($t(v).style); }
function $(v) { return(document.getElementById(v)); }
function $S(v) { return($(v).style); }
function CE(v) { return(document.createElement(v)); }
function CTN(v) { return(document.createTextNode(v)); }

function Win_Width(){ return (moz) ? window.innerWidth : document.body.clientWidth; }
function Win_Height(){ return (moz) ? window.innerHeight : (document.body.clientHeight-(-300)); }

/**
 *
	FUNCIONES DE LA GALERIA
 *
*/
var LIMITE_DIF = 0.2;
var VELOCIDAD = 20;
var DECELERACION = 4;
var DISTMOV = 120;
var MOVINI = 30;
var ANCHOMASCARA = 468;
var MAXWIDTH = 510;
var MAXHEIGHT = 382;

function move_dcha() {
  //alert($("numfotos").value);
	ancho = 0;
	for (i=1;i<=$("numfotos").value; i++) {
		ancho += $("_"+i).width + 1;
	}
	if ($("leftdest").value > ((ancho-ANCHOMASCARA+MOVINI)*(-1))) {
		$("leftdest").value -= DISTMOV;
		$("dir").value = -1;
		window.setTimeout('mover(-'+MOVINI+')',VELOCIDAD);
	}
}

function move_izda() {
  //alert("izda");
	if ($("leftdest").value < -MOVINI) {
		$("leftdest").value -= -DISTMOV;
		$("dir").value = 1;
		window.setTimeout('mover('+MOVINI+')',VELOCIDAD);
	}
}

function mover(dist) {
	$S("contenedorgaleria").left = ($("left").value-(-dist))+"px";
	$("left").value -= (-dist);
	
	dif = ($("leftdest").value - $("left").value) / DECELERACION;

	if (dif > LIMITE_DIF) {
		if ($("dir").value == 1) window.setTimeout('mover('+dif+')',VELOCIDAD);
		else window.setTimeout('mover(-('+dif+'))',VELOCIDAD);
	}
	else if (dif < -LIMITE_DIF) {
		if ($("dir").value == 1) window.setTimeout('mover(-('+dif+'))',VELOCIDAD);
		else window.setTimeout('mover('+dif+')',VELOCIDAD);
	}
	else {
		$("left").value = $("leftdest").value;
		$S("contenedorgaleria").left = $("leftdest").value;
	}
}

function mostrar_imagen(imagen,texto,textob,lafecha) {
	if ($(imagen).width > $(imagen).height) {
		width = MAXWIDTH;
		height = $(imagen).height * MAXWIDTH / $(imagen).width;
	}
	else {
		height = MAXHEIGHT;
		width = $(imagen).width * MAXHEIGHT / $(imagen).height;
	}
	
	$('cont_imggrande').innerHTML = "<img id='imggrande' src='"+$(imagen).src+"' width='"+width+"' height='"+height+"' />";
	//alert($('cont_imggrande').innerHTML);
	$('imagenpie').innerHTML = texto;
	$('imagenpieb').innerHTML = textob+" "+lafecha;
}
/**
	FIN DE LAS FUNCIONES DE LA GALERIA
*/

/**
 * @name Crear_AnchorElement
 * @languaje JavaScript
 * @desc Devuelve un objeto de tipo a 
 * 
 * @param text txt
 * @param text classname
 * @param text href
 *
 * @return objeto-a a
 */		
function Crear_AnchorElement(txt,classname,href) {
  a = CE("A");
  a.className = classname;
  a.href = href;
  span = CE("SPAN");
  spantxt = CTN(txt);
  span.appendChild(spantxt);
  a.appendChild(span);
  return a;
}

/*
  Funcion para activar el menu de pestañas del modulo de anuncios de regatas
*/
function Activar_Pestana(indice) {
  switch(indice) {
    case 0:
      $("pestencompeti").className = "pestreg encompeti_on";
      $("pestproxireg").className = "pestreg proxireg_1";
      $("pestregfinal").className = "pestreg regfinal_off";
      $S("proxireg").display = "none";
      $S("regfinal").display = "none";
      $S("encompeti").display = "none";
      break;
    case 1:
      $("pestencompeti").className = "pestreg encompeti_off";
      $("pestproxireg").className = "pestreg proxireg_on";
      $("pestregfinal").className = "pestreg regfinal_off";
      $S("regfinal").display = "none";
      $S("encompeti").display = "none";
      $S("proxireg").display = "none";
      break;
    case 2:
      $("pestencompeti").className = "pestreg encompeti_off";
      $("pestproxireg").className = "pestreg proxireg_2";
      $("pestregfinal").className = "pestreg regfinal_on";
      $S("encompeti").display = "none";
      $S("proxireg").display = "none";
      $S("regfinal").display = "none";
      break;
  }
  setTimeout("Activar_PestanaN("+indice+")", 100);
}

function Activar_PestanaN(n) {
  switch(n) {
    case 0:
      $S("encompeti").display = "block";
      break;
    case 1:
      $S("proxireg").display = "block";
      break;
    case 2:
      $S("regfinal").display = "block";
      break;
  }
}


function Activar_Pestana_n(indice) {
  switch(indice) {
    case 0:
      $("pesttitulares").className = "pestreg titular_on";
      $("pestbuscador").className = "pestreg busqnoti_off";
      $S("buscador").display = "none";
      $S("encompeti").display = "none";
      break;
    case 1:
      $("pesttitulares").className = "pestreg titular_off";
      $("pestbuscador").className = "pestreg busqnoti_on";
      $S("encompeti").display = "none";
      $S("buscador").display = "none";
      break;
  }
  setTimeout("Activar_PestanaT("+indice+")", 100);
}


function Activar_PestanaT(n) {
  switch(n) {
    case 0:
      $S("encompeti").display = "block";
      break;
    case 1:
      $S("buscador").display = "block";
      break;
  }
}


function Activar_Pestana_P(indice) {
  switch(indice) {
    case 0:
      $("pestenpesca").className  = "pestpesca enpesca_on";
      $("pestproxipes").className = "pestpesca proxipes_1";
      $("pestpesfinal").className = "pestpesca pesfinal_off";
      $S("proxipes").display = "none";
      $S("pesfinal").display = "none";
      $S("enpesca").display = "none";
      break;
    case 1:
      $("pestenpesca").className  = "pestpesca enpesca_off";
      $("pestproxipes").className = "pestpesca proxipes_on";
      $("pestpesfinal").className = "pestpesca pesfinal_off";
      $S("proxipes").display = "none";
      $S("pesfinal").display = "none";
      $S("enpesca").display = "none";
      break;
    case 2:
      $("pestenpesca").className  = "pestpesca enpesca_off";
      $("pestproxipes").className = "pestpesca proxipes_2";
      $("pestpesfinal").className = "pestpesca pesfinal_on";
      $S("proxipes").display = "none";
      $S("pesfinal").display = "none";
      $S("enpesca").display = "none";
      break;
  }
  setTimeout("Activar_PestanaN_P("+indice+")", 100);
}

function Activar_PestanaN_P(n) {
  switch(n) {
    case 0:
      $S("enpesca").display = "block";
      break;
    case 1:
      $S("proxipes").display = "block";
      break;
    case 2:
      $S("pesfinal").display = "block";
      break;
  }
}


function Activar_Pestana_A(indice) {
  switch(indice) {
    case 0:
      $("pestenactsoc").className = "pestactsoc enactsoc_on";
      $("pestproxiacs").className = "pestactsoc proxiacs_1";
      $("pestacsfinal").className = "pestactsoc acsfinal_off";
      $S("proxiacs").display = "none";
      $S("acsfinal").display = "none";
      $S("enactsoc").display = "none";
      break;
    case 1:
      $("pestenactsoc").className = "pestactsoc enactsoc_off";
      $("pestproxiacs").className = "pestactsoc proxiacs_on";
      $("pestacsfinal").className = "pestactsoc acsfinal_off";
      $S("proxiacs").display = "none";
      $S("acsfinal").display = "none";
      $S("enactsoc").display = "none";
      break;
    case 2:
      $("pestenactsoc").className = "pestactsoc enactsoc_off";
      $("pestproxiacs").className = "pestactsoc proxiacs_2";
      $("pestacsfinal").className = "pestactsoc acsfinal_on";
      $S("proxiacs").display = "none";
      $S("acsfinal").display = "none";
      $S("enactsoc").display = "none";
      break;
  }
  setTimeout("Activar_PestanaN_A("+indice+")", 100);
}

function Activar_PestanaN_A(n) {
  switch(n) {
    case 0:
      $S("enactsoc").display = "block";
      break;
    case 1:
      $S("proxiacs").display = "block";
      break;
    case 2:
      $S("acsfinal").display = "block";
      break;
  }
}



function Activar_Pestana_Idx(indice) {
  switch(indice) {
    case 0:
      $("idxregata").className = "pestidx enidx1_on";
      $("idxpesca").className  = "pestidx enidx2_1";
      $("idxacto").className   = "pestidx enidx3_off";
      $S("encompeti").display = "none";
      $S("enpesca").display   = "none";
      $S("enactsoc").display  = "none";
      break;
    case 1:
      $("idxregata").className = "pestidx enidx1_off";
      $("idxpesca").className  = "pestidx enidx2_on";
      $("idxacto").className   = "pestidx enidx3_off";
      $S("encompeti").display = "none";
      $S("enpesca").display   = "none";
      $S("enactsoc").display  = "none";
      break;
    case 2:
      $("idxregata").className = "pestidx enidx1_off";
      $("idxpesca").className  = "pestidx enidx2_2";
      $("idxacto").className   = "pestidx enidx3_on";
      $S("encompeti").display = "none";
      $S("enpesca").display   = "none";
      $S("enactsoc").display  = "none";
      break;
  }
  setTimeout("Activar_PestanaN_Idx("+indice+")", 100);
}

function Activar_PestanaN_Idx(n) {
  switch(n) {
    case 0:
      $S("encompeti").display = "block";
      break;
    case 1:
      $S("enpesca").display = "block";
      break;
    case 2:
      $S("enactsoc").display = "block";
      break;
  }
}




/*
  Funcion para cambiar la opcion seleccionada en un menu lateral
*/
function Cambiar_MenuLat(optsel,totalopt,cambiarcapa) {
	if ($('regatistaver') != null) {
		if ($('regatistaver').value != 0) { 
			$S('regatista_bloque_'+$('regatistaver').value).display='none';
			$('regatistaver').value = 0;
		}
	}
	
	for (i=1;i<=totalopt;i++) {
		if (i==optsel) {   newclass = "on";   newdisplay = "block";   }
		else           {   newclass = "off";  newdisplay = "none";    }
		
		$("menulat"+i).className = newclass;
		if (cambiarcapa) $S("divmenulat"+i).display = newdisplay;
	}
	
}

function Cambiar_MenuLat2(optsel,totalopt,cambiarcapa) {
	if (cambiarcapa == 1) {
		$S("divmenulat6").display = "block";
		$S("divmenulat0").display = "none";
	} else {
		$S("divmenulat6").display = "none";
		$S("divmenulat0").display = "block";
	}
}

/*
*/
function Cambiar_Aviso(obj,num) {
  if (obj.className == 'arriba') {
    $S('aviso_comp_'+num).display='none'; 
    obj.className='';
  } 
  else {
    $S('aviso_comp_'+num).display='block'; 
    obj.className='arriba';
  }  
}
function Cambiar_Inscri(obj) {
  if (obj.className == 'arriba') {
    $S('inscri_comp').display='none'; 
    obj.className='';
  } 
  else {
    $S('inscri_comp').display='block'; 
    obj.className='arriba';
  }  
}
/*
*/
function mostrar_regatista(id) {
	$S('divmenulat2').display='none';
	$S('regatista_bloque_'+id).display='block';
	$('regatistaver').value = id;
}

function ocultar_regatista(id) {
	$S('divmenulat2').display='block';
	$S('regatista_bloque_'+id).display='none';
	$('regatistaver').value = 0;
}

function Mostrar_10clicks(elidio) {
	  	$S("tapotodo").height = Win_Height()+"px";
	  	$("contenidoflash").parentNode.style.height = "626px";
	    so = new SWFObject("club10"+elidio+".swf", "movie", "838", "626", "8,0,0,0", "#ffffff");
		  so.addParam("quality", "high");
	  	so.addParam("movie","club10"+elidio+".swf");
	  	so.write("contenidoflash");
	  	$S("flash10clicks").display = "block";
	  	$S("tapotodo").display = "block";
	  	$S("decerrar").display = "none";
}

function Ocultar_10clicks() {
	  	$S("flash10clicks").display = "none";
	  	$S("tapotodo").display = "none";
	  	$S("decerrar").display = "block";
	  	$("contenidoflash").innerHTML = "";
}


function Mostrar_virtual(elidio) {
			elidio = elidio.substr(1,elidio.length);
      //alert(elidio);
	  	$S("tapotodo").height = Win_Height()+"px";
	  	$("contenidoflash").parentNode.style.height = "570px";
	    so = new SWFObject("visitavirtual.swf?idioma="+elidio, "movie", "838", "570", "8,0,0,0", "#ffffff");
		  so.addParam("quality", "high");
	  	so.addParam("movie","visitavirtual.swf?idioma="+elidio);
	  	so.write("contenidoflash");
	  	$S("flash10clicks").display = "block";
	  	$S("tapotodo").display = "block";
	  	$S("decerrar").display = "none";
}

function Ocultar_virtual() {
	  	$S("flash10clicks").display = "none";
	  	$S("tapotodo").display = "none";
	  	$S("decerrar").display = "block";
	  	$("contenidoflash").innerHTML = "";
}

function Mostrar_Galer(cual) {
      $('galeria_form').action = 'carga_galeria.php';
      $('galeria_form').submit();
      $('galeria_form').action = 'cambia_gal.php';
      if (document.getElementById('caja_abandon')) {
        document.getElementById('caja_abandon').style.display = 'none';
      }
      if (document.getElementById('caja_cursant')) {
        document.getElementById('caja_cursant').style.display = 'none';
      }
	  	$S("tapotodo").height =  Win_Height()+"px";
	  	$S("prin").display = "block";
	  	$S("tapotodo").display = "block";
	  	//$S("decerrar").display = "none";

	  	
	  	document.getElementById('laga').value = cual;
	  	//alert(document.getElementById('laga').value);
}



function Mostrar_Galer2(cual) {
	  	$S("tapotodo").height =  Win_Height()+"px";
	  	$S("prin").display = "block";
	  	$S("tapotodo").display = "block";
	  	$S("decerrar").display = "none";
	  	document.getElementById('laga').value = cual;
      submitea2(document.getElementById('laga').value);
}

function Ocultar_Galer() {
			if (document.getElementById('caja_abandon')) {
        document.getElementById('caja_abandon').style.display = '';
      }
      if (document.getElementById('caja_cursant')) {
        document.getElementById('caja_cursant').style.display = '';
      }
      
      
	  	$S("prin").display = "none";
	  	$S("tapotodo").display = "none";
}


function validafecha(fld) {
    var RegExPattern = /^((((0?[1-9]|[12]\d|3[01])[\.\-\/](0?[13578]|1[02])[\.\-\/]((1[6-9]|[2-9]\d)?\d{2}))|((0?[1-9]|[12]\d|30)[\.\-\/](0?[13456789]|1[012])[\.\-\/]((1[6-9]|[2-9]\d)?\d{2}))|((0?[1-9]|1\d|2[0-8])[\.\-\/]0?2[\.\-\/]((1[6-9]|[2-9]\d)?\d{2}))|(29[\.\-\/]0?2[\.\-\/]((1[6-9]|[2-9]\d)?(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)|00)))|(((0[1-9]|[12]\d|3[01])(0[13578]|1[02])((1[6-9]|[2-9]\d)?\d{2}))|((0[1-9]|[12]\d|30)(0[13456789]|1[012])((1[6-9]|[2-9]\d)?\d{2}))|((0[1-9]|1\d|2[0-8])02((1[6-9]|[2-9]\d)?\d{2}))|(2902((1[6-9]|[2-9]\d)?(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)|00))))$/;
    var errorMessage = '<??>';
    if ((fld.value.match(RegExPattern)) && (fld.value!='')) {
        return true; 
    } else {
        return false;
    } 
}

function vuelve_fotovideo(){
  $t("cont_videofoto").style.display = 'none';
  $t("cont_listado").style.display = '';
}

function Cambiar_fotovid (param1, param2) {
	//alert("p1:"+param1+" --- p2:"+param2);
	$S("cont_listado").display = "none";
	$S("cont_videofoto").display = "";
	$("id_fotovid").value = param2;
	$("fotovid_form").submit();
}

function Pinta_CalReg () {
  $("cal2pdf").submit();
}

function ocu_descobusc(elesto) {
          if (elesto=='dest') {
            document.getElementById('mul_conten').style.display = '';
            document.getElementById('mul_buscad').style.display = 'none';
            document.getElementById('mul_dch').style.display = '';
            document.getElementById('titulogaleria').style.display = '';
            document.getElementById('butn_destacadas').className = 'tit_destacadas_0';
            document.getElementById('butn_buscador').className = 'tit_buscador_1';
            document.getElementById('galeria_form').action = "cambia_gal.php";
          }
          else {
            document.getElementById('mul_conten').style.display = 'none';
            document.getElementById('mul_buscad').style.display = '';
            document.getElementById('mul_dch').style.display = 'none';
            document.getElementById('titulogaleria').style.display = 'none';
            document.getElementById('butn_destacadas').className = 'tit_destacadas_1';
            document.getElementById('butn_buscador').className = 'tit_buscador_0';
          }
        }

function submit_busca() {
                if (validafecha(document.getElementById('feci_busgal')) || document.getElementById('feci_busgal').value == ""|| document.getElementById('feci_busgal').value == "dd/mm/aaaa"){
                  if (validafecha(document.getElementById('fecf_busgal')) || document.getElementById('fecf_busgal').value == "" || document.getElementById('fecf_busgal').value == "dd/mm/aaaa"){
                    document.getElementById('buscamientos').innerHTML = "";
                    document.getElementById('mul_dch').style.display = '';
                    document.getElementById('galeria_form').action = "busca_gal.php";
                    document.getElementById('galeria_form').submit();
                  }
                  else {
                    alert('<?=$dictio["error_fecha"]?>');
                    document.getElementById('fecf_busgal').focus();
                  }
                }
                else {
                  alert('<?=$dictio["error_fecha"]?>');
                  document.getElementById('feci_busgal').focus();
                }
              }
              
function submit_busca_v() {
                if (validafecha(document.getElementById('feci_busgal_v')) || document.getElementById('feci_busgal_v').value == ""){
                  if (validafecha(document.getElementById('fecf_busgal_v')) || document.getElementById('fecf_busgal_v').value == ""){
                    document.getElementById('buscamientos_v').innerHTML = "";
                    document.getElementById('mul_dch_v').style.display = '';
                    document.getElementById('galeria_form').action = "busca_gal_v.php";
                    document.getElementById('galeria_form').submit();
                  }
                  else {
                    alert('<?=$dictio["error_fecha"]?>');
                    document.getElementById('fecf_busgal_v').focus();
                  }
                }
                else {
                  //alert('<?=$dictio["error_fecha"]?>');
                  document.getElementById('feci_busgal_v').focus();
                }
              }              
              
              
function showVideo(id) {
 document.getElementById('yt_the_video').innerHTML = '<' + 'a name="yt_video"><' + 'object width="' + yt_video_width + '" height="' + yt_video_height + '"><param name="movie" value="http://www.youtube.com/v/' + id + '"></param><' +'embed src="http://www.youtube.com/v/' + id + '" type="application/x-shockwave-flash" width="' + yt_video_width + '" height="' + yt_video_height + '"></embed></object></a>';
}

function ocu_descobusc_v(elesto) {
  if (elesto=='dest') {
    document.getElementById('mul_conten_v').style.display = '';
    document.getElementById('mul_buscad_v').style.display = 'none';
    document.getElementById('mul_dch_v').style.display = '';
    document.getElementById('titulogaleria_v').style.display = '';
    document.getElementById('butn_destacadas_v').className = 'tit_destacadas_0';
    document.getElementById('butn_buscador_v').className = 'tit_buscador_1';
    document.getElementById('galeria_form').action = "cambia_gal.php";
  }
  else {
    document.getElementById('mul_conten_v').style.display = 'none';
    document.getElementById('mul_buscad_v').style.display = '';
    document.getElementById('mul_dch_v').style.display = 'none';
    document.getElementById('titulogaleria_v').style.display = 'none';
    document.getElementById('butn_destacadas_v').className = 'tit_destacadas_1';
    document.getElementById('butn_buscador_v').className = 'tit_buscador_0';
  }
}

function submiteav(elvid,elid,lablanca,eltexto,elpie,lafecha) {
  document.getElementById('mul_dch_v').style.display = '';
  for (ss = 0;ss<document.getElementById('numgalerias_v').value;ss++){
    document.getElementById('gal_xv'+ss).style.backgroundColor='#ffffff';
    document.getElementById('gal_xv'+ss).style.fontWeight= 'normal';
  }
  document.getElementById('gal_xv'+(lablanca)).style.backgroundColor='#dbeff9';
  document.getElementById('gal_xv'+(lablanca)).style.fontWeight= 'bold';
  document.getElementById('titulogaleria_v').innerHTML=eltexto;
  document.getElementById('lagaleria_v').value = elid;
  document.getElementById('cont_imggrande_v').innerHTML = '<a name="yt_video"><object name="zapatitos" width="513" height="426"><param name="movie" value="'+elvid+'"></param><embed src="'+elvid+'" type="application/x-shockwave-flash" width="513" height="426"></embed></object></a>';
  
  document.getElementById('imagenpie_v').innerHTML = elpie;
  document.getElementById('imagenpieb_v').innerHTML = lafecha;
  //document.galeria_form.submit();
}

function submiteabv(elvid,elid,lablanca,eltexto,elpie,lafecha) {
  // hola que tal
  document.getElementById('mul_dch_v').style.display = '';
  for (ss = 0;ss<document.getElementById('numgalerias_v').value;ss++){
    document.getElementById('galb_xv'+ss).style.backgroundColor='#ffffff';
    document.getElementById('galb_xv'+ss).style.fontWeight= 'normal';
  }
  document.getElementById('galb_xv'+(lablanca)).style.backgroundColor='#dbeff9';
  document.getElementById('galb_xv'+(lablanca)).style.fontWeight= 'bold';
  document.getElementById('titulogaleria_v').innerHTML=eltexto;
  document.getElementById('lagaleria_v').value = elid;
  document.getElementById('cont_imggrande_v').innerHTML = '<a name="yt_video"><object width="513" height="426"><param name="movie" value="'+elvid+'"></param><embed src="'+elvid+'" type="application/x-shockwave-flash" width="513" height="426"></embed></object></a>';
  document.getElementById('imagenpie_v').innerHTML = elpie;
  document.getElementById('imagenpieb_v').innerHTML = lafecha;
  //document.galeria_form.submit();
}
                            

/*
 * Funciones para mostrar la secuencia de pantallas de ayuda para la
 * activación del Activex en IE6. Esto esnecesario para que funcione
 * la webcam
 */
var arImagenes = Array('img/captura_ie_01.jpg','img/captura_ie_02.jpg','img/captura_ie_03.jpg','img/captura_ie_04.jpg');
var arPies = Array();

arPies[0] = Array('Al menú "Herramientas" seleccionau "opciones de internet".','En el menú "herramientas" seleccione "opciones de internet".');
arPies[1] = Array('Un cop a "opciones de internet" clicau sobre la pipella de "seguridad" i seleccionau la zona de "internet", a continuació clicau el botó de "Nivel Personalizado".','Una vez en "opciones de internet" haga clic sobre la pestaña de "seguridad" y seleccione la zona de "internet", a continuación haga clic el botón de "Nivel Personalizado".');
arPies[2] = Array('Cercau l\'opció de "Ejecutar controles y complementos de ActiveX" i seleccionau "Activar".','Busque la opcion de "Ejecutar controles y complementos de ActiveX" i seleccione "Activar".');
arPies[3] = Array('Acceptau el canvi de seguretat de la zona, i ja podreu veure les imatges de la càmera correctament.','Acepte el cambio de seguridad de la zona y ya podrá ver las imágenes de la cámara correctamente.');
//Pasos a seguir para configurar el Internet explorer
var imgNum = 0;

//Añadido el 25-03-2009
function Mostrar_Pasos(cual) {
	i_aux.location = 'carga_pasos.php';

	if (document.getElementById('locambio')) {
      document.getElementById('locambio').style.display = 'none';
    }
    if (document.getElementById('caja_cursant')) {
      document.getElementById('caja_cursant').style.display = 'none';
    }
    document.getElementById('camara').style.display = 'none';
  	//$S("tapotodo").height =  "135%";
  	$S("tapotodo").height =  "918px";
  	$S("prin").display = "block";
  	$S("tapotodo").display = "block";
}

function elanterior_paso_actwebcam(idi){
	if (imgNum != 0) imgNum--;
	
	document.getElementById('texto_pie').innerHTML = arPies[imgNum][idi-1];	 
	document.getElementById('imagen_paso').src = arImagenes[imgNum];				
}

function elsiguiente_paso_actwebcam(idi){
	
	if (imgNum != arImagenes.length-1 ) imgNum=imgNum-(-1);
	
	document.getElementById('texto_pie').innerHTML = arPies[imgNum][idi-1];	 
	document.getElementById('imagen_paso').src = arImagenes[imgNum];				
}


////////////
function Ocultar_Pasos() {
	if (document.getElementById('caja_abandon')) {
document.getElementById('caja_abandon').style.display = '';
}
if (document.getElementById('caja_cursant')) {
document.getElementById('caja_cursant').style.display = '';
}

	document.getElementById('camara').style.display = '';
	$S("prin").display = "none";
	$S("tapotodo").display = "none";
}


