// JavaScript Document
	function activaenlace(idenla){
	var enlace=document.getElementById(idenla);
	TB_ShowObj(enlace);
	}

function JSF(url){
	if(url=="#"){alert("Muy pronto podras visitar esta seccion")}
	
	}

function MM_changeProp(objId,x,theProp,theValue) { //v9.0
  var obj = null; with (document){ if (getElementById)
  obj = getElementById(objId); }
  if (obj){
    if (theValue == true || theValue == false)
      eval("obj.style."+theProp+"="+theValue);
    else eval("obj.style."+theProp+"='"+theValue+"'");
  }
}


function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function Comprueba_firef2(){
if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){ //test for Firefox/x.x or Firefox x.x (ignoring remaining digits);
 var ffversion=new Number(RegExp.$1) // capture x.x portion and store as a number
 if (ffversion<3){
  alert("Estimado visitante. Para navegar y ver nuestra web correctamente deberias \n\n\n 1) Actualizarte a la version 3.0 o superior de Mozilla Firefox \n\n 2) O utilizar Internet Explorer 6.0 o superior")
}
}
}








//TOOLTIP

var tooltip=function(){
	var id = 'tt';
	var top = -10;
	var left = 10;
	var maxw = 300;
	var speed = 10;
	var timer = 50;
	var endalpha = 85;
	var alpha = 0;
	var tt,t,c,b,h;
	var ie = document.all ? true : false;
	return{
		show:function(v,w){
			if(tt == null){
				tt = document.createElement('div');
				tt.setAttribute('id',id);
				t = document.createElement('div');
				t.setAttribute('id',id + 'top');
				c = document.createElement('div');
				c.setAttribute('id',id + 'cont');
				b = document.createElement('div');
				b.setAttribute('id',id + 'bot');
				tt.appendChild(t);
				tt.appendChild(c);
				tt.appendChild(b);
				document.body.appendChild(tt);
				tt.style.opacity = 0;
				tt.style.filter = 'alpha(opacity=0)';

				document.onmousemove = this.pos;
			}
			tt.style.display = 'block';
			c.innerHTML = v;
			tt.style.width = w ? w + 'px' : 'auto';
			if(!w && ie){
				t.style.display = 'none';
				b.style.display = 'none';
				tt.style.width = tt.offsetWidth;
				t.style.display = 'block';
				b.style.display = 'block';
			}
			if(tt.offsetWidth > maxw){tt.style.width = maxw + 'px'}
			h = parseInt(tt.offsetHeight) + top;
			clearInterval(tt.timer);
			tt.timer = setInterval(function(){tooltip.fade(1)},timer);
		},
		pos:function(e){
			var u = ie ? event.clientY + document.documentElement.scrollTop : e.pageY;
			var l = ie ? event.clientX + document.documentElement.scrollLeft : e.pageX;
			tt.style.top = (u - h) + 'px';
			tt.style.left = (l + left) + 'px';
		},
		fade:function(d){
			var a = alpha;
			if((a != endalpha && d == 1) || (a != 0 && d == -1)){
				var i = speed;
				if(endalpha - a < speed && d == 1){
					i = endalpha - a;
				}else if(alpha < speed && d == -1){
					i = a;
				}
				alpha = a + (i * d);
				tt.style.opacity = alpha * .01;
				tt.style.filter = 'alpha(opacity=' + alpha + ')';
			}else{
				clearInterval(tt.timer);
				if(d == -1){tt.style.display = 'none'}
			}
		},
		hide:function(){
			clearInterval(tt.timer);
			tt.timer = setInterval(function(){tooltip.fade(-1)},timer);
		}
	};
}();





function validaform_es(){
			missinfo="";
			if (document.form_es.email.value=="Tu email"){ 
			missinfo += "\n     - Email ";
			}
			if (document.form_es.Telefono.value=="Tu telefono"){ 
			missinfo += "\n     - Telefono ";
			}
			if (document.form_es.Nombre.value=="Tu nombre"){ 
			missinfo += "\n     - Nombre";
			}
			if (document.form_es.Interes.options[0].selected || document.form_es.Interes.options[1].selected ){ 
			missinfo += "\n     - Interes";
			}

			if (missinfo !=""){
			missinfo= "__________________________\n" +
			"Debe rellenar los siguientes campos \n" + 
			missinfo + "\n__________________________" +
			"\nPor favor intentelo de nuevo";
			alert(missinfo);
			return false;
			}
			else{
			document.form_es.submit();
			}
			}			




