	$(document).ready(function()
	{
		$("form.jqtransform").jqTransform({imgPath:"images/jqtransformplugin/img/"});
	});
	
	function cargarPagina(target) {
		if(target != "")
	  		window.location = target;
	}
	
	function validar_form_calendario_competiciones()
	{ 
	  if (document.form_calendario_competiciones.id_deporte.value=='')
			{
				alert("Seleccione un deporte.");
				return(false);
			}	 
	  if (document.form_calendario_competiciones.desde.value=="")
		  {
			alert("Seleccione una fecha inicial.");
			return(false);
		  }
	  else
		{
		  if (document.form_calendario_competiciones.hasta.value=="")
			  {
				alert("Seleccione una fecha final.");
				return(false);
			  }   
		  else
				{
					fecha1 = document.form_calendario_competiciones.desde.value.split("/");
					fecha2 = document.form_calendario_competiciones.hasta.value.split("/");
					f1=fecha1[2]+fecha1[1]+fecha1[0];
					f2=fecha2[2]+fecha2[1]+fecha2[0];
					if (f1>f2) 
						{	
							alert("La Fecha Inicio no puede ser posterior a la de Fecha Fin.");
							return(false);
						}					
				}
		}
	}									

	function cerrar_contacta()
	{
		document.getElementById("div_contacta").style.display = "none";
		document.getElementById("fr_contacta").src = "";
	}
		
	function abrir_contacta()
	{
		document.getElementById('div_contacta').style.display = 'none';
		document.getElementById('div_contacta').style.position = 'absolute';
		document.getElementById('div_contacta').style.top = "50%";
		
		document.getElementById('div_contacta').style.position = 'fixed';
		document.getElementById('div_contacta').style.top = document.documentElement.clientHeight/2 - document.getElementById('div_contacta').offsetHeight/2;

		document.getElementById("div_contacta").style.display = "block";
		document.getElementById("fr_contacta").src = "iframe_contacta.asp";
	}	
	
	function cerrar_recomendar()
	{
		document.getElementById("div_recomendar").style.display = "none";
		document.getElementById("fr_recomendar").src = "";
	}
		
	function abrir_recomendar(x)
	{
		document.getElementById('div_recomendar').style.display = 'none';
		document.getElementById('div_recomendar').style.position = 'absolute';
		document.getElementById('div_recomendar').style.top = "50%";
		
		document.getElementById('div_recomendar').style.position = 'fixed';
		document.getElementById('div_recomendar').style.top = document.documentElement.clientHeight/2 - document.getElementById('div_recomendar').offsetHeight/2;

		document.getElementById("div_recomendar").style.display = "block";
		document.getElementById("fr_recomendar").src = "iframe_recomendar.asp?url="+x;
	}
	
	function cerrar_politicaPrivacidad()
	{
		document.getElementById("div_politicaPrivacidad").style.display = "none";
		document.getElementById("fr_politicaPrivacidad").src = "";
	}
		
	function abrir_politicaPrivacidad()
	{
		document.getElementById('div_politicaPrivacidad').style.display = 'none';
		document.getElementById('div_politicaPrivacidad').style.position = 'absolute';
		document.getElementById('div_politicaPrivacidad').style.top = "50%";
		
		document.getElementById('div_politicaPrivacidad').style.position = 'fixed';
		document.getElementById('div_politicaPrivacidad').style.top = document.documentElement.clientHeight/2 - document.getElementById('div_politicaPrivacidad').offsetHeight/2;

		document.getElementById("div_politicaPrivacidad").style.display = "block";
		document.getElementById("fr_politicaPrivacidad").src = "iframe_politica_privacidad.htm";
	}	
	
	function nwindow(mypage,myname,w,h,scroll){
	LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;
	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
	win=window.open(mypage,myname,settings);
	if(win.focus){win.focus();}}	
	
	function fav() 
	{
		var browsName = navigator.appName; 
		
		if (browsName == "Microsoft Internet Explorer") 
		{ 
			window.external.AddFavorite('http://www.arandactiva.com','Arandaactiva.com');
		} 
		else if (browsName == "Netscape") 
		{
			alert ("\nPara agregar www.arandactiva.com a tus favoritos pulsa CTRL+D");
		} 
	}	
