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 abrir_popup(np,i,idg,titulo){
	m=new Control.Modal(false,{
		//overlayDisplay: false,
		opacity: 0.8,
		width: 600,
		height: 515,
		contents: function(){return '<div style="width:800px;height:515px;" id="flash5"></div>';},
		afterOpen: function(){cargar(np,i,idg,titulo);}
	});
	m.open();
//		contents: function(){return '<div style="width:800px;height:515px;"><div><img src="img/poptop.jpg" width="600" height="25"></div><div id="flash5"></div></div>';},
	
	function cargar(np,i,idg,titulo){
		var so5 = new SWFObject("swf/"+np, "mymovie", "800", "515", "8");
		so5.addVariable("id", i);
		so5.addVariable("idg", idg);
		so5.addVariable("titulo", titulo);
		so5.addParam("wmode", "transparent");
		so5.write("flash5");
	}
}

function abrir_popup2(np){
	m2=new Control.Modal(false,{
		//overlayDisplay: false,
		opacity: 0.8,
		width: 620,
		height: 530,
		contents: function(){return '<div style="width:620px;height:530px;text-align:center;background-color:#FFFFFF;border:1px solid #888888;"><table width="100%" height="100%" border="0" cellpaddind="0" cellspacing="0"><tr><td align="center" valign="middle"><div align="right" style="padding-right:10px;"><a href="javascript:m2.close();" style="text-decoration:none;font-family:verdana;font-size:9px;color:#333388">Cerrar</a></div><div style="width:600px;height:500px;border:1px solid #888888">'+np+'</div></td></tr></table></div>';}
	});
	m2.open();
	
}

function abrir_popup3(np){
	m3=new Control.Modal(false,{
		//overlayDisplay: false,
		opacity: 0.8,
		width: 445,
		height: 385,
		contents: function(){return '<div style="width:445px;height:385px;text-align:center;background-color:#FFFFFF;border:1px solid #888888;"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"><tr><td height="100%" align="center" valing="middle"><div align="right" style="padding-right:10px;"><a href="javascript:m3.close();" style="text-decoration:none;font-family:verdana;font-size:9px;color:#333388">Cerrar</a></div><div style="width:425px;height:355px;border:1px solid #888888">'+np+'</div></td></tr></table></div>';}
	});
	m3.open();
	
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function llamame(){
	m4=new Control.Modal(false,{
		//overlayDisplay: false,
		opacity: 0.8,
		width: 445,
		height: 260,
		contents: function(){return '<div style="width:445px;height:260px;text-align:center;background-color:#FFFFFF;border:1px solid #888888;"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"><tr><td height="100%" align="center" valing="middle"><div align="right" style="padding-right:10px;"><a href="javascript:m4.close();" style="text-decoration:none;font-family:verdana;font-size:9px;color:#333388">Cerrar</a></div><div style="width:425px;height:230px;border:1px solid #888888"><iframe frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="llamame.php" width="425" height="230"></iframe></div></td></tr></table></div>';}
	});
	m4.open();
	
}

function solicitar(idp){
	m5=new Control.Modal(false,{
		//overlayDisplay: false,
		opacity: 0.8,
		width: 445,
		height: 460,
		contents: function(){return '<div style="width:445px;height:460px;text-align:center;background-color:#FFFFFF;border:1px solid #888888;"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"><tr><td height="100%" align="center" valing="middle"><div align="right" style="padding-right:10px;"><a href="javascript:m5.close();" style="text-decoration:none;font-family:verdana;font-size:9px;color:#333388">Cerrar</a></div><div style="width:425px;height:430px;border:1px solid #888888"><iframe frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="solicitar.php?id='+idp+'" width="425" height="430"></iframe></div></td></tr></table></div>';}
	});
	m5.open();
	
}

function abrir_popup_c(m){
	mapa=new Array();
	mapa[1]='<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;hl=es&amp;geocode=&amp;q=Dr.+Trias+y+Pujol,+6+barcelona&amp;sll=37.0625,-95.677068&amp;sspn=41.818029,94.130859&amp;ie=UTF8&amp;t=h&amp;z=14&amp;ll=41.397801,2.127571&amp;output=embed&amp;s=AARTsJqz4ve1YntlSQZo0zg1H8LWc9DyxA"></iframe>';
	mapa[2]='<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;hl=es&amp;geocode=&amp;q=Av.+de+l%E2%80%99Estaci%C3%B3,+62+lleida&amp;sll=43.010673,-2.197266&amp;sspn=4.843535,11.766357&amp;ie=UTF8&amp;t=h&amp;z=14&amp;iwloc=addr&amp;ll=42.247962,0.969715&amp;output=embed&amp;s=AARTsJpHUuX1-aDVY_uruQcNugHz2zlzww"></iframe>';
	mapa[3]='<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;hl=es&amp;geocode=&amp;q=major,+56+parets+del+valles&amp;sll=41.573551,2.233794&amp;sspn=1.238962,2.941589&amp;ie=UTF8&amp;ll=41.549315,2.27211&amp;spn=0.019369,0.045962&amp;t=h&amp;z=14&amp;iwloc=addr&amp;output=embed&amp;s=AARTsJoSUAXiShK_VJJaz-4d3jqWZGOh3Q"></iframe>';
	mapa[4]='<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;hl=es&amp;geocode=&amp;q=Joan+Molins+Pareraesquina+riera+del+mig,+palleja&amp;sll=41.417058,1.998911&amp;sspn=0.004852,0.011491&amp;ie=UTF8&amp;ll=41.417194,1.99801&amp;spn=0.004852,0.011491&amp;t=h&amp;z=17&amp;output=embed&amp;s=AARTsJoyqclr7dbEfndZiUggyNOl19NVMw"></iframe>';
	mapa[5]='<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;hl=es&amp;geocode=&amp;q=Arquebisbe+Josep+Pont+y+Gol,+1+tarragona&amp;sll=41.417243,1.997784&amp;sspn=0.004852,0.011491&amp;ie=UTF8&amp;t=h&amp;z=14&amp;iwloc=addr&amp;ll=41.131155,1.241112&amp;output=embed&amp;s=AARTsJo3zCqI-z2UupOHHV_wZTEZTgCQRg"></iframe>';
	mapa[6]='<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;hl=es&amp;geocode=&amp;q=leon+13,+19+zaragoza&amp;sll=40.711125,0.584293&amp;sspn=0.009808,0.022981&amp;ie=UTF8&amp;t=h&amp;z=14&amp;iwloc=addr&amp;ll=41.652393,-0.88131&amp;output=embed&amp;s=AARTsJongUfEgVmQ7dIBs5p-9m1-zIp8hw"></iframe>';
	mapa[7]='<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;hl=es&amp;geocode=&amp;q=Avda.+Bar%C3%B3n+de+Warsage,+6+Calatayud&amp;sll=41.644821,-0.885531&amp;sspn=0.009669,0.022981&amp;ie=UTF8&amp;t=h&amp;z=14&amp;iwloc=cent&amp;ll=41.361607,-1.632414&amp;output=embed&amp;s=AARTsJqLZt8BapVXVFfZOB3O1p7DzTBFcg"></iframe>';
	mc=new Control.Modal(false,{
		//overlayDisplay: false,
		opacity: 0.8,
		width: 435,
		height: 400,
		contents: function(){return '<div style="width:435px;height:400px;text-align:center;background-color:#FFFFFF;border:1px solid #888888;"><table width="100%" height="100%" border="0" cellpaddind="0" cellspacing="0"><tr><td align="center" valign="middle"><div align="right" style="padding-right:10px;"><a href="javascript:mc.close();" style="text-decoration:none;font-family:verdana;font-size:9px;color:#333388">Cerrar</a></div><div style="width:425px;height:350px;border:1px solid #888888">'+mapa[m]+'</div></td></tr></table></div>';}
	});
	mc.open();
	
}