//Script varios que afectan a casitidas las páginas
<!--
/*Control de parametros para "elfader" de IE */
   FDRboxWid = 150;
   FDRboxHgt = 150;
   FDRborWid = 2;
   FDRborCol = "White";
   FDRborSty = "double";
   FDRbackCol = "white";
   FDRboxPad = 5;

   FDRtxtAln = "center";
   FDRlinHgt = "11pt";
   FDRfntFam = "Geneva,Arial,sans-serif";
   FDRfntCol = "black";
   FDRfntSiz = "10pt";
   FDRfntWgh = "bold";
   FDRfntSty = "normal";
   FDRlnkCol = "orange";
   FDRlnkDec = "none";
   FDRhovCol = "green";

   FDRgifSrc = "images/fade.gif";
   FDRgifInt = 60;

   FDRblendInt = 4;
   FDRblendDur = 1;
   FDRmaxLoops = 100;

   FDRendWithFirst = true;
   FDRreplayOnClick = true;
   
   FDRjustFlip = false;
   FDRhdlineCount = 1;

// función para mostrar un texto en la barra de estado
function barraEstado(texto) { //v1.0
	status=texto;
	document.valor = true;
}

	function MM_reloadPage(init) {  //reloads the window if Nav4 resized
	  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
		document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
	  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
	}

	MM_reloadPage(true);

	function MM_preloadImages() { //v3.0
	  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
		var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
		if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
	}

	function MM_swapImgRestore() { //v3.0
	  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
	}

	function MM_swapImage() { //v3.0
	  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
	   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
	}

	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() { //v3.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')?'visible':(v='hide')?'hidden':v; 
			   }
    		   obj.visibility=v; 
	 		}
	}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function verifyCompatibleBrowser(){ 
    this.ver=navigator.appVersion 
    this.dom=document.getElementById?1:0 
    this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0; 
    this.ie4=(document.all && !this.dom)?1:0; 
    this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
 
    this.ns4=(document.layers && !this.dom)?1:0; 
    this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5) 
    return this 
} 
bw=new verifyCompatibleBrowser() 
 
 
var speed=50 
 
var loop, timer 
 
function ConstructObject(obj,nest){ 
    nest=(!nest) ? '':'document.'+nest+'.' 
    this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0; 
    this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0; 
    this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight 
    this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight 
    this.up=MoveAreaUp;this.down=MoveAreaDown; 
    this.MoveArea=MoveArea; this.x; this.y; 
    this.obj = obj + "Object" 
    eval(this.obj + "=this") 
    return this 
} 
<!--

/* Zooming link script by Paul Anderson, copyright 2001 CNET Builder.com.
   May be freely used with attribution. Not for resale. All rights reserved. 
   Make a link zoom open by adding the event handler
   
   onclick="zoomBox(event,this);return false"
   
   To zoom into a new, positioned window add width, height, left, and top
   
   onclick="zoomBox(event,this,640,480,100,50);return false"
   */

var maxW,maxH,fromX,fromY,toX,toY,adjX,adjY,zBox,zStep=0,zLink,zNew;

function zoomBox(evt,zlink,maxw,maxh,tox,toy) {
if (arguments.length > 2) zNew=1;
scrollH=(window.pageYOffset!=null)?window.pageYOffset:document.body.scrollTop;
maxW=maxw?maxw:window.innerWidth?innerWidth:document.body.clientWidth;
maxH=maxh?maxh:window.innerHeight?innerHeight:document.body.clientHeight;
toX=tox?tox:0;
toY=(toy?toy:0)+scrollH;
fromX=evt.pageX?evt.pageX:evt.clientX;
fromY=(evt.pageY?evt.pageY:evt.clientY)+(document.all?scrollH:0);
adjX=toX+evt.screenX-fromX;
adjY=toY+evt.screenY-fromY;
if (document.createElement && document.body.appendChild && !zBox) {
	zBox=document.createElement("div");
	zBox.style.position="absolute";
	document.body.appendChild(zBox);
} else if (document.all && !zBox) {
	document.all[document.all.length-1].outerHTML+='<div id="zBoxDiv" style="position:absolute"></div>';
	zBox=document.all.zBoxDiv;
} else if (document.layers && !zBox) {
	zBox=new Layer(maxW);
	zBox.style=zBox;
	}
zLink=zlink;
doZoom();
}

function doZoom() {
zStep+=1;
zPct=(10-zStep)/10
if (document.layers) {
	zBox.moveTo(toX+zPct*(fromX-toX),toY+zPct*(fromY-toY));
	zBox.document.open();
	zBox.document.write("<table width='"+maxW*(1-zPct)+"' height="+maxH*(1-zPct)+" border=2 cellspacing=0><tr><td></td></tr></table>");
	zBox.document.close();
	} else {
	zBox.style.border="2px solid #999999";
	zBox.style.left=toX+zPct*(fromX-toX);
	zBox.style.top=toY+zPct*(fromY-toY);
	zBox.style.width=maxW*(1-zPct);
	zBox.style.height=maxH*(1-zPct);
	}
zBox.style.visibility="visible";
if (zStep < 10) setTimeout("doZoom("+fromX+","+fromY+","+toX+","+toY+")",30);
else {
	zBox.style.visibility='hidden';
	zStep=0;
	if (zLink && !zNew) location.href=zLink.href;
	else if (zLink && zNew) {
		var w=window.open(zLink.href,'','width='+maxW+',height='+maxH+',left='+adjX+',top='+adjY+',scrollbars=no,resizable');
		zNew=null;
		}
	}
}

 /******** Rutinas generales ************/

//rutina para abrir popus
function popup(url){
  cuteLittleWindow = window.open(url, "littleWindow", "location=no,width=390,height=470,scrollbars=yes");
}

// rutina para inicializar arreglos
function dimensiona(n) {
  this.length=n;
  for (var i=1;i<=n;i++) {
	this[i]=0 }
	return this
}

// dimensionar arreglo mes
  mes = new dimensiona(12);
  mes[1]="Enero"
  mes[2]="Febrero"
  mes[3]="Marzo"
  mes[4]="Abril"
  mes[5]="Mayo"
  mes[6]="Junio"
  mes[7]="Julio"
  mes[8]="Agosto"
  mes[9]="Septiembre"
  mes[10]="Octubre"
  mes[11]="Noviembre"
  mes[12]="Diciembre"

// dimensionar arreglo dia
dia = new dimensiona(7);
  dia[1]="Domingo"
  dia[2]="Lunes"
  dia[3]="Martes"
  dia[4]="Mi&eacute;rcoles"
  dia[5]="Jueves"
  dia[6]="Viernes"
  dia[7]="S&aacute;bado"

function ponFecha() {
	
	var ns4up = (document.layers) ? 1 : 0;  // browser sniffer
	var ie4up = (document.all) ? 1 : 0;
		 
	// determinar la fecha
	hoy=new Date();
	
	// muestra la fecha
 	if (ie4up) {
	   document.write(dia[hoy.getDay()+1]+", "+hoy.getDate()+" de ");  
	   document.writeln(mes[hoy.getMonth()+1]+" de "+(hoy.getYear()));
	} else
	{
   	   document.write(dia[hoy.getDay()+1]+", "+hoy.getDate()+" de ");
	   document.writeln(mes[hoy.getMonth()+1]+" de "+(hoy.getYear()+1900));
	} 
}


// ********************************* GESTIÓN DE FECHAS ***************************

/**
    * definimos las variables globales que van a contener la fecha completa, cada una de sus partes
    * y los dias correspondientes al mes de febrero segun sea el año bisiesto o no
*/
var a, mes, dia, anyo, febrero;
    
function anyoBisiesto(anyo)  {

   // si el año introducido es de dos cifras lo pasamos al periodo de 1900. Ejemplo: 25 > 1925
   if (anyo < 100)
      var fin = anyo + 1900;
   else
      var fin = anyo ;
    
   // primera condicion: si el resto de dividir el año entre 4 no es cero > el año no es bisiesto
   if (fin % 4 != 0)
      return false;
   else {
      if (fin % 100 == 0) {
         // si el año es divisible por 4 y por 100 y divisible por 400 > es bisiesto
         if (fin % 400 == 0) {
            return true;
         }
         // si es divisible por 4 y por 100 pero no lo es por 400 > no es bisiesto
         else {
            return false;
         }
      }
      // si es divisible por 4 y no es divisible por 100 > el año es bisiesto
      else {
         return true;
      }
   }
}
    
/**
    * funcion principal de validacion de la fecha
    * argumento fecha > cadena de texto de la fecha introducida por el usuario
*/
function validar() {
// obtenemos la fecha introducida y la separamos en dia, mes y año
   a=document.forms[0].fecha.value;
   dia=a.split("/")[0];
   mes=a.split("/")[1];
   anyo=a.split("/")[2];
       
   if (a=="") {
   	  alert("La fecha prevista de la instalacion no puede dejarse en blanco");
	  return;
   }
   
   if (dia==null || mes==null || anyo==null) {
   	  alert("La fecha introducida no tiene el formato correcto. [dd/mm/aaaa]");
	  return;
   }
       
   if (anyoBisiesto(anyo))
      febrero=29;
   else
      febrero=28;
   
   // si el mes introducido es negativo, 0 o mayor que 12 > alertamos y detenemos ejecucion
   if ((mes<1) || (mes>12)) {
      alert("El mes introducido no es valido. Por favor, introduzca un mes correcto");
      document.forms[0].fecha.focus();
      document.forms[0].fecha.select();
      return;
   }

   /**
       * si el mes introducido es febrero y el dia es mayor que el correspondiente 
       * al año introducido > alertamos y detenemos ejecucion
   */
   if ((mes==2) && ((dia<1) || (dia>febrero))) {
      alert("El dia introducido no es valido. Por favor, introduzca un dia correcto");
      document.forms[0].fecha.focus();
      document.forms[0].fecha.select();
      return;
   }
   
   // si el mes introducido es de 31 dias y el dia introducido es mayor de 31 > alertamos y detenemos ejecucion
   if (((mes==1) || (mes==3) || (mes==5) || (mes==7) || (mes==8) || (mes==10) || (mes==12)) && ((dia<1) || (dia>31))) {
      alert("El dia introducido no es valido. Por favor, introduzca un dia correcto");
      document.forms[0].fecha.focus();
      document.forms[0].fecha.select();
      return;
   }
   
   // si el mes introducido es de 30 dias y el dia introducido es mayor de 301 > alertamos y detenemos ejecucion
   if (((mes==4) || (mes==6) || (mes==9) || (mes==11)) && ((dia<1) || (dia>30))) {
      alert("El dia introducido no es valido. Por favor, introduzca un dia correcto");
      document.forms[0].fecha.focus();
      document.forms[0].fecha.select();
      return;
   }

   // si el mes año introducido es menor que 1900 o mayor que 2010 > alertamos y detenemos ejecucion
   if ((anyo<1900) || (anyo>2010)) {
      alert("El año introducido no es valido. Por favor, introduzca un año entre 1900 y 2010");
      document.forms[0].fecha.focus();
      document.forms[0].fecha.select();
   } 
 
   /**
       * en caso de que todo sea correcto > enviamos los datos del formulario
       * para ello debeis descomentar la ultima sentencia
   */
   else {
	  document.forms[0].submit(); 
   }    
}    

function MoveArea(x,y){ 
    this.x=x;this.y=y 
    this.css.left=this.x 
    this.css.top=this.y 
} 
 
function MoveAreaDown(move){ 
	if(this.y>-this.scrollHeight+objContainer.clipHeight){ 
    this.MoveArea(0,this.y-move) 
    if(loop) setTimeout(this.obj+".down("+move+")",speed) 
	} 
} 
function MoveAreaUp(move){ 
	if(this.y<0){ 
    this.MoveArea(0,this.y-move) 
    if(loop) setTimeout(this.obj+".up("+move+")",speed) 
	} 
} 
 
function PerformScroll(speed){ 
	if(initialised){ 
		loop=true; 
		if(speed>0) objScroller.down(speed) 
		else objScroller.up(speed) 
	} 
} 
 
function CeaseScroll(){ 
    loop=false 
    if(timer) clearTimeout(timer) 
} 
var initialised; 
function InitialiseScrollableArea(){ 
    objContainer=new ConstructObject('divContainer') 
    objScroller=new ConstructObject('divContent','divContainer') 
    objScroller.MoveArea(0,0) 
    objContainer.css.visibility='visible' 
    initialised=true; 
} 
// end absolutely positioned scrollable area object scripts
	

function validar_login()
{
if (login.usuario.value=="") 
   alert("El nombre de usuario es requerido");
else if (login.pass.value=="")
	 	alert("La clave de acceso es requerida");  
else
   login.submit();
}

function isEmail(correo) //comprueba que se ha escrito una direccion de correo correcta
   {alert(correo);
   //emailAddress=correo;
   if (correo.value.indexOf ('@',0) == -1 || correo.value.indexOf ('.',0) == -1)
	  {
      alert('Tu E-mail ha de ser en el formato "nombre@dominio.ext". Por favor, inserta correctamente tu dirección e-mail.')
      correo.select();
      correo.focus();
      return false;
      }
   else
      {
      return true;
      }
}

function validar_form()
{
  if (newuser.nombre.value=="" || newuser.apellidos.value=="" || newuser.email.value=="" || newuser.login.value=="" || newuser.clave1.value=="" || newuser.clave2.value=="") 
	{
	 alert("Debe rellenar todos los campos marcados como obligatorios");
	 return false;
	}
  if (newuser.clave1.value != newuser.clave2.value)
	{
	 alert("Las claves de acceso tienen que coincidir");
	 newuser.clave1.select();
	 newuser.clave1.focus();
	 return false;
	}
   if (newuser.email.value.indexOf ('@',0) == -1 || newuser.email.value.indexOf ('.',0) == -1)
	  {
	  alert('Tu E-mail ha de ser en el formato "nombre@dominio.ext". Por favor, inserta correctamente tu dirección e-mail.')
	  newuser.email.select();
	  newuser.email.focus();
	  return false;
	  }
   else
	  {
	  return true;
	  }
}

function validar_cantidadpedido()
{
  if (isNaN(formcantidad.cantidad.value))
  	 alert("Debe introducir un valor numérico");
  else if (formcantidad.cantidad.value=="")
	   alert("Debe rellear el campo cantidad");
  else if (parseInt(formcantidad.cantidad.value)<0)
  	   alert("Debe introducir una cantidad válida");
  else
  	  formcantidad.submit();	  		 
}


function mail_admin() {
   alert("admin");
   consultacliente.depto.value="admin"
   alert("admin2");
   consultacliente.submit();	
   alert("admin3"); 
}


function mail_comer() {
   alert("comer");
   consultacliente.depto.value="comer"
   alert("comer2");
   consultacliente.submit();	 
}


function mail_tecni() { 
   alert("tecni");
   consultacliente.depto.value="tecni"
   alert("tecni2");
   consultacliente.submit();	 
}
 //-->
