function scaleImg(img){
  if(img){
    var width = img.width;
    var height = img.height;
    var factor = 1;
    if(width > height){
      if(width > 150){
        factor = parseFloat(150/width);
      }
    } else {
      if(height > 150){
        factor = parseFloat(150/height);
      }
    }
          
    height = parseInt(height * factor);
    if(!isNaN(height) && height <= 0){
        height = 1;
    }
    width = parseInt(width * factor);
    if(!isNaN(width) && width <= 0) {
        width = 1;
    }
    img.height = height;
    img.width = width;
  }
}

function scaleAllPresenterImg(){
  var imgs = document.getElementsByTagName('img');
  if(imgs){
    for(var i=0; i< imgs.length; i++){
      if(imgs[i].className == 'presenterimg'){
        scaleImg(imgs[i]);
      }
    }
  }
}

function openBioWindow(t){
  window.open(t);
  return false;
}

function openPresentation(t){
  window.open(t);
  return false;
}
