// MVVM, 60.39.4-63.47.1, JS/AdjWidth.js------------------------------------>
// By means of this script pages with images (photos, paintings)
// can be given sufficient width to show the full-size image

function adjWidthO(S1,N1,N2)  // N2 (max height) not (yet) used
 {
  var docS="document.all."; var stlS=".style.";  // for IE
  var widS=S1; var widN=parseInt(S1);
  var alertS='Please, choose a width between 1 and '+N1;

  if (Nav5UpT)  // for Netscape 6 and 7
   { docS = "document.getElementById('"; stlS = "').style." }
  if ((widS=='') || (widS.charCodeAt(0)<48) || (widS.charCodeAt(0)>57))
   widN=0;
  if ((widN<1) || (widN>N1)) alert(alertS);
   else
    {
     widN=widN+60;
     if (widN<600)
       { if (Nav5UpT) widS='"600px"'; else widS=600 }
      else
       { if (Nav5UpT) widS='widN+"px"'; else widS=widN }
     eval(docS+'CenPart'+stlS+'width='+widS);  // page table first

     widN=widN-60;
     if (Nav5UpT) widS='widN+"px"'; else widS=widN;
     eval(docS+'PicTbl'+stlS+'width='+widS);  // then picture (table)
     eval(docS+'Pic'+stlS+'width='+widS);
   }
 }

function writeWidthTblO(N1,N2,N3)  // recommended & unreduced width & height
 {
  var adjWidthS='adjWidthO(document.WidthForm.Pic_width.value,'+N2+','+N3+')';
  var bkgroundS=MVVMPathS+"Graf/Bkgr/HalfTrsp.gif";

  if (IE4UpT || Nav5UpT)
   {
document.write('<br />');
document.write('<form name="WidthForm">');
document.write(' <table width="600" background="',bkgroundS,'" border="0" id="WidthTbl"><tr><td>');
document.write(' <table width="100%" cellpadding="0" cellspacing="0" border="1"><tr><td>');
document.write(' <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr>');
document.write('  <td align="right" valign="middle"><font color="#202020">');
document.write('   Width image&nbsp;/ <i>breedte afbeelding</i>&nbsp;</font></td>');
document.write('    <td><input type="text" name="Pic_width" value="',N1,'"');
document.write('   size="3"></td>');
document.write('  <td align="center" valign="middle">');
document.write('   <table cellpadding="0" cellspacing="0" background="" border="2"><tr>');
document.write('    <td><input type="button" value="OK" ');
document.write('    onClick="',adjWidthS,'">');
document.write('   </td></tr></table>');
document.write('  <td align="left" valign="middle"><font color="#202020">');
document.write('   &nbsp;(1-',N2,'&nbsp;pixels/<i>piksels</i>)</font></td>');
document.write('  </tr></table>');
document.write('  </td></tr></table>');
document.write('  </td></tr></table>');
document.write('</form>');
   }
 }

adjWidthT=true  // checks whether contents have been transferred
                // (on-line) and script (can be) executed

// Copyright 60-63 aSWW, M.Vincent van Mechelen, Amsterdam, NL