//iframe automatic height adjuster!

function adjustIFrameSize (iframeWindow) {
  if (iframeWindow.document.height) {
  //alert(iframeWindow.document.height);
    var iframeElement = document.getElementById(iframeWindow.name);
    if(iframeWindow.document.height <= 420){
    iframeElement.style.height = 418+'px';
    } else {
        iframeElement.style.height = iframeWindow.document.height + 10 + 'px';
    }
  }
  else if (document.all) {
    var iframeElement = document.all[iframeWindow.name];
    if (iframeWindow.document.compatMode &&
        iframeWindow.document.compatMode != 'BackCompat') 
    {
        if(iframeWindow.document.documentElement.scrollHeight <= 420){
    iframeElement.style.height = 418+'px';
    } else {
      iframeElement.style.height = iframeWindow.document.documentElement.scrollHeight + 5 + 'px';
    }
    
    
    }
    else {
         if(iframeWindow.document.body.scrollHeight <= 420){
    iframeElement.style.height = 418+'px';
    } else {
      iframeElement.style.height = iframeWindow.document.body.scrollHeight + 5 + 'px';
    }
    
    }
  }
}