// 916-pag_ancha.js  v1.00 15.12.04
// Funciones de JavaScript para páginas anchas de www.bonastre.net
// Copyright (c) 2004 by Juan Rodríguez & Begues Internet s.l.

// INTERCAMBIAR TARJETAS
function Cambiar1(imgsrc) { document.getElementById("logo1").src=imgsrc; }
function Cambiar2(imgsrc) { document.getElementById("logo2").src=imgsrc; }

// ADAPTAR DIRECCION DE CORREO
arroba="@";
function GeneraIOGA() {return "correo" + arroba + "bonastre.org" }
function CorreoIOGA(asunto) {document.write("<a href='mailto:" + GeneraIOGA() + "?subject=" + asunto + " '>" + GeneraIOGA() + "</a>") }

// FUNCIONES PAGINA CURRICULUM Y DIRECTORIO
function PagAncha(pag) { 
if (navigator.userAgent.indexOf("Opera")!=-1) {ancho=window.innerWidth -10; alto=window.innerHeight}
 else {if (navigator.appName == "Netscape") {ancho=window.innerWidth -16; alto=window.innerHeight} 
   else {ancho=document.body.offsetWidth -16; alto=document.body.offsetHeight} };
AncDis=parseInt(ancho);

if (AncDis < 820) {SepFij=5; AncIzq=-10; AncCue=600; document.getElementById("Izquierda").style.visibility="hidden"; } 
   else {SepFij=22; AncIzq=20; AncCue=715};
SepVar=(AncDis -AncIzq -AncCue -165 -SepFij) / 2;
HorDoc=SepVar +AncIzq + SepFij;
HorDer=HorDoc +AncCue +SepFij;

document.getElementById("Izquierda").style.left=SepVar+"px";
document.getElementById("Cuerpo").style.width=AncCue+"px";
document.getElementById("Cuerpo").style.left=HorDoc+"px";
document.getElementById("Cuerpo").style.top=800+"px";  
document.getElementById("Cuerpo").style.visibility="visible";
document.getElementById("Derecha").style.left=HorDer+"px"; 

if (pag==1) ScrollPersonal(); else {Directorio()} }

PosAct=600; Stop=1

function ScrollPersonal() {
if (PosAct > Stop) 
  {document.getElementById("Cuerpo").style.top=PosAct+"px"; PosAct=PosAct-4; setTimeout("ScrollPersonal()",10);  } 
else PosAct=600 }

function Directorio() {
document.getElementById("Cabecera").style.width=AncCue+"px"; 
document.getElementById("Cabecera").style.left=HorDoc+"px"; 
document.getElementById("Cuerpo").style.top=80+"px"; } 


