//#################################
//HBO Statistik-Code PageImpression
//#################################
 
document.write("<div id=\"hbostatpi\"><\/div>");
document.write("<div id=\"hbostatpo\"><\/div>");
document.write("<div id=\"ivwstat\"><\/div>");

var hbo_timestamp = new Date().getTime();

function hbo_stat_pi(hbo_referrer, hbo_sitename, hbo_timestamp, hbo_modulID) {

  if (hbo_referrer == "") hbo_referrer = "unknown";
  var hbo_browser = navigator.userAgent;
  var status_modulID = "parameter";

if (!hbo_modulID)
  {
  status_modulID = "searched";
  if (hbo_sitename == "http://www.baunet.de/") hbo_modulID = 600001;
  if (hbo_sitename.indexOf("http://www.baunet.de/index.html") != -1) hbo_modulID = 600001;
  if (hbo_sitename.indexOf("http://www.baunet.de/search.html") != -1) hbo_modulID = 601000;
  if (hbo_sitename.indexOf("herstellerlinks.html#companies") != -1) hbo_modulID = 601000;
  if (hbo_sitename.indexOf("produktlinks.html#products") != -1) hbo_modulID = 601000;
  if (hbo_sitename.indexOf("ausschreibungslinks.html#specs") != -1) hbo_modulID = 601000;
  if (hbo_sitename.indexOf("produktgruppenlinks.html#categories") != -1) hbo_modulID = 601000;
  if (hbo_sitename.indexOf("http://www.baunet.de/news") != -1) hbo_modulID = 502000;
  if (hbo_sitename.indexOf("http://www.baunet.de/bg") != -1) hbo_modulID = 601000;
  if (hbo_sitename.indexOf("http://www.baunet.de/begriff") != -1) hbo_modulID = 601000;
  if (hbo_sitename.indexOf("http://www.baunet.de/impressum.html") != -1) hbo_modulID = 600050;
}

  if (!hbo_modulID) hbo_modulID = 608999;

  //document.getElementById('hbostatpi').innerHTML = "<img src='http://www.ais-online.de/6/graphics/hbo_pi.gif?time=" + hbo_timestamp + "&browser=" + hbo_browser + "&modulid=" + hbo_modulID + "&sitename=" + hbo_sitename + "&referrer=" + hbo_referrer + "' width='1' height='1'>";
  document.getElementById('ivwstat').innerHTML = "<img src='http://aisonl.ivwbox.de/cgi-bin/ivw/CP/00" + hbo_modulID + "-001;ais_1?r=" + escape(hbo_referrer) + "&d=" + hbo_timestamp + "' width='1' height='1'>";
  if (window.console) { console.log("hbo_pi: " + hbo_timestamp + " " + hbo_sitename + " " + hbo_modulID + " " + status_modulID); }
}

//#############################
//HBO Statistik-Code PageObject
//#############################

function hbo_stat_po_with_time(hbo_obid, hbo_baumid, hbo_type, hbo_obid_company, timestamp_call) {
    hbo_stat_po(hbo_obid, hbo_baumid, hbo_type, timestamp_call, hbo_obid_company);
}

function hbo_stat_po_without_time(hbo_obid, hbo_baumid, hbo_type, hbo_obid_company) {
    hbo_stat_po(hbo_obid, hbo_baumid, hbo_type, hbo_timestamp, hbo_obid_company);
}

function hbo_stat_po(hbo_obid, hbo_baumid, hbo_type, timestamp_call, hbo_obid_company) {
  if (!hbo_baumid) hbo_baumid = "";
  if (!hbo_type) hbo_type = "";
  if (!hbo_obid_company) hbo_obid_company = "";

  //document.getElementById('hbostatpo').innerHTML = "<img src='http://www.ais-online.de/6/graphics/hbo_po.gif?time=" + timestamp_call + "&objectid=" + hbo_obid + "&baumid=" + hbo_baumid + "&pobKey=" + hbo_type + "&hbo_obid_company=" + hbo_obid_company + "' width='1' height='1'>";
  if (window.console) { console.log("hbo_po: " + timestamp_call + " Typ:" + hbo_type + " Objekt:" + hbo_obid + " Baum:" + hbo_baumid + " Firma:" + hbo_obid_company + " " + timestamp_call); }
}

function hbo_stat_zoom(hbo_obid, hbo_obid_company) {
  var hbo_timestamp_zoom1 = new Date().getTime();
  hbo_stat_pi(document.referrer, document.URL, hbo_timestamp_zoom1, null);
  hbo_stat_po(hbo_obid, null, "FirmenObjekt", hbo_timestamp_zoom1, hbo_obid_company);
}
