function add_to_cart(form_id) {
  var url = "sc.add_to_quote.php";
  if (typeof form_id == "undefined") {
    form_id = "product_form";
  }
  all_nodes = Form.getElements(form_id);
  var elements = document.getElementById(form_id);
  var params = "";
  for(i = 0; i < elements.length; i++) {
    if (elements[i].value == "select" || elements[i].value == "") {
      alert('Hey!');
      return false;
    }
    params += elements[i].name + "=" + elements[i].value + "&";
  }
  //var params = Form.serialize("product_form");
  var ajax = new Ajax.Updater({success: 'cart_div'}, url, {method: 'get', parameters: params, onFailure: report_error});
  hs.htmlExpand(document.getElementById("cart_link"), { contentId: 'highslide-html' } )
}

function report_error(request) {
  $('report_error_div').innerHTML = "Error";
}

function clear_cart() {
  var url = "sc.clear.php";
  var params = "";
  var ajax = new Ajax.Updater({success: 'cart_div'}, url, {method: 'get', parameters: params, onFailure: report_error});
}

function get_quote() {
  var url = "sc.get_quote.php";
  var params = Form.serialize("get_quote_form");
  var ajax = new Ajax.Updater({success: 'get_quote_message'}, url, {method: 'get', parameters: params, onFailure: report_error});
}