
/*
 *
 * Handle multiple clicks to a button.
 * Currently only handles on button per page.
 *
 */
var bClicked = false;

function SingleClick()
{
  if (bClicked)
  {
    return false;
  }
  else
  {
    bClicked = true;
    return true;
  }
}


/*
 *
 * Check that the control passed into the function
 * has the required state.
 *
 */
function CheckAgree()
{
	if (document.OrderConfirmation.chkTAndCConfirmation.checked)
	{
		return SingleClick();
	}
	else
	{
		alert("You must indicate your agreement with the Terms and Conditions to proceed with this purchase");
		
		// set focus to chkTAndCConfirmation
		document.OrderConfirmation.chkTAndCConfirmation.focus();
		return false;
	}
} 

function EnlargeImage(productId, width, height, suffix) {
  day = new Date();
  id = day.getTime();
  eval("page" + id + " = window.open('/ProductImage.aspx?ProdId="+productId+ "&suffix="+suffix+"', '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=" + width + ",height=" + height + "');");
}