
function h3ajax_menu(id) { if($ajax_disable) return false; h3ajax_post('#contents', {op:'menuget', id:id}); return false; }
function h3ajax_prod(id) { if($ajax_disable) return false; h3ajax_post('#contents', {op:'prodget', id_product:id}); return false; }
function h3ajax_products(start,id_cat,id_designer) { if($ajax_disable) return false; h3ajax_post('#contents', {op:'products', start:start, id_cat:id_cat, id_designer:id_designer},null,null,'#contents'); return false; }
function h3ajax_designer(id) { if($ajax_disable) return false; h3ajax_post('#contents', {op:'designer', id_designer:id},null,null,'#contents'); return false; }

function h3ajax_post(container, params, post_function, post_params, wait_container, wait_message)
{
  if($ajax_disable) return false;
  if (wait_container)
  {
  if ( ! wait_message )
    wait_message = $wait_message;
    $(wait_container).block({ message: wait_message });
  }
  $.post($site_dir + "index_ajax.php", params,
    function(data){
      $(container).html(data);
      if (post_function)
        post_function(post_params);
      if (wait_container)
        $(wait_container).unblock();
    });
  return false;
}

var swlog_dbg=0;
var swlog_str='';
function swlog(str)     { if(swlog_str)swlog_str+="\n"; swlog_str+=str; }
function swlogShow(str) { if(str){if(swlog_str)swlog_str+="\n";swlog_str+=str;} if(swlog_dbg)alert(swlog_str); swlog_str=''; }
function swlogEnable()  { swlog_dbg=true; }
function swlogDisable() { swlog_dbg=false; }


