function ampliafotoHW(p_width,p_height,p_foto,p_img)
	{
p_width = parseInt(p_width)+30 ;
var p_height = parseInt(p_height) +110;

win = window.open("","ampliacio_foto","width="+p_width+",height="+p_height+",scrollbars=no");
if (win.opener == null) {	
win.opener = self; 
}
p_width= p_width - 30;
p_height = p_height - 110;
				win.document.write("<HTML>");
				win.document.write("<HEAD>");
				win.document.write("<TITLE>entitats.info</TITLE>");
				win.document.write("</HEAD>");
				win.document.write("<body bgcolor=\"#ffffff\" link=\"#666666\" alink=\"#ff6633\" vlink=\"#ff6633\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">");
				win.document.write("<center>");
				win.document.write("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">");
				win.document.write("<tr>");
				win.document.write("<td width=\"300\" bgcolor=\"#000000\"><img src=\"img/logo2.gif\"></td>");
				win.document.write("</tr>");
				win.document.write("</table>");
				win.document.write("<br>");
				win.document.write("<table border=\"0\"  width=\""+p_width+"\""+"vspace=\"0\" hspace=\"0\" align=\"center\" cellpadding=\"0\">");
				win.document.write("<tr>");
				win.document.write("<td><font size=\"1\" face=\"verdana, arial, helvetica, sans-serif\" color=\"#000000\">");
				win.document.write("<img src=\"" + p_img + "\" width=\""+p_width+"\" height=\""+p_height+"\" border=\"1\" vspace=\"5\">");
				win.document.write("<br>");
				if (p_foto != '') {
				win.document.write(" "+p_foto);
				}
				win.document.write("</font></td>");
				win.document.write("</tr>");
				win.document.write("<tr>");
				win.document.write("<td><font size=\"1\" face=\"arial, helvetica, sans-serif\" color=\"#ff6633\"><br><br>&copy; entitats.info 2002</font></td>");
				win.document.write("</tr>");
				win.document.write("</table>");
				win.document.write("</center>");
				win.document.write("</BODY>");
				win.document.write("</HTML>");
	}

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

function enviar(url) 
{
	var url=url;
//  document.location = url;
	open (url,'entitat');
}

function MM_findObj(n, d) { //v3.0
  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); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(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 MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}


function comprova(n,error) // n numero de inputs totals i error el missatge que s'envia
	{
	var n;
	var i;
	var control;
	var error;
	control = "0";
		for (i=0; i<=n; i++)
		{
		if (document.form.elements[i].value == "")
			{
			control = 1;
			}
		}
		if (control == '0')
			{
			document.form.submit();
			}
		else
			{
			alert (error);		
			}
	}

