function Data() {

var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var dayarray=new Array("Domingo","Luns","Martes","Mércores","Xoves","Venres","Sábado")
var montharray=new Array("Xaneiro","Febreiro","Marzo","Abril","Maio","Xuño","Xullo","Agosto","Setembro","Outubro","Novembro","Decembro")
document.write(dayarray[day]+" "+daym+" de "+montharray[month]+" de "+year+"</font>")

}//Data


function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'':(v=='hide')?'none':v; }
    obj.display=v; }
}

function cambiarCapa(sBoxId)
{
//	alert("hola");
	if (document.getElementById) {
		oBox = document.getElementById(sBoxId).style;
		if (oBox.display == "none" || oBox.display == null || oBox.display == "") {
			oBox.display = "block";
		} else {
			oBox.display = "none";
		}
	}
}

function mantenerCapa(sBoxId)
{
	if (document.getElementById) {
		oBox = document.getElementById(sBoxId).style;
		if (oBox.display == "none" || oBox.display == null || oBox.display == "") {
			oBox.display = "none";
		} else {
			oBox.display = "block";
		}
	}
}

/*Esta funcion está diseñada para la web de FEGASINEL, y no funciona con ninguna mas*/
function activa(){
    this.document.form1.ficherorelseccion.disabled=false;
	this.document.form1.externo.disabled=false;
 }

function desactiva(){
    this.document.form1.ficherorelseccion.disabled=true;
	this.document.form1.externo.disabled=true;
 }

//valida las entradas de los forms
function validar(pass1,pass2,nombre,mail) {
	if (pass1.length>0){
		if (pass1==pass2)
			if (nombre.length>0){
				if(mail.length>0)
					return true;
				else{
					return true;
				}
			}
			else{
				alert('Debe introducir un nombre');
				return false;
			}
		else {
			alert('La contraseña y la confirmación deben ser iguales');
			return false;
		}
     }//if
     else {
       alert ('Debe introducir una contraseña');             
       return false;
     }//else
   } //cadena
   
   
   //valida las entradas de los forms
function validarSolicitudAlta(nombre,empresa,login,telefono) {
	if(nombre.length==0){
		alert('Debe introducir su nombre');
		return false;
	}
	else
		if(empresa.length==0){
			alert('Debe introducir su empresa');
			return false;
		}
		else
			if(login.length==0){
				alert('Debe sugerir un nombre de usuario (login)');
				return false;
			}
			else
				if(telefono.length==0){
					alert('Debe introducir su teléfono');
					return false;
				}
				else return true;
} //cadena










