function agregarFavoritos()
{

var direccion="https://www.bbva.es/TLBS/tlbs/jsp/esp/home/index.jsp"; 

var titulo="BBVA.ES"; 

var ns = "Para agregar BBVA.es a su libreta de Bookmarks, pulse: [Ctrl] + [ D ]"; 

var op = "Para agregar BBVA.es a sus Preferidos de Opera, pulsa: [Ctrl] + [Mays] + [T]"; 

if (navigator.userAgent.indexOf("Opera")!=-1) alert(op); 
else { if (navigator.appName == "Netscape") alert(ns); 
         else { 
                   window.external.AddFavorite(direccion, titulo);  
                 }
 } 

}

function changeURL(miURL)
{
    window.location=miURL;
}

function openURL(miURL)
{
    if (miURL != "#")
    {
	    window.open(miURL);
	}
}

function imprimir()
{
var ventana;
strUrl = ''+ window.location;
pos= strUrl.indexOf("?");
if (pos<1)
{
	strUrl_1="?";
}
else
	{
	strUrl_1 = "&";
	}
	
pos= strUrl.indexOf("#");
if(pos!=-1)
	{
	                strUrl=strUrl.replace("#0","");
	                strUrl=strUrl.replace("#1","");
 	                strUrl=strUrl.replace("#","");
	}
	
ventana = window.open(strUrl + strUrl_1 + "accion=imprimir","ventana");
ventana.print();
}


// ------------------------
// Rutinas para las cookies multilenguaje
// ------------------------
function GetCookie (name) {
  if (document.cookie.indexOf(name) > -1) 
  {
	parametros=document.cookie.split(";");
	var i=0;
	while (i < parametros.length)
 	{
	  if (parametros[i].indexOf(name) > -1)
		return unescape(parametros[i].split("=",2)[1]);
	  else  
	     i=i+1;
	}
  }
  else
  {
	return null
  }
}
// ================================
function SetCookie (name, value)
{
	var expdate = new Date ();
	expdate.setTime (expdate.getTime() + (1000 * 60 * 60 * 24 * 1000));
	document.cookie = name + "=" + escape (value) + "; expires=" + expdate.toGMTString() +  "; path=/"; 
}
// ================================
function SetCookie2 (name, value)
{
	document.cookie = name + "=" + escape (value);
}
// ================================
function DeleteCookie (name) {
	var exp = new Date();
	exp.setTime (exp.getTime() - 1);
	var cval = GetCookie (name);
	if (cval != null)
		document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}