<!-- RECUADRO IMAGENES -->
function CambiarColorBorde(Imagen, Color) {
   if( document.all || document.getElementById )
     Imagen.style.borderColor = Color;
   }
  
<!-- FIN RECUADRO IMAGENES -->  

<!--  DESHABILITAR BOTÓN DERECHO (SESHABILITADO)
/*
function derecha(e) {
if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)){
alert('La Casa Zagala de Candelario')
return false;
}

else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2)){
alert('La Casa Zagala de Candelario')
}
}
document.onmousedown=derecha
*/
<!-- FIN DESHABILITAR BOTÓN DERECHO -->

<!--  DESHABILITAR OPCIÓN DE SEÑALAR ALGO CON RATÓN (SESHABILITADO)-->

function event_false() {
         window.event.returnValue = false
   }

document.onselectstart = event_false


<!-- FIN DESHABILITAR OPCIÓN DE SEÑALAR ALGO CON RATÓN  -->

<!-- FECHA -->

function Fecha(){
	dias = new Array("Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado");
	meses = new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre");
	hoy = new Date();
	d = hoy.getDate(); // dia actual del mes
	dia_actual = hoy.getDay(); // orden del día de la semana comenzando desde el domingo
	mes_actual = hoy.getMonth();
	anyo_actual = hoy.getYear();
	document.write(dias[dia_actual]+", "+d+" de "+meses[mes_actual]+" de "+anyo_actual);
} // Fin función Fecha

<!--FIN FECHA-->

<!--IMÁGENES ALEATORIAS-->

function randomImagenes(max) {
    var rNum=NaN
    while (isNaN(rNum)) {
      rNum=Math.floor(Math.random()*(max))
    }
    return rNum
  }
  var ruta = "imagenes/"
  var pic = new Array()
    pic[0]= ruta +"bienvenido_ini_1.jpg"
    pic[1]= ruta +"bienvenido_ini_2.jpg"
    pic[2]= ruta +"bienvenido_ini_3.jpg"
    pic[3]= ruta +"bienvenido_ini_5.jpg"
/*	pic[4]= ruta +"bienvenido_ini_4.jpg"
    pic[5]= ruta +"bienvenido_ini_6.jpg"
    pic[6]= ruta +"bienvenido_ini_7.jpg"
    pic[7]= ruta +"bienvenido_ini_8.jpg"
    pic[8]= ruta +"bienvenido_ini_9.jpg"
*/
<!--FIN IMÁGENES ALEATORIAS-->

<!-- BANNER EN ETIQUETA-->

var t1="La Casa Zagala de Candelario les da la bienvenida a su web -- E-mail: casazagala@casazagala.com   "
var t2="                                                   "
var Texto= t1+t2;
var Retardo=150;

function Banner()
  {
   while (Texto.length < 200)
   Texto += t2 + Texto;
   window.status = Texto;
   Texto = Texto.substring(1, Texto.length) + Texto.charAt(0);
   window.setTimeout("Banner()",Retardo);
}<!--FIN BANNER EN ETIQUETA-->



<!-- ********************** OLA DE TEXTO ***********************************-->     
message="CASA RURAL - 'CASA ZAGALA DE CANDELARIO'"

ns6switch=1 //animate text in NS6? (0 will turn it off)

var ns6=document.getElementById&&!document.all
mes=new Array();
mes[0]=-1;
mes[1]=-4;
mes[2]=-7;mes[3]=-10;
mes[4]=-7;
mes[5]=-4;
mes[6]=-1;
num=0;
num2=0;
txt="";
function jump0(){
	if (ns6&&!ns6switch){
	jump.innerHTML=message
	return
}
	if(message.length > 6){
		for(i=0; i != message.length;i++){
			txt=txt+"<span style='position:relative;' id='n"+i+"'>"+message.charAt(i)+"</span>"
		};
		jump.innerHTML=txt;
		txt="";
		jump1a()
	}else{
		alert("Tu mensaje es muy corto.")
	}
}

function jump1a(){
	nfinal=(document.getElementById)? document.getElementById("n0") : document.all.n0
	nfinal.style.left=-num2;
	
	if(num2 != 9){
		num2=num2+3;
		setTimeout("jump1a()",50)
	}else{
		jump1b()
	}
}

function jump1b(){
	nfinal.style.left=-num2;
	if(num2 != 0){
		num2=num2-3;
		setTimeout("jump1b()",50)
	}else{
		jump2()
	}
}

function jump2(){
	txt="";
	for(i=0;i != message.length;i++){
		if(i+num > -10 && i+num < 7){
			txt=txt+"<span style='position:relative;top:"+mes[i+num]+"'>"+message.charAt(i)+"</span>"
		}else{
			txt=txt+"<span>"+message.charAt(i)+"</span>"}
		}
	jump.innerHTML=txt;
	txt="";
	if(num != (-message.length)){
		num--;
		setTimeout("jump2()",50)
	}else{
		num=0;
		setTimeout("jump0()",50)
	}
}
<!-- ********************** FIN OLA DE TEXTO ***********************************-->

<!-- ********************** FADE EN FOTOS ***********************************-->     

function high(which2)
{
theobject=which2;
highlighting=setInterval("highlightit(theobject)",50);
	
}
function low(which2)
{
clearInterval(highlighting);
which2.filters.alpha.opacity=50;
}
function highlightit(cur2)
{
if(cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=5
else if(window.highlighting)
clearInterval(highlighting)
}
<!-- ********************** FIN FADE EN FOTOS ***********************************-->

<!-- ********************** CARGAR FOTOS EN OTRA VENTANA ***********************************-->
function MM_openBrWindow(theURL,winName,features) { //v2.0 
    window.open(theURL,winName,features); 
} 

function CargarFoto(img,ancho,alto){
  derecha=(screen.width-ancho)/2;
  arriba=(screen.height-alto)/2;
  string="toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width="+ancho+",height="+alto+",left="+derecha+",top="+arriba+"";
  fin=window.open(img,"",string);
}

function mostrarimagen(url_imagen,titulo){
 	var img = new Image();
 	img.src = url_imagen;
	win=window.open('','','width='+img.width+',height='+img.height+',scrollbars=no,resizable=1,toolbar=0');
	win.document.write ('<html>\n');
	win.document.write (' <head>\n');
	win.document.write ('  <title>'+titulo+'</title>\n');
	win.document.write (' </head>\n');
	win.document.write (' <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">\n');
	win.document.write ('  <img src="' + url_imagen + '" height='+img.height+' width='+img.width+'>\n');
	win.document.write (' </body>\n');
	win.document.write ('</html>\n');	
}

<!-- ********************** FIN CARGAR FOTOS EN OTRA VENTANA********************************-->

<!-- ********************** AGREGAR A FAVORITOS ********************************-->

function agregarfavoritos(){
window.external.addFavorite('http://www.casazagala.com','La Casa Zagala de Candelario')
}

<!-- ********************** FIN AGREGAR A FAVORITOS *****************************-->


// Abrir ventana de acceso
function abrir(){
  var ancho   = 500;
  var alto    = 120;
  var derecha = 100;
  var arriba  = 100;
  var string = "toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width="+ancho+",height="+alto+",left="+derecha+",top="+arriba+"";
  
  window.open("acceso.htm","",string)
}
