

  function Mostra(sat)
	    {   
			var n_sats = sats[sat]['telefono'].length;
	        var col1_obj1 = document.getElementById("titol_sat");
			col1_obj1.innerHTML = sats[sat]['titulo'];
			var tblBody = document.getElementById("taula_sat").tBodies[0];

		   while (tblBody.rows.length>0){
				var DelRow =  tblBody.deleteRow(0);
		   }

		  for(i=0; i< n_sats; i++){
			  var newRow1 = tblBody.insertRow(0);
			  var newRow2 = tblBody.insertRow(1);
			  var newRow3 = tblBody.insertRow(2);
			  /*newRow1.height = "65px";
			  newRow2.height = "65px";*/
			  newRow3.height = "1px";
		      
			  
			  var newCell0 = newRow1.insertCell(0);
			/*  newCell0.width = "70px";*/
			  newCell0.innerHTML = sats[sat]['nombres'][i];
			  var newCell1 = newRow1.insertCell(1);
			  newCell1.innerHTML = sats[sat]['direcciones'][i]+' '+sats[sat]['cp'][i]+'<br/>'+sats[sat]['provincia'][i];
			 
			 
			  
			  var newCell2 = newRow2.insertCell(0);
			  newCell2.innerHTML = sats[sat]['telefono'][i];
			 
			  var newCell3 = newRow2.insertCell(1);


			   /*newCell3.width = "100px";
			   newCell3.align = "right";*/
			  newCell3.innerHTML = sats[sat]['fax'][i];
			  
			  var newCell4 = newRow3.insertCell(0);
		    	 newCell4.colSpan="2";
				 newCell4.className = "separadorsat";
		  }

		  var numero = tblBody.rows.length

	        } 		 

function insertSimpleFlash(url,w,h){
var str='';
str+='<object width="'+ w +'" height="'+ h +'">';
str+='<param name="movie" value="'+url+'" />';
str+='<param name="quality" value="high" />';
str+='<param name="wmode" value="opaque" />';
//str+='<param name="wmode" value="transparent" />';
str+='<param name="menu" value="false" />';
str+='<param value="exactfit" name="scale" />';
str+='<param name="swliveconnect" value="true">';
str+='<embed src="'+url+'" quality="high" swliveconnect="true"  scale="exactfit" menu="false" wmode="opaque" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" allowScriptAccess="sameDomain" width="'+ w +'" height="'+ h +'"></embed>';
str+='</object>';
document.write(str);
}

var menu_pais = false;
function desplega_paises(){
	if(menu_pais == false){
		document.getElementById('bt_desplega').src = 'img/bt_desplegapaises1.gif';
		document.getElementById('llistat_paises').className = 'desplegats';
		menu_pais = true;
	} else {
		document.getElementById('llistat_paises').scrollTop = 0;
		document.getElementById('bt_desplega').src = 'img/bt_desplegapaises0.gif';
		document.getElementById('llistat_paises').className = 'llistat';
		menu_pais = false;
	}
}

function canvia_idioma(quin,apartat,seccio){
	document.location.href = "index.php?id="+quin+"&familia="+apartat+"&seccio="+seccio;
}

var clockid=new Array()
var clockidoutside=new Array()
var i_clock=-1
var thistime= new Date()
var hours=thistime.getHours()
var minutes=thistime.getMinutes()
var seconds=thistime.getSeconds()
if (eval(hours) <10) {hours="0"+hours}
if (eval(minutes) < 10) {minutes="0"+minutes}
if (seconds < 10) {seconds="0"+seconds}
var thistime = hours+":"+minutes+":"+seconds
	
function writeclock() {
	i_clock++
	if (document.all || document.getElementById || document.layers) {
		clockid[i_clock]="clock"+i_clock
		document.write("<span id='"+clockid[i_clock]+"'>"+thistime+"</span>")
	}
}

function clockon() {
	thistime= new Date()
	hours=thistime.getHours()
	minutes=thistime.getMinutes()
	seconds=thistime.getSeconds()
	if (eval(hours) <10) {hours="0"+hours}
	if (eval(minutes) < 10) {minutes="0"+minutes}
	if (seconds < 10) {seconds="0"+seconds}
	thistime = hours+":"+minutes
		
	if (document.all) {
		for (i=0;i<=clockid.length-1;i++) {
			var thisclock=eval(clockid[i])
			thisclock.innerHTML=thistime
		}
	}
	
	if (document.getElementById) {
		for (i=0;i<=clockid.length-1;i++) {
			document.getElementById(clockid[i]).innerHTML=thistime
		}
	}
	var timer=setTimeout("clockon()",1000)
}
window.onload=clockon