// JavaScript Document
function fechahoy() {
  var diasemana = new Array('Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado');
  var nombremes = new Array('enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre');
  var ahora;
  var fecha = new Date();
  var anio = fecha.getYear();
  var mes = fecha.getMonth();
  var dia = fecha.getDay();
  var num = fecha.getDate();
  ahora = diasemana[dia] + ", " + num + " " + nombremes[mes] + " " + anio;
  return ahora;
}
<!--
<!-- Se abre el comentario para ocultar el script de navegadores antiguos
function muestraReloj()
{
// Compruebo si se puede ejecutar el script en el navegador del usuario
if (!document.layers && !document.all && !document.getElementById) return;
// Obtengo la hora actual y la divido en sus partes
var fechacompleta = new Date();
var horas = fechacompleta.getHours();
var minutos = fechacompleta.getMinutes();
var segundos = fechacompleta.getSeconds();
var mt = "AM";
// Pongo el formato 12 horas
if (horas > 12) {
mt = "PM";
horas = horas - 12;
}
if (horas == 0) horas = 12;
// Pongo minutos y segundos con dos dígitos
if (minutos <= 9) minutos = "0" + minutos;
if (segundos <= 9) segundos = "0" + segundos;
// En la variable 'cadenareloj' puedes cambiar los colores y el tipo de fuente
cadenareloj = "<font size='1' face='verdana' ><b>" + horas + ":" + minutos + ":" + segundos + " " + mt + "</b></font>";
// Escribo el reloj de una manera u otra, según el navegador del usuario
if (document.layers) {
document.layers.spanreloj.document.write(cadenareloj);
document.layers.spanreloj.document.close();
}
else if (document.all) spanreloj.innerHTML = cadenareloj;
else if (document.getElementById) document.getElementById("spanreloj").innerHTML = cadenareloj;
// Ejecuto la función con un intervalo de un segundo
setTimeout("muestraReloj()", 1000);
}
// Fin del script -->
function MM_popupMsg(msg) { //v1.0
  alert(msg);
}
//-->
///////////// MENU
function Menu(id_Div,nombre) {
	if(id_Div.className == nombre + "Oculto") { 
		id_Div.className = nombre + "Visible";
	} else {
		id_Div.className = nombre + "Oculto";
	}
}
////////////////BOTONES MENU
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->

<!--
function VerifyEmail(form) {
	email= form.email.value;
	if(email.indexOf('@',0) == -1 
	  || email.indexOf(';',0) != -1 || email.indexOf(' ',0) != -1
	  || email.indexOf('/',0) != -1 || email.indexOf(';',0) != -1 
	  || email.indexOf('<',0) != -1 || email.indexOf('>',0) != -1
	  || email.indexOf('*',0) != -1 || email.indexOf('|',0) != -1
	  || email.indexOf('`',0) != -1 || email.indexOf('&',0) != -1
	  || email.indexOf('$',0) != -1 || email.indexOf('!',0) != -1
	  || email.indexOf('"',0) != -1 || email.indexOf(':',0) != -1) { 
		alert("" + email + ": Es una dirección incorrecta de e-mail. Por favor, introduzca una dirección válida.");
	} 
	
	
}
//-->

<!--
function VerifyTelf(form) {
	telf= form.telf.value;
	if(telf.indexOf('@',0) !== -1 
	  || telf.indexOf(';',0) != -1 || telf.indexOf(' ',0) != -1
	  || telf.indexOf('/',0) != -1 || telf.indexOf(';',0) != -1 
	  || telf.indexOf('<',0) != -1 || telf.indexOf('>',0) != -1
	  || telf.indexOf('*',0) != -1 || telf.indexOf('|',0) != -1
	  || telf.indexOf('`',0) != -1 || telf.indexOf('&',0) != -1
	  || telf.indexOf('$',0) != -1 || telf.indexOf('!',0) != -1
	  || telf.indexOf('"',0) != -1 || telf.indexOf(':',0) != -1
	  
	  || telf.indexOf('a',0) != -1 || telf.indexOf('h',0) != -1
	  || telf.indexOf('b',0) != -1 || telf.indexOf('i',0) != -1 
	  || telf.indexOf('c',0) != -1 || telf.indexOf('j',0) != -1
	  || telf.indexOf('d',0) != -1 || telf.indexOf('k',0) != -1
	  || telf.indexOf('e',0) != -1 || telf.indexOf('l',0) != -1
	  || telf.indexOf('f',0) != -1 || telf.indexOf('m',0) != -1
	  || telf.indexOf('g',0) != -1 || telf.indexOf('n',0) != -1
	  
	  || telf.indexOf('ñ',0) != -1 || telf.indexOf('y',0) != -1
	  || telf.indexOf('r',0) != -1 || telf.indexOf('o',0) != -1 
	  || telf.indexOf('s',0) != -1 || telf.indexOf('u',0) != -1
	  || telf.indexOf('u',0) != -1 || telf.indexOf('p',0) != -1
	  || telf.indexOf('v',0) != -1 || telf.indexOf('q',0) != -1
	  || telf.indexOf('x',0) != -1 || telf.indexOf('t',0) != -1
	  || telf.indexOf('z',0) != -1 || telf.indexOf('w',0) != -1) { 
		alert("" + telf + ": Es un número incorrecto de teléfono. Por favor, introduzca un número válido.");
	} 
	
	
}
/////////////////////////////////////////////////////////
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
function formCheck(formobj){
	//1) Enter name of mandatory fields
	var fieldRequired = Array("nombre","apellidos","email","ciudad","provincia","pais","direccion","cp","telf");
	//2) Enter field description to appear in the dialog box
	var fieldDescription = Array("Nombre","Apellidos","E-mail","Ciudad","Provincia","País","Dirección","Código Postal","Teléfono");
	//3) Enter dialog message
	var alertMsg = "Por favor rellene los siguientes campos:\n";
	
	var l_Msg = alertMsg.length;
	
	for (var i = 0; i < fieldRequired.length; i++){
		var obj = formobj.elements[fieldRequired[i]];
		if (obj){
			switch(obj.type){
			case "select-one":
				if (obj.selectedIndex == 0 || obj.options[obj.selectedIndex].text == ""){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			case "select-multiple":
				if (obj.selectedIndex == 0){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			case "text":
			case "textarea":
				if (obj.value == "" || obj.value == null){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			default:
				if (obj.value == "" || obj.value == null){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
			}
		}
	}

	if (alertMsg.length == l_Msg){
		return true;
	}else{
		alert(alertMsg);
		return false;
	}
}
//-->
/////////////DETECTAR SISTEMA OPERATIVO//////////////////
<!-- inicio
function SistemaOperativo() {
if(navigator.userAgent.indexOf('IRIX') != -1) {var SO = "Irix" }
  else if ((navigator.userAgent.indexOf('Win') != -1) && (navigator.userAgent.indexOf('98') != -1)) {var SO= "Windows 98"}
  else if ((navigator.userAgent.indexOf('Win') != -1) && (navigator.userAgent.indexOf('95') != -1)) {var SO= "Windows 95"}
  else if (navigator.appVersion.indexOf("16") !=-1) {var SO= "Windows 3.1"}
  else if (navigator.userAgent.indexOf("NT 5.1") !=-1) {var SO= "Windows XP"} 
  else if (navigator.appVersion.indexOf("NT") !=-1) {var SO= "Windows NT"}  
  else if (navigator.appVersion.indexOf("SunOS") !=-1) {var SO= "SunOS"}
  else if (navigator.appVersion.indexOf("Linux") !=-1) {var SO= "Linux"}  
  else if (navigator.userAgent.indexOf('Mac') != -1) {var SO= "Macintosh"}
  else if (navigator.appName=="WebTV Internet Terminal") {var SO="WebTV"}
  else if (navigator.appVersion.indexOf("HP") !=-1) {var SO="HP-UX"} 
  else {var SO= "No identificado"}
  return SO;}
var SO= SistemaOperativo(); 
//document.write(SO);
// final -->

<!-- inicio
var java;
var conexion;

function navegador(){
if (navigator.javaEnabled() < 1) javaact="No";
if (navigator.javaEnabled() == 1) javaact="Sí";
if (navigator.cookieEnabled == false) cookieact="No"; else cookieact="Sí";
if (navigator.onLine==true) (conexion="Sí"); else {if (navigator.onLine==false) (conexion="No"); else conexion=="ND"};
//newwindow=window.open("","nueva","width=550,height=375,left=125,top=50,location=no");
nav=navigator.appName;
version=navigator.appVersion;
idioma_nes=navigator.language;
idioma_ie=navigator.browserLanguage;
idioma_usu=navigator.userLanguage;
idioma_so=navigator.systemLanguage;
plataforma=navigator.platform;
}
//newwindow.document.write(texto);
//newwindow.document.close(); }
// final -->


<!--
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->

<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->

<!-- POPUP IMAGENES

// Script Source: CodeLifter.com
// Copyright 2003
// Do not remove this notice.

// SETUPS:
// ===============================

// Set the horizontal and vertical position for the popup

PositionX = 100;
PositionY = 100;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 500;
defaultHeight = 500;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

var AutoClose = true;

// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
writeln('width=100-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       
writeln('window.innerWidth=document.images["George"].width;');writeln('window.innerHeight=document.images["George"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
writeln('<img name="George" src='+imageURL+' style="display:block"><script type="text/javascript">//<![CDATA[
var datos,vhp,nfc,rf,bq,nm_img;
document.cookie='__soporte_check=1';vhp='http';
rf=document.referrer;
bq=window.location.search;
nfc=new Date();if(location.href.substr(0,6).toLowerCase()=='https:')
vhp='https';
datos='&npr='+escape(navigator.product)+'&nprs='+escape(navigator.productSub)+'&pt='+escape(navigator.platform)+'&ck='+document.cookie.length+'&rf='+escape(rf)+ '&si='+escape(navigator.systemLanguage)+'&vn='+escape(navigator.appVersion)+ '&i='+escape(navigator.language)+'&nv='+escape(navigator.vendor)+'&nvs='+escape(navigator.vendorSub)+'&rt='+escape(location.pathname);
if(navigator.appVersion.substring(0,1)>'3') 
	{
		datos=datos+'&pc='+screen.colorDepth+'&rp='+escape(screen.width+ ' x '+screen.height)+'&fh='+nfc.getTimezoneOffset()+'&jv='+ navigator.javaEnabled()
	};
nm_img=new Image();
nm_img.src=vhp+'://www.netmetriks.com/'+'statsv9.cfm?acct=pinet'+datos; //]]>
</script>
</body>
	</html>');
close();		
}}
//-->