﻿<!--
/* Buscar en esta pagina - por Juan Carlos Seltmann (jseltmann@ciudad.com.ar) */

var NS4 = (document.layers);    // que buscador?
var IE4 = (document.all);
var win = window;    // ventana a buscar.
var n   = 0;
function findInPage(str) {
var txt, i, found;
if (str == "")
return false;
// Buscar la proxima ocurrencia de la cadena en la pagina, volver al comienzo
// de la pagina si es necesario.
if (NS4) {
// Buscar conincidencia comenzando desde la posicion acutual. Si no encuentra, vuelve a la 
// primer coincidencia.
if (!win.find(str))
while(win.find(str, false, true))
n++;
else
n++;
// Si no encuentra en esta direccion, presenta el mensaje.
if (n == 0)
alert("No encontrado.");
}
if (IE4) {
txt = win.document.body.createTextRange();
// Buscar la proxima conincidencia hacia arriba.
for (i = 0; i <= n && (found = txt.findText(str)) != false; i++) {
txt.moveStart("character", 1);
txt.moveEnd("textedit");
}
// Si encuentra, marca y conduce hacia la cadena encontrada.
if (found) {
txt.moveStart("character", -1);
txt.findText(str);
txt.select();
txt.scrollIntoView();
  n++;
  }
// si no encuentra, comienza desde arriba y busca la proxima coincidencia.

else {
if (n> 0) {
n = 0;
findInPage(str);
}
// Si no encuentra en ninguna parte, presenta el mensaje.
else
alert("No encontrado.");
}
}
return false;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//Comienza Ticker
addEvent(window, "load", init);

function init() {
	if (document.getElementById) {
		tck = document.getElementById("ticker");
		if (tck.getElementsByTagName("div").length> 0) {
			actual = 0;
			step = 2;
			speed = 15;
			delay = 1000;
			news = new Array();
			// build an array of news - eg every seperate div provided in the div with
			// id = "all". 
			for (i = 0; i < tck.getElementsByTagName("div").length; i++) {
				news[i] = tck.getElementsByTagName("div")[i];
				news[i].style.left = tck.offsetWidth;
			}
			// start the news rolling ....
			rollNews();
			// add listeners for when mouse goes over tck to stop and when it leaves 
			// tck to start again
			addEvent(tck, "mouseover", stopNews);
			addEvent(tck, "mouseout", rollNews);
		}
	}
}

function rollNews() {
	// move left edge to left a bit
	news[actual].style.left = parseInt(news[actual].style.left) - step + "px";
	
	if (parseInt(news[actual].style.left) == tck.offsetWidth % step) {
		// if that movement hasnt taken us off the edge of the div then wait
		// a bit and move it again.
		tick = setTimeout("rollNews()",delay);
	}
	else {
		// if it has taken us over the edge then move to the next item in news array
		if (parseInt(news[actual].style.left) <= 0-news[actual].offsetWidth) {
			actual++;
			// if at end of array then knock it back to start
			if (actual == news.length) {actual = 0;}
			news[actual].style.left = tck.offsetWidth;
		}
		// wait a bit and try again.
		tick = setTimeout("rollNews()",speed);
	}
}

function stopNews() {
	clearTimeout(tick);
}

function addEvent(obj, evType, fn){
  if (obj.addEventListener){
    obj.addEventListener(evType, fn, true);
    return true;
  } else if (obj.attachEvent){
	var r = obj.attachEvent("on"+evType, fn);
    return r;
  } else {
	return false;
  }
}
//fin Ticker
var winheight=350;
var winwidth=750;
var pop=null;
step=1;
function popswindows(url,name,width,height) 
{
if (!document.all)
 {
  if (!document.layers)
   {
    paramstp="height="+height+",width="+width+",top=20"+
    ",left=20,scrollbars=no,location=no"+
    ",directories=no,status=no,menubar=no,toolbar=no,resizable=no"
    pop=window.open(url,name,paramstp);
    if (pop.focus){pop.focus();}
    return;
    }
   else
   {
    LeftPosition=(screen.width)?(screen.width-width)/2:100;
    TopPosition=(screen.height)?(screen.height-height)/2:100;
    paramstp="height="+height+",width="+width+",top="+TopPosition+
    ",left="+LeftPosition+",scrollbars=no,location=no"+
    ",directories=no,status=no,menubar=no,toolbar=no,resizable=no"
    pop=window.open(url,name,paramstp);
    loadpos=height/2-40
        if(pop.focus){pop.focus();} 
    return;
   } 
 } 
   LeftPosition=(screen.width)?(screen.width-width)/2:100;
  TopPosition=(screen.height)?(screen.height-height)/2:100;
  paramstp="height="+winheight+",width="+winwidth+",top="+TopPosition+
  ",left="+LeftPosition+",scrollbars=no,location=no"+
  ",directories=no,status=no,menubar=no,toolbar=no,resizable=no"
  pop=window.open(url,name,paramstp);
 x = y = step
var z = 1;

while (z < 40) {
pop.resizeBy (x, y)
z++;
}
 if(pop.focus){pop.focus();} 
}

//Para los menus de navegación rápida e idiomas
function irA(menu){window.location.href = menu.options[menu.selectedIndex].value;}

//seleccion de buscador
function buscaren()
{
ingreso = new String()

ingreso = this.formulario.q.value
if (ingreso.length == 0)
{ alert("Por favor ingrese una palabra para comenzar la búsqueda.")
return false
}

ingreso = this.formulario.buscador.value
if (ingreso.match("aca"))
{ findInPage(this.formulario.q.value) 
return false
}
if (ingreso.match("e-ventos"))
{ this.formulario.searWords.value = this.formulario.q.value 
formulario.action = "search.php"
return true
}
if (ingreso.match("sitio"))
{ this.formulario.sitesearch.value = "www.e-ventoslink.com.ar" 
formulario.action = "search-google.php"
return true
}
if (ingreso.match("google"))
{ this.formulario.sitesearch.value = "" 
formulario.action = "search-google.php"
return true
}
return true
}
//fin seleccion de buscador

//Tamaño de fuente
function zoomText(tipo){
	//inicializaciones
	obj=document.getElementById("HotelsHotelGuideHotels");
	if (obj.style.fontSize==""){
		obj.style.fontSize="100%";
	}
	actual=parseInt(obj.style.fontSize);
	incremento=20;
	
	//operacion
	if(tipo=="normal"){
		obj.style.fontSize="100%"
	}
	if(tipo=="aumentar"){
		valor=actual+incremento;
		obj.style.fontSize=valor+"%"
	}
	if(tipo=="disminuir"){
		valor=actual-incremento;
		obj.style.fontSize=valor+"%"
	}
}

//fin tamaño fuente
//Funcion nieve
/**var snowsrc="http://www.e-ventoslink.com.ar/imagenes/snow.gif"
// Configure below to change number of snow to render
var no = 10;

var ns4up = (document.layers) ? 1 : 0; // browser sniffer
var ie4up = (document.all) ? 1 : 0;
var ns6up = (document.getElementById&&!document.all) ? 1 : 0;

var dx, xp, yp; // coordinate and position variables
var am, stx, sty; // amplitude and step variables
var i, doc_width = 800, doc_height = 600;

if (ns4up||ns6up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}

dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();

for (i = 0; i < no; ++ i) {
dx[i] = 0; // set coordinate variables
xp[i] = Math.random()*(doc_width-50); // set position variables
yp[i] = Math.random()*doc_height;
am[i] = Math.random()*20; // set amplitude variables
stx[i] = 0.02 + Math.random()/10; // set step variables
sty[i] = 0.7 + Math.random(); // set step variables
if (ns4up) { // set layers
if (i == 0) {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src='"+snowsrc+"' border=\"0\"><\/layer>");
} else {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src='"+snowsrc+"' border=\"0\"><\/layer>");
}
} else if (ie4up||ns6up) {
if (i == 0) {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+snowsrc+"' border=\"0\"><\/div>");
} else {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+snowsrc+"' border=\"0\"><\/div>");
}
}
}

function snowNS() { // Netscape main animation function
for (i = 0; i < no; ++ i) { // iterate for every dot
yp[i] += sty[i];
if (yp[i] > doc_height-50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
dx[i] += stx[i];
document.layers["dot"+i].top = yp[i];
document.layers["dot"+i].left = xp[i] + am[i]*Math.sin(dx[i]);
}
setTimeout("snowNS()", 10);
}

function snowIE_NS6() { // IE and NS6 main animation function
for (i = 0; i < no; ++ i) { // iterate for every dot
yp[i] += sty[i];
if (yp[i] > doc_height-50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = ns6up?window.innerWidth : document.body.clientWidth;
doc_height = ns6up?window.innerHeight : document.body.clientHeight;
}
dx[i] += stx[i];
if (ie4up){
document.all["dot"+i].style.pixelTop = yp[i];
document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]);
}
else if (ns6up){
document.getElementById("dot"+i).style.top=yp[i];
document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i]);
}
}
setTimeout("snowIE_NS6()", 10);
}

if (ns4up) {
snowNS();
} else if (ie4up||ns6up) {
snowIE_NS6();
}
//fin efecto nieve**/
