function quantityUp() {
  $('quantity').value = parseInt($('quantity').value) + 1;
}

function quantityDown() {
  if (parseInt($('quantity').value) > 1) {
    $('quantity').value = parseInt($('quantity').value) - 1;
  }
}

function checkSwitch() {
  if($('ccType').value == 'switch') {
    Effect.Appear('ccSwitch');
  } else {
    Effect.Fade('ccSwitch');
  }
}

function checkAgree() {
  if($('agree').checked == true) {
    $('submit').disabled = false;
  } else {
    $('submit').disabled = true;
  }
}

// function $(element) {
//   if (arguments.length > 1) {
//     for (var i = 0, elements = [], length = arguments.length; i < length; i++) {
//       elements.push($(arguments[i]));
//     }
//     return elements;
//   }
//   if (typeof(element) == 'string') {
//     element = document.getElementById(element);
//   }
//   return element;
// }

function quantityForm(value, formId) {
  $('itemQuantity' + formId).value = value;
  $('formQuantity' + formId).submit();
}

