function productController() 
{
  this.option = null;
  this.option_id = null;
  this.active_bullet_image = 'bullet_gold.gif';
  this.inactive_bullet_image = 'bullet_grey.gif';
  
  this.product_type = null;
  this.product_title = null;
  
  this.initialise = function() {
    this.option_id = default_option;
    this.updateOption();
  }
  
  this.set_option = function() {
    this.option_id = arguments[0];
    this.updateOption();
    this.updateBullets();
  }
  
  this.updateOption = function() {
    this.option = option[this.option_id];
  }
  
  this.updateBullets = function() {
    // set all to inactive
    var self = this;
    var bulletArray = document.getElementsByClassName('option_bullet');
    bulletArray.each(function(bullet) {
      var srcArray = bullet.src.split('/');
      srcArray.pop();
      srcArray.push(self.inactive_bullet_image);
      bullet.src = srcArray.join('/');      
    });
    // set bullet on active option
    var active_bullet = $('bullet_' + this.option_id);
    var srcArray = active_bullet.src.split('/');
    srcArray.pop();
    srcArray.push(self.active_bullet_image);
    active_bullet.src = srcArray.join('/');      
  }

}// function


function optionObj()
{
  this.id = arguments[0];
  this.price = arguments[1];
  this.label = arguments[2];
}
