function getPage(page, replace) {
  $.ajax({
    url: page,
    type: "POST",
    dataType: "html",
    error: function(xhr, desc, exception) {
      alert('error loading [' + page + ']');
    },
    success: function(html){
      $(replace).html(html);
    }
  });
}

// ajax replace en thickbox re-attach
function getPageTb(page, replace) {
    $.ajax({
      url: page,
      type: "POST",
      dataType: "html",
      error: function(xhr, desc, exception) {
        alert('error loading [' + page + ']');
      },
      success: function(html){
        $(replace).html(html);
        //re-attach thickbox
        tb_init(replace+' a.thickbox,'+replace+' area.thickbox,'+ replace + ' input.thickbox');
      }
    });
}

function getFunc(page) {
    $.ajax({
      url: page,
      type: "POST",
      dataType: "html",
      error: function(xhr, desc, exception) {
        alert('error loading [' + page + ']');
      },
      success: function(html){
      }
    });
  }

// synchone ajax call
function getSynPage(page, replace) {
    $.ajax({
      url: page,
      type: "POST",
      async: false,
      dataType: "html",
      error: function(xhr, desc, exception) {
        alert('error loading [' + page + ']');
      },
      success: function(html){
        $(replace).html(html);
      }
    });
  }

  function getSynPageTb(page, replace) {
    $.ajax({
      url: page,
      type: "POST",
      async: false,
      dataType: "html",
      error: function(xhr, desc, exception) {
        alert('error loading [' + page + ']');
      },
      success: function(html){
        $(replace).html(html);
        //re-attach thickbox
        tb_init(replace+' a.thickbox,'+replace+' area.thickbox,'+ replace + ' input.thickbox');
      }
    });
  }


// synchrone ajax call without page update/replace
function getSynFunc(page) {
    $.ajax({
      url: page,
      type: "POST",
      async: false,
      dataType: "html",
      error: function(xhr, desc, exception) {
        alert('error loading [' + page + ']');
      },
      success: function(html){
      }
    });
  }


