//Ens retorna el element cistella (es el que conté el carret)
function cercaCistella (nom) {
	var cistella = document.getElementById(nom)
	if(!cistella)
	{
		/*  Mirem si tenim frames */ 
		for(a=0; a<document.frames.length;a++)
		{
			if (!cistella) cistella = document.frames[a].getElementById(nom);
		}

		/* Mirem si el parent te frames */
		if(!cistella)
		{
			for(a=0; a<parent.frames.length;a++)
			{
				if (!cistella) cistella = parent.frames[a].document.getElementById(nom);
			}
		}
	}

	if(cistella)
		return cistella;
	else
		return null;
}





/* FUNCIONS ANTIGUES */

//suma 1 al cuadre amb el num de productes
function sumar (obj) {obj.value = parseInt(obj.value) + 1;}

//resta 1 al cuadre amb el num de productes
function restar (obj) {
	if (parseInt(obj.value) > 0) {
	obj.value = parseInt(obj.value) - 1;
}}

//obre un pop-up 
function obre (obj) {
	window.open("../producto.asp?idProducto="+obj,'','width=370,height=295;');
}

//per a ficar un texte al status
function estado (msg) {
window.status = msg;
return true ;
}
