// JavaScript Document

 var posy_0=0;
 var posy_1=0;
 var inc=102;
 var tam_1=0;
 var parar=true;
 var id = "";
 
 isIE=document.all;
 isNN=!document.all&&document.getElementById;
 isN4=document.layers;
 isHot=false;
 
 
function tapar(){
 if (document.getElementById){
  document.getElementById('dialogmask').style.height = document.getElementById('content').offsetHeight + 19 + 'px';
 }
}
 
function loadImages() {
   if (document.getElementById) { // DOM3 = IE5, NS6
   document.getElementById('dialogmask').style.visibility = 'hidden';
}
 else {
 if (document.layers) { // Netscape 4
 document.dialogmask.visibility = 'hidden';
 }
  else { // IE 4
   document.all.dialogmask.style.visibility = 'hidden';
  }
 }
}

function menos_99(){
  if(!parar && posy_0>-tam_1)
					{
						posy_0-=10;
						document.getElementById(id).style.marginTop=posy_0+'px';
						setTimeout("menos_99()",40);
					}	
}

function mas_99(){
  if(!parar && posy_0<0)
					{
						posy_0+=10;
						document.getElementById(id).style.marginTop=posy_0+'px';
						setTimeout("mas_99()",40);
					}	
}

function ancho_lista(id,altura){
 document.getElementById(id).style.height = altura + 'px';
 tam_1 = altura-577;
}

function scroll_ima(id_o,ruta,parar_o){
	
 id = id_o; 
 parar = parar_o;	
	
 if (document.getElementById){

 document.getElementById(id).style.marginTop=posy_0+'px';

//derecha
  if (ruta=='b') menos_99();

  //izquierda
  if (ruta=='s') mas_99();
 }
 
}

function ajustar(){
 var arrayPageSize = getPageSize();
 var arrayPageScroll = getPageScroll();
 document.getElementById('fade').style.width=arrayPageSize[2];
 document.getElementById('fade').style.height=arrayPageSize[3];
}

function mostrar2(capa,capa2){
  var obj = document.getElementById(capa);
  var obj2 = document.getElementById(capa2);
  if(obj.style.display == "block") {
	                                obj.style.display = "none";
									obj2.style.paddingBottom = "15px";
								   }
  else {
	    obj.style.display = "block";
		obj2.style.paddingBottom = "1px";		
	   }
}

function showLightbox() {
    document.getElementById('over').style.display='block';
    document.getElementById('fade').style.display='block';
}
function hideLightbox() {
    document.getElementById('over').style.display='none';
    document.getElementById('fade').style.display='none';
} 

function abrir(direccion){ 
  window.open(direccion,'','width=1165,height=470,left=0,location=no,statusbar=no,toolbar=no,scrollbars=no,navbar=no,menubar=no,resizable=no'); 
}