function pictureTable(a,b,c,d,e){
var theRq = new Array; 
theRq[0] = a; theRq[1] = b; theRq[2] = c; theRq[3] = d; theRq[4] = e;
var anAnsw = new Array;
anAnsw[0] = returnString(a);
anAnsw[1] = returnString(b);
anAnsw[2] = returnString(c);
anAnsw[3] = returnString(d);
anAnsw[4] = returnString(e);

var theTable = '';
theTable += '<table border="0" cellpadding="0" cellspacing="3" width="278" height="333"><tr height="52">';
for(i=0;i<5;i++){
if (theRq[i].length > 0) {
theTable += '<td height="52" width="52"><a href="javascript:changePicture(\'';
theTable += theRq[i] + '\')" onmouseover="setStatus(\'' + theRq[i] + '\')" onmouseout="setStatus(\'\')">';
theTable += '<img src="../images/small/' + theRq[i] + '.jpg" width="52" height="52" border="0" title="';
theTable += anAnsw[i] + '"></a></td>';
} else {
theTable += '<td height="52" width="52"></td>';
}
}
if (document.all) {
theTable += '</tr>';
} else {
theTable += '</tr><tr><td colspan="5" align="right"><form name="pictInfo">';
theTable += '<input type="text" name="infoField" size="40" value="'+ returnString(e) + '"></form></td></tr>';
}
theTable += '<tr><td colspan="5"><img src="../images/big/' + e;
theTable += '.jpg" width="272" height="272" border="0" name="bodyImage"></td></tr>';

if (document.all) {
theTable += '<tr><td colspan="5" align="right"><DIV ID="imageinfo">'+ returnString(e) + '</DIV></td></tr>';
}

theTable += '</table>';
return theTable;
}

function truncatedTable(a,b,c){
var theTq = new Array; 
theTq[0] = a; theTq[1] = b; theTq[2] = c;
var anAnsw = new Array;
anAnsw[0] = returnString(a);
anAnsw[1] = returnString(b);
anAnsw[2] = returnString(c);

var theTrunc = '';
theTrunc += '<table border="0" cellpadding="0" cellspacing="3" width="168"><tr height="52">';

for(i=0;i<3;i++){
if (theTq[i].length > 0) {
theTrunc += '<td height="52" width="52"><a href="javascript:newImageWindow(\'';
theTrunc += theTq[i] + '\')" onmouseover="setStatus(\'' + theTq[i] + '\')" onmouseout="setStatus(\'\')">';
theTrunc += '<img src="../images/small/' + theTq[i] + '.jpg" width="52" height="52" border="0" title="';
theTrunc += anAnsw[i] + '"></a></td>';
} else {theTrunc += '<td height="52" width="52"></td>';}
}

theTrunc += '</tr></table>';
return theTrunc;
}

function newImageWindow(thePic){
var lamPreview; var xWidth = 272; yHeight = 400;
var theWindowOptions = "width=" + xWidth + ",height=" + yHeight; 
theWindowOptions += ",scrollbars=no";
lamPreview = window.open("","lamPreview",theWindowOptions);
var previewContent = "<html><head><title>LAM</title><base href='" + document.location;
previewContent += "'><meta http-equiv='Content-Type' content='text/html; charset=windows-1257'>";
previewContent += "<link rel='stylesheet' href='../stils.css'></head><body leftmargin=0 marginwidth=0";
previewContent += " topmargin=0 marginheight=0><img src='../images/big/" + thePic + ".jpg' width='272' height='272' border=0>";
previewContent += "<table cellspacing='8' width='272' height='128'><tr><td valign='bottom' align='right'>";
previewContent += "<div id='imageinfo'>";
previewContent += returnString(thePic);
previewContent += "</div>";
previewContent += "</td></tr></table></body></html>";

with (lamPreview){ document.open(); document.write(previewContent); document.close(); focus() }
}

function changePicture(x){
var myPic = new Image; myPic.src = '../images/big/' + x + '.jpg';
document.images['bodyImage'].src = myPic.src;
if (document.all){document.all.imageinfo.innerText = returnString(x);} 
else {document.pictInfo.infoField.value = returnString(x);}
}

function setStatus(x){
if (x > 0) {window.status=returnString(x); return true;}
else {window.status=""; return true;}
}