function CountOptions(Limit)
{
	var check_limit = Limit;
	var check_count = 0;
	
	for (var i=0; i < document.AddItem.ItemOption.length; i++)
   {

   if (document.AddItem.ItemOption[i].checked)
      {
      
     	check_count ++;
      
      }
   }
 
	document.AddItem.OptionCount.value = check_count;
	
	if (check_count == check_limit)
	{
		document.getElementById("paypalbutton").style.visibility = "visible";	
		document.getElementById("optioncount1").innerHTML = "Click Add to Cart";
	}
	else
	{
		document.getElementById("paypalbutton").style.visibility = "hidden";
		document.getElementById("optioncount1").innerHTML = check_count + " items selected";
	}
	
}
   


function AddOptions()
{
	var check_value = "";
	var check_strLenght = 0;

	for (var i=0; i < document.AddItem.ItemOption.length; i++)
   
   {

   if (document.AddItem.ItemOption[i].checked)
      {
      
      check_value = check_value + document.AddItem.ItemOption[i].value + ", ";
      
      }
   }
   
   check_strLength = check_value.length - 2;
   check_value = check_value.substring(0,check_strLength);
   document.AddItem.os0.value = check_value;

}