// JavaScript Document



function checkbox_checker4()
{

// set var checkbox_choices to zero

var checkbox_choices = 0;

// Loop from zero to the one minus the number of checkbox button selections
for (counter = 0; counter < AddToCart.checkbox.length; counter++)
{

// If a checkbox has been selected it will return true
// (If not it will return false)
if (AddToCart.checkbox[counter].checked)
{ checkbox_choices = checkbox_choices + 1; }

}


if (checkbox_choices > 4 )
{
// If there were more than three selections made display an alert box 
msg="You're limited to 1, 2 or 4 selections.\n"
msg=msg + "You have made " + checkbox_choices + " selections.\n"
alert(msg)
return (false);
}

if (checkbox_choices == 0 )
{
// If there were more than three selections made display an alert box 
msg="You're limited to 1, 2 or 4 selections.\n"
msg=msg + "You have made " + checkbox_choices + " selections.\n"
alert(msg)
return (false);
}

if (checkbox_choices == 3 )
{
// If there were more than three selections made display an alert box 
msg="You're limited to 1, 2 or 4 selections.\n"
msg=msg + "You have made " + checkbox_choices + " selections.\n"
alert(msg)
return (false);
}


return (true);
}






function checkbox_checker1()
{

// set var checkbox_choices to zero

var checkbox_choices = 0;

// Loop from zero to the one minus the number of checkbox button selections
for (counter = 0; counter < AddToCart.checkbox.length; counter++)
{

// If a checkbox has been selected it will return true
// (If not it will return false)
if (AddToCart.checkbox[counter].checked)
{ checkbox_choices = checkbox_choices + 1; }

}


if (checkbox_choices > 1 )
{
// If there were more than three selections made display an alert box 
msg="You're limited to 1 selection.\n"
msg=msg + "You have made " + checkbox_choices + " selections.\n"
alert(msg)
return (false);
}

if (checkbox_choices == 0 )
{
// If there were more than three selections made display an alert box 
msg="You're limited to 1 selection.\n"
msg=msg + "You have made " + checkbox_choices + " selections.\n"
alert(msg)
return (false);
}


return (true);
}
