	function cambio_tarifa(id,url)
	{
		var t = document.getElementById('videorun');
		var r = document.getElementById('soporte');
		
		if (id == 'videorun') {
			t.className = "active";
			r.className = "";
		}else{
			t.className = "";
			r.className = "active";
		}
		document.getElementById('iframe_tarifas').src = url;
	}
	function abrevrun()
	{
		popup = window.open('vrdemo.html','popup',' width=600,height=600,left=15,top=15,resizable=no,scrollbars=yes,status=no,toolbar=no');
		popup.focus();
	}
	
	function abrevrun2()
	{
		popup = window.open('vrdemo2.html','popup',' width=600,height=650,left=15,top=15,resizable=no,scrollbars=yes,status=no,toolbar=no');
		popup.focus();
	}
	
	function abrepim()
	{
		popup = window.open('pimdemo.html','popup',' width=600,height=500,left=15,top=15,resizable=no,scrollbars=no,status=no,toolbar=no');
		popup.focus();
	}
	function soporte(){
	popup = window.open('conecta.html','popup',' width=415,height=450,left=100,top=100,resizable=no,scrollbars=yes,status=no,toolbar=no');
	popup.focus();
	}
	function abre()
	{
		myWindow=window.open('http://www.enginesoft.com/privacidad.html','windowRef','width=500,height=500,left=10,top=10,status=no,scrollbars=yes');
	}
	
	function abre2()
	{
		myWindow=window.open('http://www.enginesoft.com/registro.html','windowRef','width=500,height=500,left=10,top=10,status=no,scrollbars=yes');
	}
	
	function abre3()
	{
		popup = window.open('conecta.html','popup',' width=400,height=600,left=15,top=15,resizable=no,scrollbars=no,status=no,toolbar=no');
		popup.focus();
	}
	
	function descarga()
	{
		popup = window.open('demoE.html','popup',' width=600,height=600,left=15,top=15,resizable=no,scrollbars=no,status=no,toolbar=no');
		popup.focus();
	}
	
	function abre4()
	{
   		myWindow=window.open('otrascaracteristicas.asp','windowRef','width=530,height=550,left=10,top=10,status=no,scrollbars=yes');
	}

	function abreflash(src,wi,he)
	{
		document.write('<oject type="application/x-shockwave-flash" data="' + src + '" width="' + wi + '" height="' + he + '">');
		document.write('<param name="movie" value="' + src + '">');
		document.write('<param name="quality" value="high">');
		document.write('<param name="wmode" value="transparent">');
		document.write('<embed src="/' + src + '" width="' + wi + '" height="' + he + '" quality="high" wmode="transparent"  pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>');
	}

	$(document).ready(function()
	{
		$('a[@rel*=lightbox]').lightBox(); // Activamos pluguin lightbox para los enlaces con el rel='lightbox'
		$('#nav').droppy();
	});

	function volver()
	{
		history.back();
	}

	function emailCheck (emailStr)
	{
		var emailPat=/^(.+)@(.+)$/
		var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
		var validChars="\[^\\s" + specialChars + "\]"
		var quotedUser="(\"[^\"]*\")"
		var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
		var atom=validChars + '+'
		var word="(" + atom + "|" + quotedUser + ")"
		var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
		var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")
		var matchArray=emailStr.match(emailPat)
		
		if (matchArray==null)
		{
			return false
		}
		
		var user=matchArray[1]
		var domain=matchArray[2]
		
		if (user.match(userPat)==null)
		{
			return false
		}
		
		var IPArray=domain.match(ipDomainPat)
		
		if (IPArray!=null)
		{
			for (var i=1;i<=4;i++)
			{
				if (IPArray[i]>255)
				{
					return false
				}
			}
			return true
		}
		
		var domainArray=domain.match(domainPat)
		if (domainArray==null)
		{
			return false
		}
		
		var atomPat=new RegExp(atom,"g")
		var domArr=domain.match(atomPat)
		var len=domArr.length
		if (domArr[domArr.length-1].length<2 || domArr[domArr.length-1].length>3)
		{
		   return false
		}
		
		
		if (len<2)
		{
		   return false
		}
		
		return true;
	}
