var Obs = Class.create();
Obs.prototype = {

  initialize: function(){
    

  },

  init_plan: function(){

  },
  dep_check: function(){

    // Plan
    if (($('plan_entry_model').checked == true) || 
	($('plan_standard_model').checked == true)  ||
	($('plan_premium_model').checked == true) ){
      $('commit').disabled = false
    }

    //
    this.oyako($('admtool'),$('web_build'));
    this.oyako($('admtool'),$('mail_build'));
    this.oyako($('admtool'),$('dns_build'));

    this.oyako($('server_manage'),$('ppr_watch'));
    this.oyako($('server_manage'),$('backup'));
    this.oyako($('server_manage'),$('backup_qua'));
    
  },

  confl_check: function(){
    //    this.dan($('server_manage'),$('p_watch'));
    this.dan($('server_manage'),$('admtool'));
    this.dan($('ppr_watch'),$('p_watch'));

    this.dep_check();
  },


  oyako: function(oya,ko){
    if(oya.checked == false){
      ko.checked = false;
      ko.disabled = true;
    }else{
      ko.disabled = false;
    }
  },

  dan: function(s,y){
    if(s.checked == true){
      y.checked = false;
      y.disabled = true;
    }else{
      y.disabled = false;
    }
  }


};

var obs;
function init(){
  obs = new Obs;

};

