function DadesPlaca(action, id, idunic)
{
	correcte=true;
	switch(action)
	{
		case "delcole":
			document.getElementById('IC'+idunic).src="http://www.xapes.net/imatges/red.gif";
			// canvi URL
			document.getElementById('LC'+idunic).href="javascript:DadesPlaca('addcole','"+id+"','"+idunic+"')";
		break;
		case "addcole":
			document.getElementById('IC'+idunic).src="http://www.xapes.net/imatges/green.gif";
			document.getElementById('LC'+idunic).href="javascript:DadesPlaca('delcole','"+id+"','"+idunic+"')";
		break;
		case "delrepe":
			document.getElementById('IR'+idunic).src="http://www.xapes.net/imatges/red.gif";
			// canvi URL
			document.getElementById('LR'+idunic).href="javascript:DadesPlaca('addrepe','"+id+"','"+idunic+"')";
		break;
		case "addrepe":
			document.getElementById('IR'+idunic).src="http://www.xapes.net/imatges/green.gif";
			document.getElementById('LR'+idunic).href="javascript:DadesPlaca('delrepe','"+id+"','"+idunic+"')";
		break;
		case "addint":
			document.getElementById('II'+idunic).src="http://www.xapes.net/imatges/intnom.gif";
			document.getElementById('LI'+idunic).href="javascript:DadesPlaca('delint','"+id+"','"+idunic+"')";
		break;
		case "delint":
			document.getElementById('II'+idunic).src="http://www.xapes.net/imatges/intno.gif";
			document.getElementById('LI'+idunic).href="javascript:DadesPlaca('addint','"+id+"','"+idunic+"')";
		break;
		case "addbus":
			document.getElementById('IB'+idunic).src="http://www.xapes.net/imatges/icon_star_on.gif";
			document.getElementById('LB'+idunic).href="javascript:DadesPlaca('delbus','"+id+"','"+idunic+"')";
		break;
		case "delbus":
			document.getElementById('IB'+idunic).src="http://www.xapes.net/imatges/icon_star_off.gif";
			document.getElementById('LB'+idunic).href="javascript:DadesPlaca('addbus','"+id+"','"+idunic+"')";
		break;
		
	}
	if(correcte)
	{
		
		$('#capuser',parent.document).html("Carregant...");
		$.get('cap_user.inc.php?action='+action+'&idp='+id+'&idunic='+idunic,function(data)
		{
			$('#capuser',parent.document).html(data);
		});
		//XMLrqCap('cap_user.inc.php?action='+action+'&idp='+id+'&idunic='+idunic,'capuser');
	}
}