preload('link1','img/text/link1-1-es.gif');

preload('link2','img/text/link2-1-es.gif');

preload('link3','img/text/link3-1-es.gif');





function Item()

{

this.length = Item.arguments.length; 

for (var i = 0; i < this.length; i++)

this[i] = Item.arguments[i];

}



function Fecha(lan) {



if (lan=='es') {

var ndia  = new Item('Domingo', 'Lunes', 'Martes', 'Mi&eacute;rcoles', 'Jueves', 'Viernes', 'S&aacute;bado');

var nmes  = new Item('Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 

'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre');

}

else

if (lan=='eng') {

var ndia  = new Item('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');

var nmes  = new Item('January', 'February', 'March', 'April', 'May', 'June', 

'Jule', 'August', 'September', 'October', 'November', 'December');

}

else

if (lan=='fr') {

var ndia  = new Item('Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi');

var nmes  = new Item('Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 

'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre');

}



var ahora;

var fecha = new Date();

var ano   = fecha.getYear();

var mes   = fecha.getMonth();

var dia   = fecha.getDay();

var aux   = "" + fecha;

if (ano<10) { ano2 = "200" + eval(ano) }

else if (ano<80) { ano2 = "20" + ano } 

else if (ano<=99) { ano2 = "19" + ano }

else if (ano<1000) { ano2 = eval(ano) + eval(1900) }

else { ano2 = ano }

ahora = ndia[dia] + ", " + eval(aux.substring(7, 10)) + " " + nmes[mes] + " " + ano2;

return ahora;

}







function change_lan(i,s,p)

{

if (s==0)

{ document.location.href="/"+i+"/"+s+"/"+p;	 }

else 

{ 

document.location.href="/"+i+"/"+s+"/"+p; 

}

}



function change_lan_prod(i,s,p,id)

{

document.location.href="/"+i+"/"+s+"/"+p+"/"+id; 

}



function change_lan2(i)

{

if (i=="es")

{ document.location.href="index.php?lan=es";	 }

else if (i=="eng")

{ document.location.href="index.php?lan=eng";	 }

else if (i=="fr")

{ document.location.href="index.php?lan=fr";	 }

else if (i=="de")

{ document.location.href="index.php?lan=de";	 }

}



function change_cat(i,lng,s)

{

document.location.href="/"+lng+"/"+s+"/"+i;

}



//selecciona ficha de producto

function change_prod(idp,lan,s,p)

{

if (idp=="0")

{ alert('Seleccione un producto dentro de esta opción');



}

else 

{ 

//alert('id='+idp);

//alert('lan='+lan);

//alert('s='+s);

//alert('p='+p);

document.location.href='/'+lan+'/'+s+'/'+p+'/'+idp;

 }



}







// Script to create a drop-down menu effect using layers.

//(c)Copyright Daren Craddock 2002

//You may use this code in any application, no limits,

//provided that you acknowledge Daren Craddock as the originator.

// big() makes selected layer longer (height property)



function big(lyr) {

document.all[lyr].style.height='90px';

document.all[lyr].style.border='1px solid #FFFFFF';



 }



/* small() makes selected layer shorter (height property)*/



function small(lyr) {

document.all[lyr].style.height='32px';

document.all[lyr].style.border='none';

document.link2.src='img/txt/t2_off.gif';

}



/* start() makes all layers short to start with (height property)*/



function start() {



document.all.Layer1.style.height='32px'; }







function preload(imgObj,imgSrc) {

	eval(imgObj+' = new Image()')

	eval(imgObj+'.src = "'+imgSrc+'"')

}



// donde: 

//

// imgObj - el nombre del objeto asociado con la imagen 

// imgSrc - la fuente nombre del fichero (url) de la imagen 

// Ejemplos: 

//

// preload('imageA','imageA.gif')

// preload('imageB','imageB.gif')



function aleatorio(inferior,superior){ 

    numPosibilidades = superior - inferior 

    aleat = Math.random() * numPosibilidades 

    aleat = Math.round(aleat) 

    return parseInt(inferior) + aleat 

} 





function MM_openBrWindow(theURL,winName,features) { //v2.0

  window.open(theURL,winName,features)

}





function enlarge(x,y,title,file)

{

//alert(x+y);

Over = "window.status = 'click para cerrar'; return true;";

Out = "window.status = 'Europea Térmica Eléctrica'; return true;";

URL=file;

newwin=window.open('','newwindow','status=yes,width='+x+',height='+y);

newwin.document.writeln('<HTML>');

newwin.document.writeln('<HEAD><TITLE>', title, '</TITLE>');

newwin.document.writeln('</HEAD><BODY MARGINWIDTH="0" MARGINHEIGHT="0" TOPMARGIN="0" LEFTMARGIN="0" BGCOLOR="#000000">');

newwin.document.writeln('<CENTER><A HREF="javascript:self.close();" onMouseOver="', Over, '" onMouseOut="', Out, '"><IMG SRC="', file, '" BORDER=0 WIDTH="'+x+'" HEIGHT="'+y+'" ALT="click para cerrar"></A></CENTER>');

newwin.document.writeln('</BODY></HTML>');

newwin.document.close();

newwin.focus();

}













