// JavaScript Document

	//==========//
	// JavaScript Rollovers v1.4
	//==========//

	// ***** ROLLOVER CODE - START ***** //
	
	if (document.images) {
		var imageCache = new Array();
		var allCacheCalls = 0;
		var tempImage = new Image();
	}	

	function swapImage(names) {
		if (document.images) {
			imageList = names.split(",");
			for (i = 0 ; i < imageList.length ; i++) {
				imagePair = imageList[i].split("=");
				if (imagePair.length == 2) {
					if (document.images[imagePair[0]]) {
						document.images[imagePair[0]].src = imagePair[1];
					} 
				}
			}
		}
	}

	function cache(name) {
		if (document.images) {
			var current = imageCache.length;
			imageCache[current] = new Image();
			imageCache[current].src = name;
		}
	}

	function pageLoaded() {
		if (document.images) {
		cache("img/00_1.gif");
                cache("img/01_1.gif");
                cache("img/02_1.gif");
                cache("img/04_1.gif");
                cache("img/05_1.gif");
                cache("img/06_1.gif");
		cache("img/05_2.gif");
                cache("img/01_2.gif");
                cache("img/02_2.gif");
                cache("img/04_2.gif");
                cache("img/06_2.gif");			
		cache("img/00_03.jpg");
                cache("img/01_03.jpg");
                cache("img/02_03.jpg");
                cache("img/03_03.jpg");	
                cache("img/04_03.jpg");
                cache("img/05_03.jpg");
                cache("img/06_03.jpg");			
                cache("img/07_03.jpg");
                cache("img/08_03.jpg");
                cache("img/09_03.jpg");
                cache("img/10_03.jpg");
			
		allCacheCalls = 1;
		}
	}





// =======================================
// set the following variables
// =======================================

// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 7000
var slideShow_2Speed = 8000
var slideShow_3Speed = 7500

// Duration of crossfade (seconds)
var crossFadeDuration = 3

// Specify the image files
var Pic = new Array() // don't touch this
// to add more images, just continue
// the pattern, adding to the array below

Pic[0]  = 'img/00_1.gif'
Pic[1]	= 'img/01_1.gif'
Pic[2] 	= 'img/02_1.gif'
Pic[3]  = 'img/04_1.gif'
Pic[4]  = 'img/05_1.gif'
Pic[5]  = 'img/06_1.gif'


// Specify the image files
var Pic_2 = new Array() // don't touch this
// to add more images, just continue
// the pattern, adding to the array below

Pic_2[0]  = 'img/05_2.gif'
Pic_2[1]  = 'img/01_2.gif'
Pic_2[2]  = 'img/02_2.gif'
Pic_2[3]  = 'img/04_2.gif'
Pic_2[4]  = 'img/06_2.gif'


// Specify the image files
var Pic_3 = new Array() // don't touch this
// to add more images, just continue
// the pattern, adding to the array below

Pic_3[0]  = 'img/00_03.jpg'
Pic_3[1]  = 'img/01_03.jpg'
Pic_3[2]  = 'img/02_03.jpg'
Pic_3[3]  = 'img/03_03.jpg'
Pic_3[4]  = 'img/04_03.jpg'
Pic_3[5]  = 'img/05_03.jpg'
Pic_3[6]  = 'img/06_03.jpg'
Pic_3[7]  = 'img/07_03.jpg'
Pic_3[8]  = 'img/08_03.jpg'
Pic_3[9]  = 'img/09_03.jpg'
Pic_3[10]  = 'img/10_03.jpg'

// =======================================
// do not edit anything below this line
// =======================================

var t
var j = 0
var p = Pic.length

var preLoad = new Array()
for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = Pic[i]
}

var t_2
var j_2 = 0
var p_2 = Pic_2.length

var preLoad2 = new Array()
for (i_2 = 0; i_2 < p_2; i_2++){
   preLoad2[i_2] = new Image()
   preLoad2[i_2].src = Pic_2[i_2]
}



var t_3
var p_3 = Pic_3.length
var j_3 = aleatorio(0, p_3)

var preLoad3 = new Array()
for (i_3 = 0; i_3 < p_3; i_3++){
   preLoad3[i_3] = new Image()
   preLoad3[i_3].src = Pic_3[i_3]
}



function runSlideShow(){
   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=2)"
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow.filters.blendTrans.Apply()      
   }
   document.images.SlideShow.src = preLoad[j].src
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play()
   }
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed)
}

function runSlideShow_2(){
   if (document.all){
      document.images.SlideShow_2.style.filter="blendTrans(duration=2)"
      document.images.SlideShow_2.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow_2.filters.blendTrans.Apply()      
   }
   document.images.SlideShow_2.src = preLoad2[j_2].src
   if (document.all){
      document.images.SlideShow_2.filters.blendTrans.Play()
   }
   j_2 = j_2 + 1
   if (j_2 > (p_2-1)) j_2=0
   t_2 = setTimeout('runSlideShow_2()', slideShow_2Speed)
}

function runSlideShow_3(){
   if (document.all){
      document.images.SlideShow_3.style.filter="blendTrans(duration=2)"
      document.images.SlideShow_3.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow_3.filters.blendTrans.Apply()      
   }
   document.images.SlideShow_3.src = preLoad3[j_3].src
   if (document.all){
      document.images.SlideShow_3.filters.blendTrans.Play()
   }
   j_3 = j_3 + 1
   if (j_3 > (p_3-1)) j_3=0
   t_3 = setTimeout('runSlideShow_3()', slideShow_3Speed)
}

function aleatorio(inferior,superior){ 
    numPosibilidades = superior - inferior 
    aleat = Math.random() * numPosibilidades 
    aleat = Math.round(aleat) 
    return parseInt(inferior) + aleat 
}


//___________
