// JavaScript Document
//Funcion para poner la fecha
function FechaSistema()
{
	var cfecha = new Date();
	var semana = new Array("Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sábado");
	var meses = new Array("Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre");
	var fecha = new Date(Date.parse(cfecha));
	var dia = fecha.getDate();
	if (dia<10) dia="0"+dia;
	var mes = meses[fecha.getMonth()];
	var agno = fecha.getYear();
	if (agno < 1000) agno+=1900;
	return ( semana[cfecha.getDay()]+ ", " + dia + " de " + mes + " de " + agno);
}
//Función para la barra de estado (Javier Cano)
function textoEstado()
{
	pos = pos + 1
	textoActual = texto.substring(0,pos)
	window.status = textoActual + "  •";
	if (pos == texto.length)
	{
		pos = 0
		setTimeout("textoEstado()",10000)
	}
	else
	{
		setTimeout("textoEstado()",100)
	}
}
//Mostrar el Submenu en el lateral izdo
function versubmenu(id) {
	obj = document.getElementById(id);
	if (obj.style.display == "") {
		obj.style.display = "none"
	}
	else {
		obj.style.display = ""
	}
}
//funcion para poner la hora
function RelojSistema()
{
	var mydate = new Date()
	var horas = mydate.getHours();
	var minutos = mydate.getMinutes();
	var segundos = mydate.getSeconds();
	var dn="Am";
	if (horas>=12)
	{
		dn="Pm"
	}	
	if (horas>12)
	{
		horas=horas-12
	}
	if (horas==0)
	{
	horas=12
	}
	if (horas<10)
	{
		horas="0"+horas
	}	
	if (minutos<=9)
	{
	minutos="0"+minutos
	}
	if (segundos<=9)
	{
	segundos="0"+segundos
	}
	return ("["+horas+":"+minutos+":"+segundos+" - "+dn+"]");
}
//Funcion para anular el boton derecho
function anularBotonDerecho() {
    if (event.button==2) {
     alert('Esta es la Página del Master en Intervención en Ansiedad y Estrés');
    }
  }
//Función para abrir ventana con medidas
function VentanaFoto (URL,NomVentana,ancho,alto)
{ 
   window.open(URL,NomVentana,ancho,alto,"scrollbars=NO") 
} 
//Función para desplegar los contenidos de practicas
function Alternar(Seccion){
	if (Seccion.style.display=="none"){Seccion.style.display=""}
	else{Seccion.style.display="none"}
}
