﻿function abrirblog()
{
    var blog;
    blog=window.open("./wordpress","Blog");
}



function esFecha(fecha)
{
	var bisiesto=false;
	noerror=true;
	var TMP = fecha.split("/");
	if(TMP[0]=="" || TMP[1]=="" || TMP[2]=="" || typeof(TMP[0])=="undefined" || typeof(TMP[1])=="undefined" || typeof(TMP[2])=="undefined" || isNaN(TMP[0]) || isNaN(TMP[1]) || isNaN(TMP[2]))
	{
		noerror=false;
	}
	if(noerror)
	{
		var dia = parseInt(TMP[0]);
		var mes = parseInt(TMP[1]);
		var anyo = parseInt(TMP[2]);
	
		if((anyo%4==0) && (anyo%100!=0)||(anyo%400==0))
		{
			$bisiesto=true;
		}
		
		if (((mes==1)||(mes==3)||(mes==5)||(mes==7)||(mes==8)||(mes==10)||(mes==12)) && (dia>31 || dia<1))
		{
			$noerror=false;
		}
		if (((mes==4)||(mes==6)||(mes==9)||(mes==11)) && (dia > 31 || dia<1))
		{
			$noerror=false;
		}
		if (((mes==2) && (dia>28 || dia<1))||((mes==2) && (dia>29 || dia<1)&& bisiesto))
		{
			noerror=false;
		}
	}
return noerror;
}

function esHora(hora)
{
	noerror = true;
	var TMP = hora.split(":");
	if(TMP[0]=="" || TMP[1]=="" || typeof(TMP[0])=="undefined" || typeof(TMP[1])=="undefined" || isNaN(TMP[0]) || isNaN(TMP[1]))
	{
		noerror=false;
	}
	if(noerror)
	{
		var hora = parseInt(TMP[0]);
		var minutos = parseInt(TMP[1]);
		if(parseInt(hora)>23 || parseInt(hora)<0)
		{
			noerror=false;
		}
		if(parseInt(minutos)>59 || parseInt(minutos)<0)
		{
			noerror=false;
		}
	}
	return noerror;
}


function mas_info(){
	$(".mas_inf").mouseover(function(event){						 
		html_id = $(this).attr("id");
		$("#div_"+html_id).slideToggle("slow");
	});
	$(".mas_inf").mouseout(function(event){
		html_id = $(this).attr("id");
		$("#div_"+html_id).slideToggle("fast");
	});
}
