// JavaScript Document

function winopener(xwide,yhigh)
  // opens a window the right size to show image xwide by yhigh. 
  
  { /* Stretch windows for everything but IE on Mac to prevent scroll bars
     * IE on Mac comes up the right size by default. All else throws up
     * scrollbars unless extra space is added
     */
    if ( (navigator.appName.indexOf("Microsoft") >= 0) && (navigator.userAgent.indexOf("Mac") >= 0) )
      {
        // do nothing
      }
    else
      {
      if ( (navigator.appName.indexOf("Microsoft") >= 0) && (navigator.userAgent.indexOf("Windows") >= 0) )
        {
        /* Add some extra width and take off some height for IE on Windows
         */
         xwide = xwide + 15;
         yhigh = yhigh - 10;
        }
      xwide = xwide + 24;
      yhigh = yhigh + 24;
      }   
  eval('window.open("","CamWin","WIDTH=' + xwide +',HEIGHT=' + yhigh +
     ',location=yes,scrollbars=yes,menubar=yes,status=yes,resizable=yes")');
  }
