function gallery(id,c1,c2)
	{ win=window.open('public.php?action=muestra_pfs&m=gallery&id='+id+'&c1='+c1+'&c2='+c2,'PFS','status=1, toolbar=0,location=0,directories=0,menuBar=0,resizable=1,scrollbars=yes,width=754,height=512,left=32,top=16'); win.focus();}

function pfs(id,c1,c2)
	{ win=window.open('public.php?action=muestra_pfs&c1='+c1+'&c2='+c2,'PFS','status=1, toolbar=0,location=0,directories=0,menuBar=0,resizable=1,scrollbars=yes,width=754,height=512,left=32,top=16');win.focus(); }

function help(rcode,c1,c2,lang)
	{ win=window.open('public.php?action=muestra_plug&idioma='+lang+'&h='+rcode+'&c1='+c1+'&c2='+c2,'Help','toolbar=0,location=0,directories=0,menuBar=0,resizable=0,scrollbars=yes,width=510,height=512,left=32,top=16'); win.focus();}

function comments(rcode,lang,sid)
	{ win=window.open('public.php?action=muestra_comments&idioma='+lang+'&sid='+sid+'&id='+rcode,'Comments','toolbar=0,location=0,directories=0,menuBar=0,resizable=0,scrollbars=yes,width=510,height=512,left=16,top=16'); win.focus();}

function ratings(rcode)
	{ win=window.open('public.php?action=muestra_ratings&id='+rcode,'Ratings','toolbar=0,location=0,directories=0,menuBar=0,resizable=0,scrollbars=yes,width=510,height=512,left=16,top=16');win.focus(); }

function polls(rcode,lang,sid)
	{ win=window.open('public.php?action=muestra_polls&idioma='+lang+'&sid='+sid+'&id='+rcode,'Polls','toolbar=0,location=0,directories=0,menuBar=0,resizable=0,scrollbars=yes,width=608,height=448,left=16,top=16');win.focus(); }

function pollvote(rcode,rvote,lang,sid)
	{ win=window.open('public.php?action=muestra_polls&idioma='+lang+'&sid='+sid+'&a=send&id='+rcode+'&vote='+rvote,'Polls','toolbar=0,location=0,directories=0,menuBar=0,resizable=0,scrollbars=yes,width=608,height=448,left=16,top=16');win.focus(); }

function picture(url,sx,sy)
	{ win=window.open('public.php?action=muestra_pfs&m=view&id='+url,'Picture','toolbar=0,location=0,directories=0,menuBar=0,resizable=1,scrollbars=yes,width='+sx+',height='+sy+',left=0,top=0');win.focus(); }

function cac(td,idTD){
if(document.getElementById||(document.all && !(document.getElementById))){
td.bgColor="#ffffff";
//document.getElementById(idTD).style.color = "#ffffff";
document.getElementById(idTD).style.backgroundColor = "#6a9dd6";
document.getElementById(idTD).style.cursor = 'hand';
}
}

function cdes(td,idTD){
if(document.getElementById||(document.all && !(document.getElementById))){
td.bgColor="#f5f5f5";
//document.getElementById(idTD).style.color = "#333333";
document.getElementById(idTD).style.backgroundColor = "#f4a606";
document.getElementById(idTD).style.cursor = 'default';
}
}
function cdes2(td,idTD){
if(document.getElementById||(document.all && !(document.getElementById))){
td.bgColor="#f5f5f5";
//document.getElementById(idTD).style.color = "#333333";
document.getElementById(idTD).style.backgroundColor = "#ffffff";
document.getElementById(idTD).style.cursor = 'default';
}
}
function colorLink(idLink,color){
				 if ( document.getElementById || ( document.all && !(document.getElementById) ) ) {
				       document.getElementById(idLink).style.color = (color);
				 }
}



function clink(url) {
	location.href=url;
	// per si ens hem de referir a un FRAME
	//parent.????.location.href=url;
}

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_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_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_jumpMenu(targ,selObj,restore){ //v3.0
if(selObj.options[selObj.selectedIndex].value)
{
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  }
  if (restore) selObj.selectedIndex=0;
}



function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function openChromeslessWindow(openUrl, winName, wWidth, wHeight, wPosx, wPosy, wTIT,
												windowBORDERCOLOR, windowBORDERCOLORsel, windowTITBGCOLOR, windowTITBGCOLORsel,
													bCenter, sFontFamily, sFontSize, sFontColor){
	
	openchromeless(openUrl,winName, wWidth, wHeight, wPosx, wPosy, wTIT, wTIT ,
							windowBORDERCOLOR, windowBORDERCOLORsel, windowTITBGCOLOR, windowTITBGCOLORsel,
								bCenter, sFontFamily, sFontSize, sFontColor);
}
function linca(URL)
{
	win=window.open(URL,'CBGIRONA');
}
function canvia_foto(foto)
{
document.all.la_foto.src="foto.php?foto="+foto+"&base=226";
}

var win = null;
function NewWindow(mypage,myname,w,h,scr){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',resizable=no'
if(scr)settings +=",scrollbars=yes";
win = window.open(mypage,myname,settings)
win.focus();
}