document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
	window.onmousedown=right;
	
function right(e) 
{
	if (navigator.appName == 'Netscape' &&
		(e.which == 3 || e.which == 2))
		return false;
	else if (navigator.appName == 'Microsoft Internet Explorer' &&
		(event.button == 2 || event.button == 3)) {
		alert("COPYRIGHT CURVYLICIOUS : Please don't copy our site content.");
		return false;
	} return true;
}

basketCost = 0;
basketNum = 0;
inBasket = "";
basketArray = new Array();
order = "";
basketString = "";

<!-- CODE ADDED 10-04-05 -->
function decPlace(price)
{

   if((price.toString()).indexOf(".") == -1)
   {
      price = price.toString() + ".00";
   }
   else
   {

      strPrice = price.toString();
      priceArray = strPrice.split(".");

      if(priceArray[1].length == 1)
      {
         price = priceArray[0] + "." + priceArray[1] + "0";
      }
   }

   return price;

}

function readCookie()
{

orderString = "<TABLE width='500px'>";
basketCost = 0;
basketNum = 0;

   if((document.cookie).indexOf("GENBASKET") != -1)
   {
       orderArray = document.cookie.split(";");

       for(j=0; j<orderArray.length; j++)
       {
		  if(orderArray[j].indexOf("GENBASKET") != -1)
		  {
		     order = orderArray[j];
		  }
       }

       fullArray = ((order.split("="))[1]).split("#");
       artArray = new Array();
       placeInArray = 0;

	   for(p=0; p<fullArray.length; p++)
	   {
	      if(fullArray[p] != "")
	      {
	      artArray[placeInArray] = fullArray[p];
	      placeInArray++;
	      }
	   }
	   
	   for(k=0; k<artArray.length; k++)
	   {

	      basketArray[k] = artArray[k];

	   }

      document.getElementById("BAG").innerHTML = basketString;
      writeCookie();
   }

}
<!-- -->

function updateBag()
{

   orderArray = document.cookie.split(";");

   for(j=0; j<orderArray.length; j++)
   {
	  if(orderArray[j].indexOf("GENBASKET") != -1)
	  {
		 order = orderArray[j];
	  }
   }

   fullArray = ((order.split("="))[1]).split("#");
   artArray = new Array();
   placeInArray = 0;

   for(p=0; p<fullArray.length; p++)
   {
	  if(fullArray[p] != "")
	  {
	  artArray[placeInArray] = fullArray[p];
	  placeInArray++;
	  }
   }

   for(k=0; k<artArray.length; k++)
   {
   
   
          if((artArray[k].split('/'))[0] != "")
          {
          quantityValue = "QUANT" + k;
	  basketArray[k] = (artArray[k].split('/'))[0] + "/" + (artArray[k].split('/'))[1] + "/" + document.getElementById(quantityValue).value + "/" + (artArray[k].split('/'))[3] + "/" + (artArray[k].split('/'))[4];
	  }

   }

   writeCookie();
   window.location.href="basket.php";

}

function removeItem(arrayNumber,size,colour,pID,quantity)
{
      
  //alert(basketArray[arrayNumber]);
  basketArray[arrayNumber] = "undefined";
  
	arrayContent = 0;

	chocChipCookie = "GENBASKET=";

	for(i=0; i<basketArray.length; i++)
	{

	if(basketArray[i] != "undefined")
	{
	chocChipCookie += basketArray[i] + "#"
	arrayContent++;
	}
	}

	chocChipCookie;

	if(arrayContent != 0)
	{
	document.cookie = chocChipCookie;
	}
	else
	{
	var kill_time = new Date("February 11, 1975");
	document.cookie = "GENBASKET=;expires=" + kill_time.toGMTString();
	document.getElementById("BAG").innerHTML = "<B>Shopping Basket</B> 0 item(s)";
	}  
  
  //window.location.href="stockUpdate.php?productID=" + pID + "&sizeID=" + size + "&colourID=" + colour + "&source=remove&quantity=" + quantity;

  writeCookie();
  window.location.href="basket.php";

}


function writeCookie()
{
arrayContent = 0;

chocChipCookie = "GENBASKET=";

	for(i=0; i<basketArray.length; i++)
	{

	   if(basketArray[i] != "undefined")
	   {
           chocChipCookie += basketArray[i] + "#"
           arrayContent++;
	   }
	}
	
	chocChipCookie;

    if(arrayContent != 0)
    {
    document.cookie = chocChipCookie;
    }
    else
    {
    var kill_time = new Date("February 11, 1975");
    document.cookie = "GENBASKET=;expires=" + kill_time.toGMTString();
    document.getElementById("BAG").innerHTML = "<B>Shopping Basket</B> 0 item(s)";
    }

}

function emptyBag()
{
    var kill_time = new Date("February 11, 1975");
    document.cookie = "GENBASKET=;expires=" + kill_time.toGMTString();
 
    window.location.href="basket.php";
}

function addToFavorites() 
{

urlAddress = "http://www.curvylicious.co.uk"; 
pageName = "CURVYLICIOUS";

	if(window.external) 
	{ 
	window.external.AddFavorite(urlAddress,pageName) 
	} 
	else 
	{ 
	alert("Sorry! Your browser doesn't support this function."); 
	} 
}