function winHeight () {
  if (window.innerHeight) {
    return window.innerHeight;
  } else if (document.body && document.body.offsetHeight) {
    return document.body.offsetHeight;
  } else {
    return 0;
  }
}

/*----------------------------------------------------------------------------*/
function getRandomObject(id,cid,num) {
  var a; var dim = Element.iccGetDimensions(id);
  a = new Ajax.Updater(
    id,
    "app_icc/xt_obj_ajax_custom.asp?cmd=GETRANDOMOBJECT&cid="+cid+"&num="+num,
    {
      method: 'get',
      onLoading: function() {
        Indicator.show(dim.screenleft+70,dim.screentop+dim.height-50);
        setTimeout('Indicator.hide()',1000);
      },
      onSuccess: function(r) {
        Indicator.hide();
      },
      onFailure: function(r) {
        Indicator.hide(); alert("Testimonial konnte nicht geladen werden");
      }
    }
  );
}
function getRandomImage(id,cid,num) {
  var a; var dim = Element.iccGetDimensions(id);
  a = new Ajax.Updater(
    id,
    "app_icc/xt_obj_ajax_custom.asp?cmd=GETRANDOMIMAGE&cid="+cid+"&num="+num,
    {
      method: 'get',
      onLoading: function() {
      },
      onSuccess: function(r) {
      },
      onFailure: function(r) {
        alert("Bild konnte nicht geladen werden");
      }
    }
  );
}

/*----------------------------------------------------------------------------*/
function MenuOver(el) {
  if (!Element.hasClassName(el,'active')) {
    Element.addClassName(el,'highlight');
  }
}
function MenuOut(el) {
  if (!Element.hasClassName(el,'active')) {
    Element.removeClassName(el,'highlight');
  }
}
