function PostConfirm() {

  if (typeof PostConfirm._initialized == "undefined") {

    PostConfirm.prototype.init = function () {
      this.initContactMethods();
    }

    PostConfirm.prototype.initContactMethods = function () {
      var contact_methods = document.getElementById('contact_methods');
      if (contact_methods) {
        var myChecks = contact_methods.getElementsByTagName('input');

        for (i=0;i<myChecks.length;i++) {
          myChecks[i].pageObj = this;
          addEvent(myChecks[i], 'click', this.processContactMethods, false);
        }
        this.processContactMethods(null,contact_methods);
      }
    }

    PostConfirm.prototype.processContactMethods = function (e,parentEl) {
      var rowStyle = "list-item";

      var el = null;
      if (parentEl) {
        var myRadios = parentEl.getElementsByTagName("input");

        for (i=0;i<myRadios.length;i++) {
          if(myRadios[i].checked) {
            el = myRadios[i];
          }
        }
      } else {
        el = getTarget(e);
      }

      if (!el) {
        return;
      }

      var pageObj = (this.pageObj) ? this.pageObj : el.pageObj;
      var pieces = splitElId(el);

      switch (pieces[2]) {
        case "anon":
          changeStyle("anon_prompt_row","display",rowStyle);
          changeStyle("display_prompt_row","display","none");
          pageObj.hideMethodForm();
          break;
        case "display":
          changeStyle("anon_prompt_row","display","none");
          changeStyle("display_prompt_row","display",rowStyle);
          pageObj.showMethodForm();
          break;
      }
    }

    PostConfirm.prototype.closeBothForms = function () {
      //function for when both forms to be closed as for 'phonebook'
      changeStyle("business_add_fs","display","none");
      changeStyle("contact_method_fs","display","none");

    }

    PostConfirm.prototype.changeToMethodForm = function (rowStyle) {
      changeStyle("business_add_fs","display","none");
      changeStyle("contact_method_fs","display","block");

      this.initContactMethods();
    }

    PostConfirm.prototype.changeToBizAddForm = function (rowStyle) {
      changeStyle("contact_method_fs","display","none");
      changeStyle("business_add_fs","display","block");
    }

    PostConfirm.prototype.showMethodForm = function (rowStyle) {
      var rowStyle = (rowStyle) ? rowStyle : "list-item";

      changeStyle("contact_email_row","display",rowStyle);
      changeStyle("contact_phone_row","display",rowStyle);
    }

    PostConfirm.prototype.hideMethodForm = function () {
      changeStyle("contact_email_row","display","none");
      changeStyle("contact_phone_row","display","none");
    }

    PostConfirm._initialized = true;
  }
}

function initPage_obj() {
  post_obj.init();
}



