
function php(func,target,opts)
{
  php_ajax_file = '/php_ajax.php';
   
  if ( jQuery(opts).is('form') ) {
    qstring='func='+func+'&opts='+escape($(opts).serialize());
  } else {
    qstring='func='+func+'&opts='+escape(opts);
  }
  $("*").css("cursor", "wait");
  $.ajax({
    async: false,
    type: 'POST',
    url: php_ajax_file,
    data: qstring,
    success: function(data) {
      if ( 'arg_func_required' == data ) alert("Argument 'func' manquant");
      else if ( 'func_not_exist' == data ) alert("Fonction php 'ajax_"+func+"' inexistante");
      else
      {
        $("*").css("cursor", "");
        if ( 'FALSE' == data ) {
          return false;
        }
        if ( 'calendar_change' == target ) {
          $("#cal_"+opts).removeClass('cal_day_0 cal_day_1 cal_day_2').addClass(data);
        } else if ( 'NULL' != target ) {
          $(target).html(data);
        }
        php_hooks(func,target,opts);
      }
    }
  });
}
   
function php_hooks(func,target,opts)
{
  if ( 'shop_catalogue_ssfamille' == func ) {
//    $.each(opts, function(index, value) { 
//      alert(index + ': ' + value); 
//    });
//    $(opts).eval();
//    alert(arg);
//    window.scrollTo(0, $("#link_detail_"+idx).position().top);
  }
}


