// Browser Slide-Show script.
// With image cross fade effect for those browsers that support it.
// Script copyright (c) 2004-2006 www.cryer.co.uk.
// Script is free to use provided this copyright header is included.
var slideCache = new Array();
function RunSlideShow(pictureName,imageFiles,displaySecs)
{
  var imageSeparator = imageFiles.indexOf(";");
  var nextImage = imageFiles.substring(0,imageSeparator);
  if (document.all)
  {
    document.getElementById(pictureName).style.filter="blendTrans(duration=2)";
    document.getElementById(pictureName).filters.blendTrans.Apply();
  }
  document.getElementById(pictureName).src = nextImage;
  if (document.all)
  {
    document.getElementById(pictureName).filters.blendTrans.Play();
  }
  var futureImages= imageFiles.substring(imageSeparator+1,imageFiles.length)
    + ';' + nextImage;
  setTimeout("RunSlideShow('"+pictureName+"','"+futureImages+"',"+displaySecs+")",
    displaySecs*1000);
  // Cache the next image to improve performance.
  imageSeparator = futureImages.indexOf(";");
  nextImage = futureImages.substring(0,imageSeparator);
  if (slideCache[nextImage] == null) {
    slideCache[nextImage] = new Image;
    slideCache[nextImage].src = nextImage;
  }
}

var slideCacheCab = new Array();
function RunSlideShowCab(pictureName,imageFiles,displaySecs)
{
  var imageSeparator = imageFiles.indexOf(";");
  var nextImage = imageFiles.substring(0,imageSeparator);
  if (document.all)
  {
    document.getElementById(pictureName).style.filter="blendTrans(duration=2)";
    document.getElementById(pictureName).filters.blendTrans.Apply();
  }
  document.getElementById(pictureName).style.backgroundImage = "url(" + nextImage + ")";
  if (document.all)
  {
    document.getElementById(pictureName).filters.blendTrans.Play();
  }
  var futureImages= imageFiles.substring(imageSeparator+1,imageFiles.length)
    + ';' + nextImage;
  setTimeout("RunSlideShowCab('"+pictureName+"','"+futureImages+"',"+displaySecs+")",
    displaySecs*1000);
  // Cache the next image to improve performance.
  imageSeparator = futureImages.indexOf(";");
  nextImage = futureImages.substring(0,imageSeparator);
  if (slideCacheCab[nextImage] == null) {
    slideCacheCab[nextImage] = new Image;
    slideCacheCab[nextImage].src = nextImage;
  }
}


function abreventanaimpresion(archivo,ancho,alto){
		window.open(archivo,"Ventana","toolbar=no, location=0, directories=0, status=0, menubar=0, scrollbars=yes, resizable=0, copyhistory=0, width=" + ancho + ", height=" + alto);
	}
function abreventana(archivo,ancho,alto){
		window.open(archivo,"Ventana","toolbar=no, location=0, directories=0, status=0, menubar=0, scrollbars=yes, resizable=0, copyhistory=0, width=" + ancho + ", height=" + alto);
	}

function muestra(id){
if (document.getElementById){				//se obtiene el id
	var el = document.getElementById(id);	//se define la variable "el" igual a nuestro div
	el.style.display = 'block'				//damos un atributo display:none que oculta el div
	}
}

function oculta(id){
if (document.getElementById){				//se obtiene el id
	var el = document.getElementById(id);	//se define la variable "el" igual a nuestro div
	el.style.display = 'none'				//damos un atributo display:none que oculta el div
	}
}

