function getViewportHeight() {    // Returns the height of the viewport
  if (top.window.outerHeight) // supported in Mozilla, Opera, and Safari
    return top.window.outerHeight;
  // supported in standards mode of IE, but not in any other mode
  if (top.window.document.documentElement.clientHeight > 0)
    //return (top.document.documentElement.clientHeight + 14);
    return (top.document.documentElement.clientHeight);
  // supported in quirks mode, older versions of IE, and Mac IE (anything else)
  return (top.document.body.clientHeight + 14);
}

function getViewportWidth() {    // Returns the width of the viewport
  if (top.window.outerWidth) // supported in Mozilla, Opera, and Safari
    return top.window.outerWidth;
  // supported in standards mode of IE, but not in any other mode
  if (top.window.document.documentElement.clientWidth > 0)
    //return (top.document.documentElement.clientWidth + 3);
    return (top.document.documentElement.clientWidth);
  // supported in quirks mode, older versions of IE, and Mac IE (anything else)
  return (top.document.body.clientWidth + 3);
}

HM_DOM = (document.getElementById) ? true : false;
HM_NS4 = (document.layers) ? true : false;
HM_IE = (document.all) ? true : false;
HM_IE4 = HM_IE && !HM_DOM;
HM_Mac = (navigator.appVersion.indexOf("Mac") != -1);
HM_IE4M = HM_IE4 && HM_Mac;
HM_Opera = (navigator.userAgent.indexOf("Opera")!=-1);
HM_Konqueror = (navigator.userAgent.indexOf("Konqueror")!=-1);
HM_IsMenu = !HM_Opera && !HM_IE4M && (HM_DOM || HM_NS4 || HM_IE4 || HM_Konqueror);
HM_BrowserString = HM_NS4 ? "NS4" : HM_DOM ? "DOM" : "IE4";

// if ((window.innerWidth > 800) && (window.innerHeight > 600)) {
var altura = getViewportHeight(), largura = getViewportWidth();
if ((largura > 800) && (altura > 600)) {
  var nfotos = 3; // Número de combinações de fotos
  var rnd = Math.round(Math.random() * nfotos);
  if (rnd == 0)
    rnd = 1;
  var foto= "/fotos/lateral" + rnd + ".jpg";
  if (HM_IE) {
    dimens = 'height="480"';
  } else {
    dimens = 'height="440"';
  }
  document.write ('<img style="overflow:hidden" vspace="0" ');
  document.write (dimens + ' width="224" hspace="0" src="' + foto + '" border="0">');
} else
  document.write ('&nbsp;');  

