
/* ------- This is min-width script for IE -------------------------------------------------------------- */

   var d = document;
   var winIE = (navigator.userAgent.indexOf("Opera")==-1 && (d.getElementById && d.documentElement.behaviorUrns)) ? true : false;
   
   function bodySize(){
       if(winIE && d.documentElement.clientWidth) {
           sObj = d.getElementsByTagName("body")[0].style;
           sObj.width = (d.documentElement.clientWidth<760) ? "760px" : "100%";
       }
   }
  
  function init(){
      if(winIE) { bodySize(); }
  }
  
  onload = init;
  if(winIE) { onresize = bodySize; }

/*------------------------------------------------------------------------------------------------------*/

function popup_img(filename)
{
   var newImage = new Image();
   newImage.src = filename;
   newImageWidth = newImage.width;
   newImageHeight = newImage.height;
   
   newImage.onload = function() 
   {  
      var newWin;
      newWin = window.open(filename,'win',   "width="+newImageWidth+",height="+newImageHeight+",resizable=no,scrollbars=no,status=no");
      setTimeout(function() {
              newWin.onload = function () {
                 var bod = newWin.document.getElementsByTagName('body')[0];
                 bod.style.margin=0;
                 bod.style.padding=0;
              }
      }, 10);
   }
}
