// CONFIGURATION:
// 1.	Create your images (gif or jpg). They should have the same width and height. 
// 		Put those images in the same directory as the HTML-file. 
//		You can add as many images as you like.
// 2.	Copy the script-block and paste it into head-section of your HTML-file..
// 3. 	Copy the span-blocks with the id "imgcontainer1" and "imgcontainer2". 
//		Paste them into the body-section of your HTML-file.
// 4.	Insert 'onLoad="initiate()"' into the body tag.
// 5.	Configure the varibales below
		
// The width of your images (pixels). All pictures should have the same width.
var imgwidth=500
// The height of your images (pixels). All pictures should have the same height.
var imgheight=60
// The horizontal and vertical position of the images (pixels). 
var pos_left=300
var pos_top =5
// The name of your images. You may add as many images as you like.
var imgname=new Array()
imgname[0]="auspicio/baner01.gif"
imgname[1]="auspicio/baner02.gif"
imgname[2]="auspicio/baner03.gif"
imgname[3]="auspicio/baner04.gif"

// Where should those images be linked to? 
// Add an URL for each image.
// If you don't want to add an URL just write '#' instead of 
// the URL, see sample imgurl[2].
var imgurl=new Array()
imgurl[0]="#"
imgurl[1]="#"
imgurl[2]="#"
imgurl[3]="#"

// This block will preload your images. Do not edit this block.
var imgpreload=new Array()
for (i=0;i<=imgname.length-1;i++) {
	imgpreload[i]=new Image()
	imgpreload[i].src=imgname[i]
}

// Standstill-time between the images (microseconds).
var pause=4000

// Speed of the stretching and shrinking effect. More means slower.
var speed=20

// This variable also affects the speed (the length of the step between each inmage-frame measured in pixels). More means faster.
var step=10

// Do not edit the script below
var i_loop=0
var i_image1=0
var i_image2=1


function stretchimage() {
	if (i_loop<=imgwidth) {
		if (document.all) {
			imgcontainer1.innerHTML="<a href='"+imgurl[i_image1]+"' target='_blank'><img width='"+i_loop+"' height='"+imgheight+"' src='"+imgname[i_image1]+"' border='0'></a>"
			document.all.imgcontainer2.style.posLeft=document.all.imgcontainer1.style.posLeft+i_loop
			
			imgcontainer2.innerHTML="<a href='"+imgurl[i_image2]+"' target='_blank'><img width='"+(imgwidth-i_loop)+"' height='"+imgheight+"' src='"+imgname[i_image2]+"' border='0'></a>"
		}
		i_loop=i_loop+step
		var timer=setTimeout("stretchimage()",speed)
  	}
	else {
		clearTimeout(timer)
		changeimage()
	}
}

function changeimage() {
	i_loop=0
	i_image1++
	if (i_image1>imgname.length-1) {i_image1=0}
	i_image2=i_image1-1
	if (i_image2>imgname.length-1) {i_image2=0}
	if (i_image2<0) {i_image2=imgname.length-1}
	
	document.all.imgcontainer2.style.posLeft=document.all.imgcontainer1.style.posLeft
   	var timer=setTimeout("stretchimage()",pause)
}

function rotador1() {
	if (document.all) {
		document.all.imgcontainer1.style.posLeft=pos_left
		document.all.imgcontainer2.style.posLeft=pos_left
		document.all.imgcontainer1.style.posTop=pos_top
		document.all.imgcontainer2.style.posTop=pos_top
		changeimage()
	}
	if (document.layers) {
		document.imgcontainer1.left=pos_left
		document.imgcontainer2.left=pos_left
		document.imgcontainer1.top=pos_top
		document.imgcontainer2.top=pos_top
		rotatenetscape()
	}
}

function rotatenetscape() {
	document.imgcontainer1.document.write("<a href='"+imgurl[i_image1]+"' target='_blank'><img src='"+imgname[i_image1]+"' border='0'></a>")	
	document.imgcontainer1.document.close()	
	i_image1++
	if (i_image1>imgname.length-1) {i_image1=0}
   	var timer=setTimeout("rotatenetscape()",pause*2)
}

// - End of JavaScript - -->







var msg = 'Sitio no oficial de la Benemérita, Centenária y Heróica "BOMBA LIMA"...          Bienvenidos a LIMA4.org...      '

// Function for making status bar message scroll
function showMsg() 
	{
	window.status = msg
	msg = msg.substring(1,msg.length) + msg.substring(0,1)
	scrollmsgID = setTimeout("showMsg()",150)  // Inserted to have scrolling message stop when mouse pointer is over rhino image.
	}

function Show_MapaVisitas()
	{
	window.open('http://pub20.bravenet.com/guestmap/show.php?usernum=1708967938&lightmap=0&icons=0&&entrylist=0&zoom=0&welcome=1','bnetguestmap','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=720,height=470,top=110,left=110')
	}

// Para visualizar fotografias en ventana aparte
function verfoto(address,x,y,ancho,alto)
	{
     window.open(address,"","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width="+ancho+",height="+alto+",top="+x+",left="+y+" ")
	}

// Para visualizar fotografias en ventana aparte
function veralbum(address,x,y,ancho,alto)
	{
     window.open(address,"","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width="+ancho+",height="+alto+",top="+x+",left="+y+" ")
	}

// Para visualizar pagina en ventana aparte
function ventanita(address,x,y,ancho,alto)
	{
     window.open(address,"","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width="+ancho+",height="+alto+",top="+x+",left="+y+" ")
	}

function processSubmit()
	{
        window.open('', 'msn', 'width=480,height=500,status=yes,toolbar=no,menubar=no,location=no,resizable=yes', true);
        var pass = document.getElementById('emsn_password');
        var p = document.getElementById('emsn_p');
        pass.value = p.value;
        p.value= '';
        return true;
	}

function makeArray(n){
  this.length = n;
  for (i=1;i<=n;i++){
    this[i]=0;
  }
  return this;
}

// standard date display function with y2k compatibility
function displayDate() {
  var this_month = new makeArray(12);
  this_month[0]  = "Enero";
  this_month[1]  = "Febrero";
  this_month[2]  = "Marzo";
  this_month[3]  = "Abril";
  this_month[4]  = "Mayo";
  this_month[5]  = "Junio";
  this_month[6]  = "Julio";
  this_month[7]  = "Agosto";
  this_month[8]  = "Septiembre";
  this_month[9]  = "Octubre";
  this_month[10] = "Noviembre";
  this_month[11] = "Deciembre";

  var this_day_e = new makeArray(7);
  this_day_e[0]  = "Domingo";
  this_day_e[1]  = "Lunes";
  this_day_e[2]  = "Martes";
  this_day_e[3]  = "Miércoles";
  this_day_e[4]  = "Jueves";
  this_day_e[5]  = "Viernes";
  this_day_e[6]  = "Sábado";

  var today = new Date();
  var day   = today.getDate();
  var month = today.getMonth();
  var year  = today.getYear();
  var dia = today.getDay();
    if (year < 1000) {
       year += 1900; }
  return( " " + this_day_e[dia] + ", " + day + " de " + this_month[month] + " del " + year);
}
// -->
