Ozein.MullerBalloon = Class.create();
Ozein.MullerBalloon.prototype = {
  initialize: function(node, options) {
    this.initialized = false;
    this.setOptions(options);
    var parts = document.getElementsByAttribute('ozein_muller_balloon', '*', node);
    for(var i=0; i<parts.length; ++i) {
      var partsName = parts[i].getAttribute('ozein_muller_balloon');
      var funcName = 'set'+partsName;
      if (this[funcName]) this[funcName](parts[i]);
    }
    this.initialized = true;
  },
  setOptions: function(options) {
    this.options = {
    }
    Object.extend(this.options, options || {});
  },
  setCheckNoBalloon: function(node) {
    Event.observe(node, 'click', this.checkNoBalloon.bindAsEventListener(this, node));
  },
  checkNoBalloon: function(e, node) {
      var check = node.checked;
      var cookie = new Ozein.Cookie(null,{name:'c_tou_fav_balloon',value:'1',expires:2592000000});
      if(check) {
          cookie.setCookie();
          Ozein.Invoker.var_stock['fd'].disableBalloon();
      }else{
          cookie.deleteCookie();
		  Ozein.Invoker.var_stock['fd'].enableBalloon();
      }
  },
  close: function() {
      Ozein.Invoker.var_stock['fd'].closeBalloon();
  }
}
