//Banner
var imageArray = new Array("imagenes/banner-adelgazar-1.jpg", "imagenes/banner-adelgazar-2.jpg", "imagenes/banner-adelgazar-1.jpg", "imagenes/banner-adelgazar-2.jpg");
var currentImage = 0;
var timerId;
function showImage() 
{
	currentImage++;
	if (currentImage > 3) currentImage = 0;
	document.images["banner"].src = imageArray[currentImage];
	timerId = setTimeout("showImage()", 4000);
}
//funcion añadir a favoritos
function anadir()
{
	if (window.external)
	{
		window.external.AddFavorite('http://www.verofit.es/','Verofit')
	}
	else
	{
		alert ("Su navegador no permite añadir a favoritos automaticamente. Si desea añadir esta página a su lista de favoritos, siga las instrucciones de su navegador.");
	}
}
function getWindowHeight() {
var windowHeight=0;
if (typeof(window.innerHeight)=='number') {
windowHeight=window.innerHeight;
}
else {
if (document.documentElement&&
document.documentElement.clientHeight) {
windowHeight=
document.documentElement.clientHeight;
}
else {
if (document.body&&document.body.clientHeight) {
windowHeight=document.body.clientHeight;
}
}
}
return windowHeight;
}
//
function abreVentana2(url, nombre,ancho, alto, scrollbars, resizable)
{
 anchoPantalla = screen.availWidth;
 altoPantalla = screen.availHeight;
 
 posX = Math.round((anchoPantalla - ancho)/2);
 posY = Math.round((altoPantalla - alto)/2);
 
 opciones = "width="+ancho+",height="+alto+",top="+posY+",left="+posX+",scrollbars="+scrollbars+",resizable="+resizable;
 
 nueva = window.open (url,nombre,opciones);
}
