/************* 
**** <config> 
**/ 
startColor = "#EA3A0F"; // MouseOut link color 
endColor = "#FFFFFF"; // MouseOver link color 

stepIn = 20; // delay when fading in 
stepOut = 20; // delay when fading out 

/*** set to true or false; true will 
**   cause all links to fade automatically 
***/ 
autoFade = true; 

/*** set to true or false; true will cause all CSS 
** classes with "fade" in them to fade onmouseover 
***/ 
sloppyClass = true; 
/****** </config> **************/ 
/***************** <install> ******** </install>*************/ 

hexa = new makearray(16); 
for(var i = 0; i < 10; i++) 
hexa[i] = i; 
hexa[10]="a"; hexa[11]="b"; hexa[12]="c"; 
hexa[13]="d"; hexa[14]="e"; hexa[15]="f"; 

document.onmouseover = domouseover; 
document.onmouseout = domouseout; 

startColor = dehexize(startColor.toLowerCase()); 
endColor = dehexize(endColor.toLowerCase()); 

var fadeId = new Array(); 

function dehexize(Color){ 
var colorArr = new makearray(3); 
for (i=1; i<7; i++){ 
for (j=0; j<16; j++){ 
if (Color.charAt(i) == hexa[j]){ 
if (i%2 !=0) 
colorArr[Math.floor((i-1)/2)]=eval(j)*16; 
else 
colorArr[Math.floor((i-1)/2)]+=eval(j); 
} 
} 
} 
return colorArr; 
} 

function domouseover() { 
if(document.all){ 
var srcElement = event.srcElement; 
if ((srcElement.tagName == "A" && autoFade) || srcElement.className == "fade" || (sloppyClass && srcElement.className.indexOf("fade") != -1)) 
fade(startColor,endColor,srcElement.uniqueID,stepIn); 
} 
} 

function domouseout() { 
if (document.all){ 
var srcElement = event.srcElement; 
if ((srcElement.tagName == "A" && autoFade) || srcElement.className == "fade" || (sloppyClass && srcElement.className.indexOf("fade") != -1)) 
fade(endColor,startColor,srcElement.uniqueID,stepOut); 
} 
} 

function makearray(n) { 
this.length = n; 
for(var i = 1; i <= n; i++) 
this[i] = 0; 
return this; 
} 

function hex(i) { 
if (i < 0) 
return "00"; 
else if (i > 255) 
return "ff"; 
else 
return "" + hexa[Math.floor(i/16)] + hexa[i%16];} 

function setColor(r, g, b, element) { 
var hr = hex(r); var hg = hex(g); var hb = hex(b); 
element.style.color = "#"+hr+hg+hb; 
} 

function fade(s,e, element,step){ 
var sr = s[0]; var sg = s[1]; var sb = s[2]; 
var er = e[0]; var eg = e[1]; var eb = e[2]; 

if (fadeId[0] != null && fade[0] != element){ 
setColor(sr,sg,sb,eval(fadeId[0])); 
var i = 1; 
while(i < fadeId.length){ 
clearTimeout(fadeId[i]); 
i++; 
} 
} 

for(var i = 0; i <= step; i++) { 
fadeId[i+1] = setTimeout("setColor(Math.floor(" +sr+ " *(( " +step+ " - " +i+ " )/ " +step+ " ) + " +er+ " * (" +i+ "/" + 
step+ ")),Math.floor(" +sg+ " * (( " +step+ " - " +i+ " )/ " +step+ " ) + " +eg+ " * (" +i+ "/" +step+ 
")),Math.floor(" +sb+ " * ((" +step+ "-" +i+ ")/" +step+ ") + " +eb+ " * (" +i+ "/" +step+ ")),"+element+");",i*step); 
} 
fadeId[0] = element; 
}

/*************** POP-UP Centrado*******************/ 

function pop(img, ancho, alto){
derecha=((screen.width-ancho)/2);
arriba=((screen.height-alto)/2);
string="toolbar=0,scrollbars=0,location=0,statusbar=0,menu bar=0,resizable=0,width="+ancho+",height="+alto+",left="+derecha+",top="+arriba+"";
fin=window.open(img,"",string);
}


/*************** POP-UP Centrado*******************/ 

function pop2(img, ancho, alto){
derecha=((screen.width-ancho)/2);
arriba=((screen.height-alto)/2);
string="toolbar=0,scrollbars=0,location=0,statusbar=0,menu bar=0,resizable=0,width="+ancho+",height="+alto+",left="+derecha+",top="+arriba+"";
fin=window.open(img,"",string);
}

/*************** TEXTO COMO BOTON *******************/ 


function getsupport ( selectedtype )
{
  document.supportform.supporttype.value = selectedtype ;
  document.supportform.submit() ;
}



/*************** BORRA TEXTO CAMPO *******************/ 

  function eliminarTexto(obj){
    var txt = obj.value;
    if(txt=="(Escribe aquí tu email o teléfono...)"){
	  obj.value="";
	}
  }

/*************** MENU DESPLEGABLE CON LINK *******************/ 

function menu_link(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


/************* FECHA *******************************/


function FechaGenerica(sFecha, iIdioma,year)
{
  var idia  = parseFloat (sFecha.substring(0,2));
  var imes  = parseFloat (sFecha.substring(3,5));
  var iano  = parseFloat (sFecha.substring(6,10));
  var sdia = "";
  var smes = "";
  var sFecha2 = "";
  imes = imes -1;

  if (idia < 1 && imes < 1 && iano < 1)
    {var oFecha = new Date();
        idia  = parseFloat (oFecha.getDate());
        imes  = parseFloat (oFecha.getMonth());
        iano  = parseFloat (oFecha.getYear());}
  else
    {var oFecha = new Date(iano, imes, idia)};


   switch (oFecha.getDay()) {
     case 1 : 
       { switch (iIdioma) {
           case 1 : 
           { sdia = "Dilluns"
           }
           break;
           case 2 : 
           { sdia = "Monday"
           }
           break;
           default: 
           { sdia = "Lunes"
           }
         }
       }
       break;
     case 2 : 
       { switch (iIdioma) {
           case 1 : 
           { sdia = "Dimarts"
           }
           break;
           case 2 : 
           { sdia = "Tuesday"
           }
           break;
           default: 
           { sdia = "Martes"
           }
         }
       }
       break;
     case 3 : 
       { switch (iIdioma) {
           case 1 : 
           { sdia = "Dimecres"
           }
           break;
           case 2 : 
           { sdia = "Wednesday"
           }
           break;
           default: 
           { sdia = "Miércoles"
           }
         }
       }
       break;
     case 4 : 
       { switch (iIdioma) {
           case 1 : 
           { sdia = "Dijous"
           }
           break;
           case 2 : 
           { sdia = "Thursday"
           }
           break;
           default: 
           { sdia = "Jueves"
           }
         }
       }
       break;
     case 5 : 
       { switch (iIdioma) {
           case 1 : 
           { sdia = "Divendres"
           }
           break;
           case 2 : 
           { sdia = "Friday"
           }
           break;
           default: 
           { sdia = "Viernes"
           }
         }
       }
       break;
     case 6 : 
       { switch (iIdioma) {
           case 1 : 
           { sdia = "Dissabte"
           }
           break;
           case 2 : 
           { sdia = "Saturday"
           }
           break;
           default: 
           { sdia = "Sábado"
           }
         }
       }
       break;
     default: 
       { switch (iIdioma) {
           case 1 : 
           { sdia = "Diumenge"
           }
           break;
           case 2 : 
           { sdia = "Sunday"
           }
           break;
           default: 
           { sdia = "Domingo"
           }
         }
       }
   }



   switch (imes) {
     case 0 : 
       { switch (iIdioma) {
           case 1 : 
           { smes = "Gener"
           }
           break;
           case 2 : 
           { smes = "January"
           }
           break;
           default: 
           { smes = "Enero"
           }
         }
       }
       break;
     case 1 : 
       { switch (iIdioma) {
           case 1 : 
           { smes = "Febrer"
           }
           break;
           case 2 : 
           { smes = "February"
           }
           break;
           default: 
           { smes = "Febrero"
           }
         }
       }
       break;
     case 2 : 
       { switch (iIdioma) {
           case 1 : 
           { smes = "Març"
           }
           break;
           case 2 : 
           { smes = "March"
           }
           break;
           default: 
           { smes = "Marzo"
           }
         }
       }
       break;
     case 3 : 
       { switch (iIdioma) {
           case 1 : 
           { smes = "Abril"
           }
           break;
           case 2 : 
           { smes = "April"
           }
           break;
           default: 
           { smes = "Abril"
           }
         }
       }
       break;
     case 4 : 
       { switch (iIdioma) {
           case 1 : 
           { smes = "Maig"
           }
           break;
           case 2 : 
           { smes = "May"
           }
           break;
           default: 
           { smes = "Mayo"
           }
         }
       }
       break;
     case 5 : 
       { switch (iIdioma) {
           case 1 : 
           { smes = "Juny"
           }
           break;
           case 2 : 
           { smes = "June"
           }
           break;
           default: 
           { smes = "Junio"
           }
         }
       }
       break;
     case 6 : 
       { switch (iIdioma) {
           case 1 : 
           { smes = "Juliol"
           }
           break;
           case 2 : 
           { smes = "July"
           }
           break;
           default: 
           { smes = "Julio"
           }
         }
       }
       break;
     case 7 : 
       { switch (iIdioma) {
           case 1 : 
           { smes = "Agost"
           }
           break;
           case 2 : 
           { smes = "August"
           }
           break;
           default: 
           { smes = "Agosto"
           }
         }
       }
       break;
     case 8 : 
       { switch (iIdioma) {
           case 1 : 
           { smes = "Setembre"
           }
           break;
           case 2 : 
           { smes = "September"
           }
           break;
           default: 
           { smes = "Septiembre"
           }
         }
       }
       break;
     case 9 : 
       { switch (iIdioma) {
           case 1 : 
           { smes = "Octubre"
           }
           break;
           case 2 : 
           { smes = "October"
           }
           break;
           default: 
           { smes = "Octubre"
           }
         }
       }
       break;
     case 10 : 
       { switch (iIdioma) {
           case 1 : 
           { smes = "Novembre"
           }
           break;
           case 2 : 
           { smes = "November"
           }
           break;
           default: 
           { smes = "Noviembre"
           }
         }
       }
       break;
     default: 
       { switch (iIdioma) {
           case 1 : 
           { smes = "Desembre"
           }
           break;
           case 2 : 
           { smes = "December"
           }
           break;
           default: 
           { smes = "Diciembre"
           }
         }
       }
   }




switch (year) {

        
case 1 :{
	   switch (iIdioma) {
           case 1 : 
           { sFecha2 = sdia + ", " + idia + " de " + smes + " de " + iano
           }
           break;
           case 2 : 
           { sFecha2 = sdia + ", " + smes + " " + idia + ", " + iano 
           }
           break;
           default: 
           { sFecha2 = sdia + ", " + idia + " de " + smes + " de " + iano 
           }
         }}
break;
default:{


        switch (iIdioma) {
           case 1 : 
           { sFecha2 = sdia + ", " + idia + " de " + smes
           }
           break;
           case 2 : 
           { sFecha2 = sdia + ", " + smes + " " + idia
           }
           break;
           default: 
           { sFecha2 = sdia + ", " + idia + " de " + smes
           }
         }}



}




   document.write (sFecha2);

}

