<!-- 
	
	function ShoppingCart( node ) {

		// node -   
		// node.parentNode.id - ID 

		path = '/'; list= 'shoppingcart';
		id = node.parentNode.id;

		node.value = node.value.replace( new RegExp("[^0-9]+"), "" );
		add = ( node.value > 0 );

		if( !add ) { node.value = ''; }
		node.style.color = "red";

		data = get_cookie(list);
		if( !data ) {
			str = ',';
		} else {
			str = ','+data+',';
		}

		template = new RegExp(","+id+":[0-9]+,") 
		if( add ) {
			if( !str.match(template) ) {
				str += id + ':' + node.value + ',';
			} else {
				str = str.replace(template, ','+id+':'+node.value+',');
			}
		} else {
			str = str.replace(template,',');
		}

		data = str.substring(1,str.length-1);

		set_cookie(list, data, path);

	}

	
	if (get_cookie('shoppingcart')) {

		var total = 0;

		shoppingcart = get_cookie('shoppingcart').split(',');

		if (document.all['ShoppingCart']) {

			if (document.all['ShoppingCart'].length) productlist = document.all['ShoppingCart'];
			else productlist = new Array(document.all['ShoppingCart']);

			price = 1;
			for( i = 0; i < productlist.length; i++ ) {
				for ( j = 0; j < shoppingcart.length; j++ ) {
					if( shoppingcart[j].indexOf(productlist[i].parentNode.id+":") != -1 ) {
						ind = shoppingcart[j].indexOf(":");
						productlist[i].value = shoppingcart[j].substring(ind+1);
						if( productlist[i].parentNode.price ) {
							price = productlist[i].parentNode.price.replace(new RegExp('^[^0-9]*([0-9]*\.?[0-9]+).*$'),"$1");
							price = price.replace(new RegExp(','),".");
							price = price.replace(new RegExp(' '),"");
							total += productlist[i].value * price;
						}
					}
				}
			}
		}
		if (document.all['totalPrice']) {
		    str = total.toString();
            	    if (str.match(/\./i)) total = parseFloat(str.substr(0,str.indexOf('.')+3));
 		    document.all['totalPrice'].innerText = total;
		}
	}

// -->


