function breakout_of_frame()
{
  if (top.location != location) {
    top.location.href = document.location.href ;
  }
}

/* The JavaScript Source!! http://javascript.internet.com */

function fixImgs(whichId, maxW, maxH) {
  var pix=document.getElementById(whichId).getElementsByTagName('img');
  for (i=0; i<pix.length; i++) {
    w=pix[i].width;
    h=pix[i].height;
    if (w > maxW) {
      f=1-((w - maxW) / w);
      pix[i].width=w * f;
      pix[i].height=h * f;
    }
    if (h > maxH) {
      f=1-((h - maxH) / h);
      pix[i].width=maxW;
      pix[i].height=h * f;
    }
  }
}


function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

addLoadEvent(function() {
  fixImgs('resize', 140 , 70);  // ('element ID', maximum width)
});

