function emoticon(pNum) {
	document.formularioNuevoComentario.Contenido.value = document.formularioNuevoComentario.Contenido.value + String(pNum);
	document.formularioNuevoComentario.Contenido.focus();
}

// Expansion y contracción de textos

function showDetails(divID) {     
   var strShow
       strShow = divID + "Show";
   var strHide
       strHide = divID + "Hide";
       
   document.all[divID].style.display = "block";
   document.all[strShow].style.display = "none";
   document.all[strHide].style.display = "block";
}

function hideDetails(divID) {
   var strShow
       strShow = divID + "Show";
   var strHide
       strHide = divID + "Hide";

   document.all[divID].style.display = "none";
   document.all[strShow].style.display = "block";
   document.all[strHide].style.display = "none";
}

// Funciones extras para detalles de la web

function NuevaVentana(miURL, id, ancho, alto, fijoQ, pResizable) {
	LeftPosition = (screen.width) ? (screen.width-ancho)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-alto)/2 : 0;
	window.open(miURL, "MYT" + id, "width=" + ancho +", height=" + alto + ", top=" + TopPosition + ", left=" + LeftPosition + ", resizable=" + pResizable + ", toolbar=no, location=no, directories=no, menubar=no, scrollbars=" + fijoQ)
}

function partitura(miURL) {
	ancho = 700;
	alto = 500;
	fijoQ = "yes";
	pResizable = "yes";

	LeftPosition = (screen.width) ? (screen.width-ancho)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-alto)/2 : 0;

	window.open(miURL, "MYTPartitura", "width=" + ancho +", height=" + alto + ", top=" + TopPosition + ", left=" + LeftPosition + ", resizable=" + pResizable + ", toolbar=no, location=no, directories=no, menubar=no, scrollbars=" + fijoQ)
}

function Fecha() {
	var Fecha = new Date();
	var diaSet = Fecha.getDay();
	var dia = Fecha.getDate();
	var mes = Fecha.getMonth();
	var ano = Fecha.getYear();
	var mins = Fecha.getMinutes();
	var hora = Fecha.getHours();
	var miCadena = "";
	var Dias = new Array("Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado");
	var Meses = new Array("Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre")
	
	if (ano < 2000) { ano = ano + 1900; }
	return "<strong>" + Dias[diaSet] + "</strong>, " + dia + " de " + Meses[mes] + " de " + ano;
}

function FechaRegistros() {
	var Fecha = new Date();
	var diaSet = Fecha.getDay();
	var dia = Fecha.getDate();
	var mes = Fecha.getMonth();
	var ano = Fecha.getYear();
	var mins = Fecha.getMinutes();
	var hora = Fecha.getHours();
	var miCadena = "";
	var Dias = new Array("Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado");
	var Meses = new Array("Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre")
	
	if (dia<10) {
		miCadena = miCadena + "0"
	}
	miCadena = miCadena + dia + "/"
	mes = mes + 1
	if (mes<10) {
		miCadena = miCadena + "0"
	}

	miCadena = miCadena + mes + "/" + ano
	return miCadena
}

function HoraRegistros() {
	var Fecha = new Date();
	var diaSet = Fecha.getDay();
	var dia = Fecha.getDate();
	var mes = Fecha.getMonth();
	var ano = Fecha.getYear();
	var mins = Fecha.getMinutes();
	var hora = Fecha.getHours();
	var miCadena = "";
	var Dias = new Array("Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado");
	var Meses = new Array("Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre")
	
	miCadena = hora + ":"
	if (mins < 10) {
		miCadena = miCadena + "0"
	}
	
	return miCadena + mins;
}