
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_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_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_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(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 getSWF(movieName) {
    if (navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName];
    }
    else {
      if(document[movieName].length != undefined){
          return document[movieName][1];
      }
        return document[movieName];
    }
}

function desplega(capa){
	
	valor=document.getElementById(capa);
	
			if(valor.style.visibility=="visible")
			{
				valor.style.visibility="hidden";
				valor.style.display="none";
				MM_swapImage('img_'+capa,'','imgs/fi_desp_off.gif',1);
			}
			else
			{
				valor.style.visibility="visible";
				valor.style.display="inline";
				MM_swapImage('img_'+capa,'','imgs/fi_desp_on.gif',1);
			}
			
	
			
}
function ShowHideCapa(capa,action){
	
	valor=document.getElementById(capa);
	
	if(action=="hide")
	{
		valor.style.visibility="hidden";
		valor.style.display="none";
	}
	else
	{
		valor.style.visibility="visible";
		valor.style.display="inline";
	}
			
	
			
}
function desplegaPagPlayers(capa,num){

	if(num == 1){
		document.getElementById('area_privada').style.visibility="visible";
		document.getElementById('area_privada').style.display="block";
	}else{
		document.getElementById('area_privada').style.visibility="hidden";
		document.getElementById('area_privada').style.display="none";
	}
	
	desplega(capa);
	
	capaFotos = "blocFotos" + num;
	if(eval("document.getElementById('blocFotos"+num+"')") != null){
		ensenya(capaFotos);
	}
	
	//pleguem les altres
	var i = 1;
	for(i = 1; i < 5; i++)
	{
		if(i != num)
		{
			//alert(eval("document.getElementById('blocFotos"+i+"')"));
			if(eval("document.getElementById('blocFotos"+i+"')") != null){
			valor2 = eval("document.getElementById('blocFotos"+i+"')");
			valor2.style.visibility="hidden";
			valor2.style.display="none";
			}
			
			
			valor3 = eval("document.getElementById('cont_desp_"+i+"')");
			valor3.style.visibility="hidden";
			valor3.style.display="none";
		}
	}
	
	
			
}
function ensenya(capa){
	
	valor=document.getElementById(capa);
			if(valor.style.visibility=="visible")
			{
				valor.style.visibility="hidden";
				valor.style.display="none";
			}else
			{
				valor.style.visibility="visible";
				valor.style.display="inline";
			}
}
function ShowPage(pagina,total,familia)
{
	for(i = 1; i <= total; i++)
	{
		valor= eval("document.getElementById('paginacio" + familia + "_" + i +"')");
		valor.style.visibility = "hidden";
		valor.style.display="none";
	}
	
		valor= eval("document.getElementById('paginacio" + familia + "_" + pagina +"')");
		valor.style.visibility = "visible";
		valor.style.display = "inline";
	
}
/*function ShowPageCoaches(pagina,total,familia)
{
	for(i = 1; i <= total; i++)
	{
		valor= eval("document.getElementById('paginacio" + familia + "_" + i +"')");
		valor.style.visibility = "hidden";
		valor.style.display="none";
	}
	
		valor= eval("document.getElementById('paginacio" + familia + "_" + pagina +"')");
		valor.style.visibility = "visible";
		valor.style.display = "inline";
	
}*/

function creafecha1(){
  hoy=new Date();
  dyear=hoy.getFullYear();
  dday=hoy.getDay();
  dmonth=hoy.getMonth();
  dnumday=hoy.getDate();
  dhour=hoy.getHours();
  dminutes=hoy.getMinutes();
  dseconds=hoy.getSeconds();
  
  dminutes += ''
  if(dminutes.length == 1){
	dminutes = '0' + dminutes;
  }
  
  if(dmonth==0){
   dmonth_t="Enero"
  }else if(dmonth==1){
   dmonth_t="Febrero"
  }else if(dmonth==2){
   dmonth_t="Marzo"
  }else if(dmonth==3){
   dmonth_t="Abril"
  }else if(dmonth==4){
   dmonth_t="Mayo"
  }else if(dmonth==5){
   dmonth_t="Junio"
  }else if(dmonth==6){
   dmonth_t="Julio"
  }else if(dmonth==7){
   dmonth_t="Agosto"
  }else if(dmonth==8){
   dmonth_t="Septiembre"
  }else if(dmonth==9){
   dmonth_t="Octubre"
  }else if(dmonth==10){
   dmonth_t="Noviembre"
  }else{
   dmonth_t="Diciembre"
  }

 if(dday==0){
   dday_t="Domingo"
  }else if(dday==1){
   dday_t="Lunes"
  }else if(dday==2){
   dday_t="Martes"
  }else if(dday==3){
   dday_t="Miércoles"
  }else if(dday==4){
   dday_t="Jueves"
  }else if(dday==5){
   dday_t="Viernes"
  }else{
   dday_t="Sábado"
  }

document.write(dday_t) 
document.write(" ") 
document.write(dnumday) 
document.write(" de ") 
document.write(dmonth_t) 
document.write(" ") 
document.write(dyear) 
document.write(" h. ") 
document.write(dhour) 
document.write(":")
document.write(dminutes) 
	
}


function creafecha2(){
  hoy=new Date();
  dyear=hoy.getFullYear();
  dday=hoy.getDay();
  dmonth=hoy.getMonth();
  dnumday=hoy.getDate();
  dhour=hoy.getHours();
  dminutes=hoy.getMinutes();
  dseconds=hoy.getSeconds();
  
  dminutes += ''
  if(dminutes.length == 1){
	dminutes = '0' + dminutes;
  }
  
  if(dmonth==0){
   dmonth_t="January"
  }else if(dmonth==1){
   dmonth_t="February"
  }else if(dmonth==2){
   dmonth_t="March"
  }else if(dmonth==3){
   dmonth_t="April"
  }else if(dmonth==4){
   dmonth_t="May"
  }else if(dmonth==5){
   dmonth_t="June"
  }else if(dmonth==6){
   dmonth_t="July"
  }else if(dmonth==7){
   dmonth_t="August"
  }else if(dmonth==8){
   dmonth_t="September"
  }else if(dmonth==9){
   dmonth_t="October"
  }else if(dmonth==10){
   dmonth_t="November"
  }else{
   dmonth_t="December"
  }

 if(dday==0){
   dday_t="Sunday"
  }else if(dday==1){
   dday_t="Monday"
  }else if(dday==2){
   dday_t="Tuesday"
  }else if(dday==3){
   dday_t="Wednesday"
  }else if(dday==4){
   dday_t="Thursday"
  }else if(dday==5){
   dday_t="Friday"
  }else{
   dday_t="Saturday"
  }

document.write(dday_t) 
document.write(" ") 
document.write(dnumday) 
if (dnumday == 1) document.write("st")
else if (dnumday == 2) document.write("nd")
else if (dnumday == 3) document.write("rd")
else document.write("th")
document.write(" ") 
document.write(dmonth_t) 
document.write(" ") 
document.write(dyear) 
document.write(" h. ") 
document.write(dhour) 
document.write(":")
document.write(dminutes) 
	
}


function creafecha(idioma)
  {
	  
if (idioma == "cas") creafecha1();
if (idioma == "eng") creafecha2();
if (idioma == "ita") creafecha2();
if (idioma == "rus") creafecha2();
if (idioma == "chi") creafecha2();
//setTimeout("creafecha()",1000);
}

//Highlight image script- By Dynamic Drive
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
//This credit MUST stay intact for use

function makevisible(cur,which){
strength=(which==0)? 1 : 0.5

if (cur.style.MozOpacity)
cur.style.MozOpacity=strength
else if (cur.filters)
cur.filters.alpha.opacity=strength*100
}

function lon(target)
{
	try {
		if (parent.visibilityToolbar)
			parent.visibilityToolbar.set_display("standbyDisplayNoControls");
	} catch (e) {}

	try {
		if (!target)
			target = this;

		if (!target._lon_disabled_arr)
			target._lon_disabled_arr = new Array();
		else if (target._lon_disabled_arr.length > 0)
			return true;

		target.document.getElementById("loaderContainer").style.display = "";
		var select_arr = target.document.getElementsByTagName("select");

		for (var i = 0; i < select_arr.length; i++) {
			if (select_arr[i].disabled)
				continue;

			select_arr[i].disabled = true;
			_lon_disabled_arr.pop(select_arr[i]);
			var clone = target.document.createElement("input");
			clone.type = "hidden";
			clone.name = select_arr[i].name;
			var values = new Array();
			for (var n = 0; n < select_arr[i].length; n++) {
				if (select_arr[i][n].selected) {
					values[values.length] = select_arr[i][n].value;
				}
			}
			clone.value = values.join(",");
			select_arr[i].parentNode.insertBefore(clone, select_arr[i]);
		}
	} catch (e) {
		return false;
	}
	return true;
}

function loff(target)
{
	try {
		if (parent.visibilityToolbar) {
			parent.visibilityToolbar.set_display(visibilityCount
												 ? "standbyDisplay"
												 : "standbyDisplayNoControls");
		}
	} catch (e) {}

	try {
		if (!target)
			target = this;

		target.document.getElementById("loaderContainer").style.display = "none";

		if (target._lon_disabled_arr) {
			while(_lon_disabled_arr.length > 0) {
				var select = _lon_disabled_arr.push();
				select.disabled = false;

				var clones_arr = target.document.getElementsByName(select.name);
				for (var n = 0; n < clones_arr.length; n++) {
					if ("hidden" == clones_arr[n].type)
						clones_arr[n].parent.removeChild(clones_arr[n]);
				}
			}
		}
	} catch (e) {
		return false;
	}
	return true;
}

function _body_onload()
{
	loff();
}


function _body_onunload()
{
	lon();
}