
function getClientHeight()
{
  return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientHeight:document.body.clientHeight;
}
function getClientWidth()
{
  return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientWidth:document.body.clientWidth;
}
function resizeBody()
{
  var height = getClientHeight() - $('table.mtab').height();
  $('#mtblcont').css('height',$('#mtblcont').innerHeight()+height);
}

function getElemPosition(id)
{
  var elem = $('#'+id).get(0);
  var l = 0;
  var t = 0;
  var w = elem.offsetWidth;
  var h = elem.offsetHeihgt;
  while (elem)
  {
    l += elem.offsetLeft;
    t += elem.offsetTop;
    elem = elem.offsetParent;
  }
  return {"l":l,"t":t,"w":w,"h":h};
}

$(document).ready(function () {
$(window).bind("load", function(){resizeBody();});
$(window).bind("resize", function(){resizeBody();});
$("a.gallery").fancybox();

});
