<!--
var bLoad1 = 1
var bLoad2 = 0
var bLoad3 = 0

var HojaAux = 1;

var Book_Div,Zoom_Div;
var iL=0, iR=1, iW=0;
var Speed_Plip = 20;

/*--------------------------------------------------------------------------------------------------------*/
function fVerifCarga(){
	if(bLoad1 && bLoad2 && bLoad3){
		fIniciar();
		
		cuerpomedio.document.getElementById('Msg').style.display='none';
		cuerpomedio.document.getElementById('Book').style.display='';
		
		cuerpomedio.document.getElementById("Msg").display='none';
		cuerpomedio.document.getElementById("Book").style.display='';
		
		if(document.location.href.indexOf('?p=')>0){
			var p = parseInt(document.location.href.substr(document.location.href.indexOf('?p=')+3, 2));
			
			preview.fPaginar(p, p+1);
		}
	}
	else{
		setTimeout('fVerifCarga()', 500);
	}
}
/*--------------------------------------------------------------------------------------------------------*/
function fSetear(){
	cuerpomedio.B_L1.style.zIndex=cuerpomedio.B_R1.style.zIndex=1;
	cuerpomedio.B_L2.style.zIndex=cuerpomedio.B_R2.style.zIndex=0;
	
	cuerpomedio.B_L1.style.left=cuerpomedio.B_L2.style.left="0px";
	cuerpomedio.B_R1.style.left=cuerpomedio.B_R2.style.left=cuerpomedio.Book_Image_Width+"px";
	
	cuerpomedio.B_L1.style.width=cuerpomedio.B_L2.style.width=cuerpomedio.B_R1.style.width=cuerpomedio.B_R2.style.width=cuerpomedio.Book_Image_Width+"px";
	
	if(Book_Div){
		Book_Div.style.display=''; 
		Zoom_Div.style.display='none';
	}
}
/*--------------------------------------------------------------------------------------------------------*/
function fIniciar(){
	if(document.getElementById){
		Book_Div = cuerpomedio.document.getElementById("Book");
		Zoom_Div = cuerpomedio.document.getElementById("Zoom");
		
		fSetear();
	}
}
/*--------------------------------------------------------------------------------------------------------*/
function fL2(){
	iW+=50;
	if(iW>cuerpomedio.Book_Image_Width)
		iW=cuerpomedio.Book_Image_Width;

	cuerpomedio.B_L2.style.left = cuerpomedio.Book_Image_Width-iW;
	cuerpomedio.B_L2.style.width = iW;
	cuerpomedio.B_L1.style.zIndex=0; cuerpomedio.B_L2.style.zIndex=1;
	
	if(iW<cuerpomedio.Book_Image_Width)
		setTimeout("fL2()", Speed_Plip)
	else{
		cuerpomedio.B_L1.src=cuerpomedio.B_L2.src;
		cuerpomedio.B_R1.src=cuerpomedio.B_R2.src;
	}
}
/*--------------------------------------------------------------------------------------------------------*/
function fR1(){
	if(iW==0) 
		iW=cuerpomedio.Book_Image_Width;

	iW-=50;
	if(iW<0)
		iW=0;

	cuerpomedio.B_R1.style.left = cuerpomedio.Book_Image_Width;
	cuerpomedio.B_R1.style.width = iW;
	
	if(iW>0)
		setTimeout("fR1()", Speed_Plip)
	else
		fL2();
}
/*--------------------------------------------------------------------------------------------------------*/
function fR2(){
	iW+=50;
	if(iW>cuerpomedio.Book_Image_Width)
		iW=cuerpomedio.Book_Image_Width;

	cuerpomedio.B_R2.style.left = cuerpomedio.Book_Image_Width;
	cuerpomedio.B_R2.style.width = iW;
	cuerpomedio.B_R1.style.zIndex=0; cuerpomedio.B_R2.style.zIndex=1;
	
	if(iW<cuerpomedio.Book_Image_Width)
		setTimeout("fR2()", Speed_Plip)
	else{
		cuerpomedio.B_L1.src=cuerpomedio.B_L2.src;
		cuerpomedio.B_R1.src=cuerpomedio.B_R2.src;
	}
}
/*--------------------------------------------------------------------------------------------------------*/
function fL1(){
	if(iW==0) 
		iW=cuerpomedio.Book_Image_Width;

	iW-=50;
	if(iW<0)
		iW=0;

	cuerpomedio.B_L1.style.left = cuerpomedio.Book_Image_Width-iW;
	cuerpomedio.B_L1.style.width = iW;
	
	if(iW>0)
		setTimeout("fL1()", Speed_Plip)
	else
		fR2();
}
/*--------------------------------------------------------------------------------------------------------*/
function fSiguiente(){
	if(bLoad1 && bLoad2 && bLoad3){
		fZoom2();
	
		if(iL==cuerpomedio.Book_Image_Sources.length-2){
			iL=-2; iR=-1;
		}
	
		if(iL==-2){
			document.getElementById('imgZoom1').style.display='none';
			document.getElementById('imgPrint1').style.display='none';
		}
		else{
			document.getElementById('imgZoom1').src='../images/Zoom.gif';
			document.getElementById('lnkZoom1').href='javascript:fZoom(1)';
			document.getElementById('imgZoom1').style.display='';
			document.getElementById('imgPrint1').style.display='';
		}
		if(iL==cuerpomedio.Book_Image_Sources.length-4){
			document.getElementById('imgZoom2').style.display='none';
			document.getElementById('imgPrint2').style.display='none';
		}
		else{
			document.getElementById('imgZoom2').src='../images/Zoom.gif';
			document.getElementById('lnkZoom2').href='javascript:fZoom(2)';
			document.getElementById('imgZoom2').style.display='';
			document.getElementById('imgPrint2').style.display='';
		}

		fSetear();
	
		cuerpomedio.B_L2.src = cuerpomedio.B_Pre_Img[iL+2].src;
		cuerpomedio.B_R2.src = cuerpomedio.B_Pre_Img[iR+2].src;
		fR1();
		iL=iL+2; iR=iR+2;
	
		cuerpomedio.B_L2.useMap = '#mapa_' + String(iL);
		cuerpomedio.B_R2.useMap = '#mapa_' + String(iR);
		
		preview.fClick(iL);
	}
}
/*--------------------------------------------------------------------------------------------------------*/
function fAnterior(){
	if(bLoad1 && bLoad2 && bLoad3){
		fZoom2();
	
		if(iL==0){
			iL=cuerpomedio.Book_Image_Sources.length; iR=cuerpomedio.Book_Image_Sources.length+1;
		}
	
		if(iL==2){
			document.getElementById('imgZoom1').style.display='none';
			document.getElementById('imgPrint1').style.display='none';
		}
		else{
			document.getElementById('imgZoom1').src='../images/Zoom.gif';
			document.getElementById('lnkZoom1').href='javascript:fZoom(1)';
			document.getElementById('imgZoom1').style.display='';
			document.getElementById('imgPrint1').style.display='';
		}
		if(iL==cuerpomedio.Book_Image_Sources.length){
			document.getElementById('imgZoom2').style.display='none';
			document.getElementById('imgPrint2').style.display='none';
		}
		else{
			document.getElementById('imgZoom2').src='../images/Zoom.gif';
			document.getElementById('lnkZoom2').href='javascript:fZoom(2)';
			document.getElementById('imgZoom2').style.display='';
			document.getElementById('imgPrint2').style.display='';
		}
	
		fSetear();
	
		cuerpomedio.B_L2.src = cuerpomedio.B_Pre_Img[iL-2].src;
		cuerpomedio.B_R2.src = cuerpomedio.B_Pre_Img[iR-2].src;
		fL1();
		iL=iL-2; iR=iR-2;
	
		cuerpomedio.B_L2.useMap = '#mapa_' + String(iL);
		cuerpomedio.B_R2.useMap = '#mapa_' + String(iR);
		
		preview.fClick(iL);
	}
}
/*--------------------------------------------------------------------------------------------------------*/
function makevisible(cur,which){
	strength=(which==0)? 0.2 : 1
	
	if (cur.style.MozOpacity)
		cur.style.MozOpacity=strength
	else if (cur.filters)
		cur.filters.alpha.opacity=strength*100
}
/*--------------------------------------------------------------------------------------------------------*/
function fZoom2(){
	if(bLoad1 && bLoad2 && bLoad3){
		if(Book_Div){
			Book_Div.style.display=''; 
			Zoom_Div.style.display='none';
		}
	
		if(iL!=0){
			document.getElementById('imgZoom1').src='../images/Zoom.gif';
			document.getElementById('imgZoom1').style.display='';
			document.getElementById('lnkZoom1').href='javascript:fZoom(1)';
			document.getElementById('imgPrint1').style.display='';
		}
		if(iL!=cuerpomedio.Book_Image_Sources.length-2){
			document.getElementById('imgZoom2').src='../images/Zoom.gif';
			document.getElementById('imgZoom2').style.display='';
			document.getElementById('lnkZoom2').href='javascript:fZoom(2)';
			document.getElementById('imgPrint2').style.display='';
		}
	
		cuerpomedio.B_Z0.src = '../images/px.gif';
	}
}
/*--------------------------------------------------------------------------------------------------------*/
function fZoom(sw){
	if(bLoad1 && bLoad2 && bLoad3){
		if(sw==1){
			cuerpomedio.B_Z0.src = 'Fd/' + String(iL) + '.jpg';
			
			document.getElementById('imgZoom1').src='../images/Zoom2.gif';
			document.getElementById('imgZoom2').style.display='none';
			document.getElementById('imgPrint2').style.display='none';
			document.getElementById('lnkZoom1').href='javascript:fZoom2()';
		}
		else{
			cuerpomedio.B_Z0.src = 'Fd/' + String(iR) + '.jpg';
			if(Book_Div){
				Book_Div.style.display='none'; 
				Zoom_Div.style.display='';
			}
			
			document.getElementById('imgZoom2').src='../images/Zoom2.gif';
			document.getElementById('imgZoom1').style.display='none';
			document.getElementById('imgPrint1').style.display='none';
			document.getElementById('lnkZoom2').href='javascript:fZoom2()';
		}
	
		if(Book_Div){
			Book_Div.style.display='none'; 
			Zoom_Div.style.display='';
		}
	}
}
/*--------------------------------------------------------------------------------------------------------*/
function fImprimir(sw){
	if(bLoad1 && bLoad2 && bLoad3){
		if(sw==1)
			window.open('imprimir1.htm', 'Imprimir', 'width=705, height=1005, left=10, top=10');
		else
			window.open('imprimir2.htm', 'Imprimir', 'width=705, height=1005, left=10, top=10');
	}
}
/*--------------------------------------------------------------------------------------------------------*/
if(document.captureEvents){
 document.captureEvents( Event.KEYDOWN );
}
document.onkeydown = alertkey;

if(document.captureEvents){
 if(Event.KEYDOWN){
   document.captureEvents(Event.KEYDOWN);
 }
}
document.onkeydown = alertkey;
/*--------------------------------------------------------------------------------------------------------*/
function alertkey(e) {
 if(!e){
  if(window.event){
   e = window.event;
  }
  else{
   return;
  }
 }
 if(typeof(e.which)=='number'){
  e = e.which;
 }
 else if(typeof(e.keyCode)=='number'){
  e = e.keyCode;
 }
 else if(typeof(e.charCode)=='number'){
  e = e.charCode;
 }
 else{
  return;
 }
 if (e==37) 
		fAnterior();
	if (e==39) 
		fSiguiente();
	if(e!=37 && e!=38 && e!=39 && e!=40 && e!=27){
	  return false;
	}
}

//-->