// JavaScript Document

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_openBrWindow(theURL,winName,features) { //v2.0

  window.open(theURL,winName,features);

}



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_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_validateForm() { //v4.0

  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;

  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);

    if (val) { nm=val.name; if ((val=val.value)!="") {

      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');

        if (p<1 || p==(val.length-1)) errors+='- '+nm+' Debe contener un e-mail válido.\n';

      } else if (test!='R') { num = parseFloat(val);

        if (isNaN(val)) errors+='- '+nm+' Debe contener un número.\n';

        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');

          min=test.substring(8,p); max=test.substring(p+1);

          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';

    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' es obligatorio.\n'; }

  } if (errors) alert('Se han producido los siguientes errores:\n'+errors);

  document.MM_returnValue = (errors == '');

}



function fechaEs() {

var months = new Array();

months[0] = 'Enero';

months[1] = 'Febrero';

months[2] = 'Marzo';

months[3] = 'Abril';

months[4] = 'Mayo';

months[5] = 'Junio';

months[6] = 'Julio';

months[7] = 'Agosto';

months[8] = 'Septiembre';

months[9] = 'Octubre';

months[10] = 'Noviembre';

months[11] = 'Diciembre';

var days = new Array();

days[0] = 'Domingo';

days[1] = 'Lunes';

days[2] = 'Martes';

days[3] = 'Miércoles';

days[4] = 'Jueves';

days[5] = 'Viernes';

days[6] = 'Sábado';

now = new Date();

var dayname = days[now.getDay()];

var monthname = months[now.getMonth()];

var dayofmonth =now.getDate();

var year = now.getYear();

if (year < 1000) year += 1900;

document.write(dayname + ' ' + dayofmonth + ' ' + monthname + ' ' + year);	

}



function fechaEn() {

var months = new Array();

months[0] = 'January';

months[1] = 'February';

months[2] = 'March';

months[3] = 'April';

months[4] = 'May';

months[5] = 'June';

months[6] = 'July';

months[7] = 'August';

months[8] = 'September';

months[9] = 'October';

months[10] = 'November';

months[11] = 'December';

var days = new Array();

days[0] = 'Sunday';

days[1] = 'Monday';

days[2] = 'Tuesday';

days[3] = 'Wednesday';

days[4] = 'Thursday';

days[5] = 'Friday';

days[6] = 'Saturday';

now = new Date();

var dayname = days[now.getDay()];

var monthname = months[now.getMonth()];

var dayofmonth =now.getDate();

var year = now.getYear();

if (year < 1000) year += 1900;

document.write(dayname + ' ' + dayofmonth + ' ' + monthname + ' ' + year);	

}


function fechaDe() {

var months = new Array();

months[0] = 'January';

months[1] = 'February';

months[2] = 'March';

months[3] = 'April';

months[4] = 'May';

months[5] = 'June';

months[6] = 'July';

months[7] = 'August';

months[8] = 'September';

months[9] = 'October';

months[10] = 'November';

months[11] = 'December';

var days = new Array();

days[0] = 'Sonntag';

days[1] = 'Montag';

days[2] = 'Dienstag';

days[3] = 'Mittwoch';

days[4] = 'Donnerstag';

days[5] = 'Freitag';

days[6] = 'Samstag';

now = new Date();

var dayname = days[now.getDay()];

var monthname = months[now.getMonth()];

var dayofmonth =now.getDate();

var year = now.getYear();

if (year < 1000) year += 1900;

document.write(dayname + ' ' + dayofmonth + ' ' + monthname + ' ' + year);	

}



function fechaFr() {

var months = new Array();

months[0] = 'Janvier';

months[1] = 'Février';

months[2] = 'Mars';

months[3] = 'Avril';

months[4] = 'Mai';

months[5] = 'Juin';

months[6] = 'Juillet';

months[7] = 'Août';

months[8] = 'Septembre';

months[9] = 'Octobre';

months[10] = 'Novembre';

months[11] = 'Décembre';

var days = new Array();

days[0] = 'Sunday';

days[1] = 'Monday';

days[2] = 'Tuesday';

days[3] = 'Wednesday';

days[4] = 'Thursday';

days[5] = 'Friday';

days[6] = 'Saturday';

now = new Date();

var dayname = days[now.getDay()];

var monthname = months[now.getMonth()];

var dayofmonth =now.getDate();

var year = now.getYear();

if (year < 1000) year += 1900;

document.write(dayname + ' ' + dayofmonth + ' ' + monthname + ' ' + year);	

}







function writeFlash(url_root, width, height, bgcolor, version, name){

			if (version == null || version == ''){

				version = '7,0,0,0';

			}

		document.writeln("<object name='"+name+"' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'");

		document.writeln(" codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="+version+"' ");

		document.writeln(" width='"+width+"' height='"+height+"'> ");

		document.writeln("<param name='movie' value='"+url_root+"'>");

		document.writeln("<param name='quality' value='high'>");

		document.writeln("<param name='FlashVars' value='url_es=es/&url_en=en/&url_fr=fr/'>");

		document.writeln("<param name='allowScriptAccess' value='always'>");

		document.writeln("<param name='bgcolor' value='#"+bgcolor+"'>");

		    if (bgcolor == null || bgcolor == 'FFFFFF'){

				document.writeln("<param name='wmode' value='transparent'>");

			}

		    document.writeln("<embed src='"+url_root+"' ");

		    if (bgcolor == null || bgcolor == 'FFFFFF'){

				document.writeln(" wmode='transparent' ");

			}

		document.writeln(" quality='high' bgcolor='#"+bgcolor+"'  width='"+width+"' height='"+height+"' ");

		document.writeln(" type='application/x-shockwave-flash' ");

		document.writeln(" pluginspage='http://www.macromedia.com/shockwav/download/index.cgi?P1_Prod_Version=ShockwaveFlash'>");

		document.writeln("</embed></object>");

}

		

		

function muestraMenu(menu){

	menu = document.getElementById(menu);

	menu.style.visibility = "visible";

}

function ocultaMenu(menu){

	menu = document.getElementById(menu);

	menu.style.visibility = "hidden";

}

function opcion(id){

	var texto = document.getElementById(id);

	if (texto.style.display == 'none'){

		texto.style.display = '';

		}else{

		texto.style.display = 'none';

		}

//	window.event.cancelBubble=true;

}


