//  pictpop0.js
//  Written:  2005-10-28 by James Alarie <jalarie@umich.edu>
//    http://spruce.flint.umich.edu/~jalarie/
//
//  Call PictPop0 with the name of an image file, its width, height, and 
//  optional caption:
//
//    <a href="javascript:PictPop0('lion.jpg',950,560,'Just Lion Around');">lion</a>

        function PictPop0(IFile,IWidth,IHeight,Caption) {
          PP_FName=IFile;
          PP_Width=IWidth;
          PP_Height=IHeight;
          PP_Caption=Caption;
          if (!PP_Caption) { PP_Caption=''; }
          PP_Options ='';
          PP_Options+='width='+PP_Width+',height='+PP_Height;
//          PP_Options+=',resizable';
          PP_window=window.open('','PicturePopup',PP_Options);
          PP_Out ='';
          PP_Out+='<!DOCTYPE html PUBLIC "-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN"\n';
          PP_Out+='  "http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd">\n';
          PP_Out+='\n';
          PP_Out+='<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">\n';
          PP_Out+='  <head>\n';
          PP_Out+='    <title>Picture Popup<\/title>\n';
          PP_Out+='\n';
          PP_Out+='    <meta http-equiv="Content-Type" content="text\/html; charset=utf-8" \/>\n';
          PP_Out+='    <meta http-equiv="Content-Script-Type" content="text\/javascript" \/>\n';
          PP_Out+='    <meta http-equiv="Content-Style-Type" content="text\/css" \/>\n';
          PP_Out+='    <meta http-equiv="Content-Language" content="en-US" \/>\n';
          PP_Out+='    <meta name="Author" content="James Alarie - jalarie@umich.edu" \/>\n';
          PP_Out+='    <link rev="made" href="jaa_e.htm" \/>\n';
          PP_Out+='    <link href="style1.css" rel="stylesheet" type="text\/css" />\n';
          PP_Out+='  <\/head>\n';
            PP_window.document.write(PP_Out);
          PP_Out ='';
          PP_Out+='  <body background="'+PP_FName+'">\n';
          PP_Out+='   <div id="body">\n';
            PP_window.document.write(PP_Out);
          if (PP_Caption != '') {
            PP_Out ='';
            PP_Out+='    <span class="highlight">&nbsp;';
            PP_Out+=PP_Caption;
            PP_Out+='    &nbsp;<\/span>\n';
              PP_window.document.write(PP_Out);
          }
          PP_Out ='';
          PP_Out+='   <\/div>\n';
          PP_Out+='  <\/body>\n';
          PP_Out+='<\/html>\n';
            PP_window.document.write(PP_Out);
          PP_window.document.close();
          return false;
        } // PictPop0
