try{
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
document.write(unescape("%3Cscript src='/js/fganalytics.js' type='text/javascript'%3E%3C/script%3E"));
}catch(e){
}

function padding_resolucion() {
	if (screen.width > 1024)
		$('#contenedora .contenido .hueco_particulares h2, #contenedora .contenido .hueco_particulares p, #contenedora .contenido .hueco_particulares ul').css('padding-left', '10%');
	else
		$('#contenedora .contenido .hueco_particulares h2, #contenedora .contenido .hueco_particulares p, #contenedora .contenido .hueco_particulares ul').css('padding-left', '0');
}

/***BUSCADOR**/
function escribebuscador()
{
//	document.write('<div style="margin-top:29px"><img src="/images/sizer.gif" alt="" width="1" height="1"/></div>');
	//buscador habilitado
		//document.write('<form name="fbuscador" method="get" action="/buscador/servlet/busca"><div class="buscador"><input type="text" name="value"  size="30" /><input type="image" class="lupa" src="/comunes/btn_buscador.gif" alt="buscar" /></div><input type="hidden" name="col" value="particulares"><input type="hidden" name="col" value="empresas"><input type="hidden" name="col" value="generaciona"><input type="hidden" name="col" value="doblea"><input type="hidden" name="col" value="osyc"><input type="hidden" name="col" value="conozcacajastur"></form>');
		
	//buscador deshabilitado
	  //document.write('<form name="fbuscador" method="get" action="https://www.cajastur.es/searchblox/servlet/SearchServlet" onSubmit="alert(\'Funcionalidad no disponible en estos momentos\');return false;"><div class="buscador"><a href="#" onClick="alert(\'Funcionalidad no disponible en estos momentos\');return false;" onkeypress="alert(\'Funcionalidad no disponible en estos momentos\');return false;" ><img class="lupa" src="/images/btnbuscar.gif" alt="buscar" width="61" height="16" /></a><input type="text" name="query"  size="30" /></div><input type="hidden" name="col" value="1"><input type="hidden" name="col" value="2"><input type="hidden" name="col" value="3"><input type="hidden" name="col" value="4"><input type="hidden" name="col" value="5"><input type="hidden" name="col" value="6"></form>');
}



function addLoadEventJS(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}


/* menú inferior izda . Acceso a Banca a Distancia */ 
function menubancadistancia(){
	document.write('<div class="inf">')
	if (location.href.indexOf('https://')!=-1)
	{
		document.write('<div class="cuadrogris">')
		
		
		// EL TEXTO ALTERNATIVO AL IFRAME SÓLO SE ESCRIBE OK EN INTERNET EXPLORER
		// MÁS ABAJO HAGO QUE FIREFOX Y DEMÁS LO ESCRIBAN BIEN
		document.write('<iframe id="framebancadistancia" src="https://cajasturdirecto.cajastur.es/BEWeb/2048/4048/portal_inicio_identificacion.action" name="loginCECA" id="loginCECA" width="160" height="120" frameborder="0" title="Acceso al servicio de Asturvía para clientes Cajastur" >');
		document.write('<a href="https://asturvia.cajastur.es/4048" >Accede a tu banca por internet desde entorno seguro</a>');
		document.write('</iframe>');
		
		
		document.write('<br/><p style="text-align:left;padding:0 0 0 4%;"><a href="/claves/index.html" onclick="popup2(this.href);return false" target="_blank" title="abre en ventana nueva" style="text-align:left;">¿Has olvidado tus claves?</a></p>');
		document.write('<br/><p class="alertaseguridad" style="border-bottom:1px solid #DFDFDF;text-align:left;padding:0 0 8% 4%;"><a href="/recseguridad/indexw.html" style="color:#FF1900;" style="text-align:left;">Aviso importante de seguridad</a></p>');	
		
		document.write('</div>')
		document.write('<div style="background-color:#ECECEC">')
		document.write('<p style="text-align:left;padding:0 0 0 4%;"><a href="/contratacion/index.html" onclick="abrecontratacion();return false" target="_blank" title="abre en ventana nueva" style="text-align:left;">¿Cómo empezar a operar por internet?</a></p><br/>')		

		document.write('<p style="text-align:left;padding:0 0 0 4%;"><a href="/demo/4048/index.html">Ver demostración</a></p><br/>')
		document.write('<p style="text-align:left;padding:0 0 0 4%;"><a onclick="pageTracker._trackEvent(\'Banca Electronica\', \'DNIe\', \'Acceso desde Particulares\')" href="https://cajasturdirecto.cajastur.es/BEWeb/2048/4048/inicio_identificacion_DNIE.action">Acceso con DNI electrónico</a></p>');					
		document.write('</div>')
		
		
		
		addLoadEventJS(function() {
	
			try { // EN IE FALLA, PERO ES LO QUE QUEREMOS, PUES EL ENLACE QUE ESTAMOS AÑADIENDO APARECE BIEN EN EL IE SIN TENER QUE HACER ESTOS TEMAS...
	
				var fr = document.getElementById("framebancadistancia");
				for (var i=fr.childNodes.length-1; i>=0; i--) {
					var hijo = fr.childNodes[i];
					fr.removeChild(hijo);
				}
				
				var a = document.createElement("a");
				a.href = "https://asturvia.cajastur.es/4048";
				a.innerHTML = "Accede a tu banca por internet desde entorno seguro";
	
				fr.appendChild(a);
				
			} catch (e) {
			
			}

		});

	}	
	
	else {
		document.write('<div class="cuadrogris" >')
		document.write('<strong>Acceso a clientes<br />de Banca por Internet:</strong><br /><br />');
		document.write('Por motivos de seguridad se ha deshabilitado el acceso desde esta página, ya que estás accediendo desde un entorno no seguro (http, en lugar de https). <br /><br /><a href="https://'+location.href.split("http://")[1]+'" >Accede a esta página desde entorno seguro</a> ');
		document.write('</div>')	
		document.write('<div class="cuadroblanco">')
		document.write('¿Eres cliente de Cajastur y deseas <a href="/contratacion/index.html" target="_blank" title="abre en ventana nueva" onclick="abrecontratacion();return false" class="rojo">empezar a operar</a> por Internet?<br /><br />')		
		document.write('<img src="/images/sizer.gif" alt="" height="1" /><a href="/demo/4048/index.html"  class="gris">Demo</a>')		
		document.write('</div>')	
	}
	document.write('</div>')			
}

			
/* Fin /menú inferior izda . Acceso a Banca a Distancia */			
/**************CAJASTUR DIRECTO FUNCIONES ***********************************/
var recibo=0;

function abrecajadirecto()
	{
		var fecha = new Date();
		var dia=fecha.getDate();
		var mes=fecha.getMonth()+1;
		var hora=fecha.getHours();
		if ((document.getElementById('formuBanca').PAN1.value!='')&&(document.getElementById('formuBanca').PIN1.value!=''))
			{	
				document.getElementById('formuBanca').PAN.value=document.getElementById('formuBanca').PAN1.value.toUpperCase();
				document.getElementById('formuBanca').PIN.value=document.getElementById('formuBanca').PIN1.value;
				document.getElementById('formuBanca').PAN1.value='';
				document.getElementById('formuBanca').PIN1.value='';
				document.getElementById('formuBanca').OPERACION.value='CORP';
				document.getElementById('formuBanca').submit();
			}
	}

function cajadirecto()
{
	if ((document.getElementById('formuBanca').PAN1.value!='')&&(document.getElementById('formuBanca').PIN1.value!=''))
	{
		setTimeout("abrecajadirecto()",1500);
	}
}
/**************/ /*CAJASTUR DIRECTO FUNCIONES*******************************/
/* MENÚ INFERIOR */
function menuinferior () {
	document.write('<div style="clear:both;"><img src="/images/sizer.gif" width="1" height="15" alt="" /></div>');
	document.write('<div class="menuinferior">');
	document.write('<img src="/images/sizer.gif" width="4" height="1" alt="" /><a href="/avisolegal/index.html?titulo='+document.title+'">Aviso legal</a><img src="/images/sizer.gif" width="4" height="1" alt="" />|');
	document.write('<img src="/images/sizer.gif" width="4" height="1" alt="" /><a href="/tablonanuncios/?titulo='+document.title+'">Tablón de anuncios</a><img src="/images/sizer.gif" width="4" height="1" alt="" />|');
	document.write('<img src="/images/sizer.gif" width="4" height="1" alt="" /><a href="/politicaprivacidad/index.html?titulo='+document.title+'">Política de Privacidad y Seguridad</a><img src="/images/sizer.gif" width="4" height="1" alt="" />|');
	document.write('<img src="/images/sizer.gif" width="4" height="1" alt="" /><a href="/conozcacajastur/infolegal/infolegal.html?titulo='+document.title+'">Información para inversores</a>');
	document.write('</div>');
	document.write('<div style="clear:both;"><img src="/images/sizer.gif" width="1" height="15" alt="" /></div>');
}
/* Abre popup. */
	function popup(sURL)
	  {newwindow=open(sURL,"popupnav","scrollbars=no,location=no,toolbar=no,directories=no,menubar=no,resizable=no,resize=no,status=no,width=710,height=475,screenX=20,screenY=20,left=20,top=20");}
	function popup2(sURL)
	  {newwindow=open(sURL,"popupnav","scrollbars=no,location=no,toolbar=no,directories=no,menubar=no,resizable=no,resize=no,status=no,width=470,height=375,screenX=20,screenY=20,left=20,top=20");}	  
	function popup3(sURL)
	  {newwindow=open(sURL,"popupnav3","scrollbars=yes,location=no,toolbar=no,directories=no,menubar=no,resizable=no,resize=no,status=no,width=470,height=375,screenX=20,screenY=20,left=20,top=20");}	  
/* FIn Abre popup */
/* Abre popup de contratación de banca a distancia */
function abrecontratacion()
{
    newwindow=open('/contratacion/index.html',"popupcon","scrollbars=yes,location=no,toolbar=no,directories=no,menubar=no,resizable=no,resize=no,status=no,width=710,height=470,screenX=20,screenY=20,left=20,top=20");
}

/* /Abre popup de contratación de banca a distancia */

/******************** Inserta imagen del telefono de atencion 24 horas ************************/
function insertaImagen() {
	document.write('<div class="telefono">');
	document.write('<abbr title="Teléfono Atención al Cliente 24h"><span class="tel">902 105 005</span> <span class="nota">24h</span></abbr>');
	document.write('</div>');
} 

function glog(){
	var imgsrc=new Image();
	imgsrc.src = "/log.jsp?&dsd=home";
	
}
try{
		glog();
}catch(e){
	//
}
