ScreenWidth=640; ScreenHeight=480;
if (parseFloat(navigator.appVersion)>=4)
  {ScreenWidth=screen.width; ScreenHeight=screen.height;}
function DisplayImage(SpName,Authority,Synonym,Description,ImageName,MagStr,ImageWidth,ImageHeight,Locality,Size)
  {
  var ScreenSize = getCookie("MortonFossilPageScreenSize")
  if (ScreenSize == null) ScreenSize = 15
  var WindowName=ImageName.substring(0,ImageName.indexOf('.'))+ImageWidth;
  var Options="toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width="+Math.floor(ScreenWidth*0.8)+",height="+Math.floor(ScreenHeight*0.8)+"";
  var NewWindow=window.open("",WindowName,Options);
  var Mag=parseFloat(MagStr);
  var MagRatio=1.0;
  MagRatio=1024/ScreenWidth/0.85;
  MagRatio=MagRatio*(1.0+(((ScreenSize-15)*0.85)/15));
  Mag=Mag*MagRatio*1.00001;
  MagStr=''+Mag;
  MagStr=MagStr.substring(0,MagStr.indexOf('.')+2);
  NewWindow.document.open();
  NewWindow.document.writeln('<head><title>',SpName,'</title></head>');
  NewWindow.document.writeln('<body  bgcolor="#E6E6B4" text="#000000" background="fuspor.gif">');
  var ItalSpName='<I>'+SpName;
  var Pos=ItalSpName.indexOf('sp.');
  if (Pos==-1) {ItalSpName=ItalSpName+'</I>'} else {ItalSpName=ItalSpName.substring(0,Pos)+'</B></I>'+ItalSpName.substring(Pos,ItalSpName.length)};
  Pos=ItalSpName.indexOf('aff.');
  if (Pos!=-1) {ItalSpName=ItalSpName.substring(0,Pos)+'</B></I>aff.<I><B>'+ItalSpName.substring(Pos+4,ItalSpName.length)};
  Pos=ItalSpName.indexOf('cf.');
  if (Pos!=-1) {ItalSpName=ItalSpName.substring(0,Pos)+'</B></I>cf.<I><B>'+ItalSpName.substring(Pos+3,ItalSpName.length)};
  Pos=ItalSpName.indexOf('gr.');
  if (Pos!=-1) {ItalSpName=ItalSpName.substring(0,Pos)+'</B></I>gr.<I><B>'+ItalSpName.substring(Pos+3,ItalSpName.length)};
  Pos=ItalSpName.indexOf('?');
  if (Pos!=-1) {ItalSpName=ItalSpName.substring(0,Pos)+'</B></I>?<I><B>'+ItalSpName.substring(Pos+1,ItalSpName.length)};
  NewWindow.document.writeln('<center><font size=5><B>',ItalSpName,'</B> </font><font size=4>',Authority,'</font>');
  if (Synonym != '') NewWindow.document.writeln('<br><font size=3 face=Arial,Helvetica,sans-serif>[<i>',Synonym,'</i>]</font>');
  if (Description != '') NewWindow.document.writeln('<br><font size=3 face=Arial,Helvetica,sans-serif>(',Description,')</font><P>');
  NewWindow.document.writeln('<p><table border=1 bordercolor=red  bgcolor="#E6E6B4">');
  NewWindow.document.writeln('<tr align=center bgcolor=black>');
  NewWindow.document.writeln('  <td><img src=',ImageName,' border=0>');
  var RealWidth=Math.floor(ImageWidth/Mag);
  if (RealWidth>0) NewWindow.document.writeln('  <td><img src=',ImageName,' border=0 width=',RealWidth,'>');
  NewWindow.document.writeln('<tr align=center>');
  NewWindow.document.writeln('  <td><font size=2 face=Arial,Helvetica,sans-serif><B>Magnification= &times;',MagStr,'</B></font>');
  if (RealWidth>0) NewWindow.document.writeln('  <td><font size=2 face=Arial,Helvetica,sans-serif><B>Actual Size</B> (',Size,')</font>');
  NewWindow.document.writeln('</table>');
  if (Locality != '') NewWindow.document.writeln('<br><font size=2 face=Arial,Helvetica,sans-serif>Locality: ',Locality,'</font>');

  NewWindow.document.writeln('<P><font size=2 face=Arial,Helvetica,sans-serif>The scaling of these images is approximately correct for a <b>',ScreenSize,' inch computer monitor</b>. You can specify your monitor size on the <B>Instructions</B> page of the originating website: <a href="http://www.dmap.co.uk/fossils/"><B>A Collection of Eocene and Oligocene Fossils (www.dmap.co.uk/fossils/)</B></a>.</font>');

  NewWindow.document.writeln('<P><a href="javascript:window.close()" title="Close this window"><img src="../../closewindow.gif" alt="Close this window" border=0></a>&nbsp;&nbsp;<a href="javascript:window.print()" title="Print this page"><img src="../../print.gif" alt="Print this page" border=0></a>');

  NewWindow.document.writeln('</center></body>');
  NewWindow.document.close();

  }
