function featured_special(course_id,date,day,time,cart) {
  if (typeof(goto_hot_special) == "function") {
    goto_hot_special(course_id,date,day,time,cart)
  } else {
    window.location.href = live_url + "/teetimes/advanced?special=true&course_id=" + course_id + "&m_v=" + date + "&date=" + day + "&hour=" + time + "&cart=" + cart;
  }
}

var b;
function show_boxy(title,url,y, before_callback, after_callback) {
  b = new Boxy('<p style="width: 250px"><img src="/images/spinner.gif"/> Loading ...</p>', {title: title, unloadOnHide: true});
  if (typeof(before_callback) != "undefined") {
    eval(before_callback);
  } else {
    $(".boxy-wrapper").css("width","650px");
    b.center();    
  }

  if (typeof(y) != "undefined") b.moveToY(y);
  $.get(url,{title: name}, function(data) {
    b.setContent(data);
    if (typeof(after_callback) != "undefined") {
      eval(after_callback);
    } else {
      $(".boxy-wrapper").css("width","650px");
      if (typeof(y) == "undefined") 
        b.center();    
    }
  });
}
function before_map_callback() {
  $(".boxy-wrapper").css("width","910px");
  b.center();    
}
function after_map_callback() {
  $(".boxy-wrapper").css("width","930px");
  b.center();        
}
function CurrencyFormatted(amount)
{
  var i = parseFloat(amount);
  if(isNaN(i)) { i = 0.00; }
  var minus = '';
  if(i < 0) { minus = '-'; }
  i = Math.abs(i);
  i = parseInt((i + .005) * 100);
  i = i / 100;
  s = new String(i);
  if(s.indexOf('.') < 0) { s += '.00'; }
  if(s.indexOf('.') == (s.length - 2)) { s += '0'; }
  s = minus + s;
  return s;
}

