/* DON'T mess with the order of the flwg vars */
   var is_opera   = (window.opera) ? true : false;
   var is_safari  = (!is_opera && navigator.userAgent.toLowerCase().indexOf('applewebkit') != -1 && navigator.userAgent.toLowerCase().indexOf('khtml') != -1) ? true : false;
   var is_konq    = (!is_opera && !is_safari && (navigator.vendor == 'KDE' || (document.childNodes && !document.all && !navigator.taintEnabled))) ? true : false;
// opera/konqueror/safari are schizo: they think they are xPloder, Konqueror and/or Mozilla if I'm not careful with the flwg
   var is_dom     = (!is_opera && document.getElementById && document.createElement) ? true : false;
   var is_gecko   = (!is_opera && !is_konq && !is_safari && is_dom && navigator.product && (navigator.product.toLowerCase() == 'gecko')) ? true : false;
   var is_ie      = (!is_opera && !is_konq && document.all) ? true : false;
      var is_ie5  = (is_ie && navigator.userAgent.toLowerCase().substr(navigator.userAgent.toLowerCase().indexOf('msie ') + 5, 3) == '5.0') ? true : false;
      var is_ie55 = (is_ie && navigator.userAgent.toLowerCase().substr(navigator.userAgent.toLowerCase().indexOf('msie ') + 5, 3) == '5.5') ? true : false;
      var is_ie6  = (is_ie && navigator.userAgent.toLowerCase().substr(navigator.userAgent.toLowerCase().indexOf('msie ') + 5, 3) == '6.0') ? true : false;

   /* flwg 4 functions tnx to <http://www.quirksmode.org/viewport/compatibility.html> */
function getInnerHeight(windowObj)
{
   if (!windowObj)
      windowObj = self;

	// all except Explorer
   if (windowObj.innerHeight)
      return windowObj.innerHeight;
	// Explorer 6 Strict Mode
   else if (windowObj.document.documentElement && windowObj.document.documentElement.clientHeight)
      return windowObj.document.documentElement.clientHeight;
	// other Explorers
   else if (windowObj.document.body)
      return windowObj.document.body.clientHeight;
}
function getInnerWidth(windowObj)
{
   if (!windowObj)
      windowObj = self;

	// all except Explorer
   if (windowObj.innerWidth)
      return windowObj.innerWidth;
	// Explorer 6 Strict Mode
   else if (windowObj.document.documentElement && windowObj.document.documentElement.clientWidth)
      return windowObj.document.documentElement.clientWidth;
	// other Explorers
   else if (windowObj.document.body)
      return windowObj.document.body.clientWidth;
}

function getXploderEvent()
{
   if (is_ie5)    // 'Object doesn't support this property or method' -> top.frames[i].event
      return window.event;

/*
//    Tijdelijk buiten gebruik gesteld. Bij deze site werk ik niet meer met frames (alleen iframes) en dit lijkt IE ervan te weerhouden te scrollen

	// xPloder's event belongs to the frame rather than the top window, so to query events in frame A from frame B I first have to figger out the calling frame
   for (var i = 0; i < top.frames.length; i++)
      if (top.frames[i].event)
         return top.frames[i].event;
*/
   return window.event;
}

function sendToDevNull(event)
{
   if (is_ie)
   {
      window.event.returnValue  = false;
      window.event.cancelBubble = true;
      return;
   }

   event.preventDefault();
   event.stopPropagation();
}
