// These scripts are done to reduce code volume in the page.

// This builds a table row for the page title in the transcription. 
function trTitle(theTitle,theSheet1,theSheet2,theImage1,theImage2){
    document.write('<tr><th colspan="8"><h3>' +
                   '<a name="sheet_' + theSheet1 + '">' + theTitle + '</a></h3></th>' +
                   '<th colspan="7"></th></tr>' +
                   '<tr><th colspan="8"><h4>Library and Archives Canada ' +
                   '<a href="' + ImagePath + theImage1 + '"' +
                                 'target="PopUpImage"' +
                                 'onclick="PopUpImage=window.open(this.href,this.target,&#39;toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=1024,height=768&#39;);PopUpImage.focus();' +
                                 '">Sheet ' + theSheet1 + '</a>, ' +
                   '<a href="' + ImagePath + theImage2 + '"' +
                                 'target="PopUpImage"' +
                                 'onclick="PopUpImage=window.open(this.href,this.target,&#39;toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=1024,height=768&#39;);PopUpImage.focus();' +
                                 '">Sheet ' + theSheet2 + '</a></h4></th>' +
                   '<th colspan="7"></th></tr>');
} //trTitle

// This builds a table row of column headers in the transcription.
function trHead(){
    document.write('<tr><th width="3%"></th>' +
                   '<th>Surname</th>' +
                   '<th width="8%">Given Names</th>' +
                   '<th width="8%">Occupation</th>' +
                   '<th width="8%">Place of Birth</th>' +
                   '<th width="8%">Religion</th>' +
                   '<th width="8%">Residence if Out of Limits</th>' +
                   '<th width="5%">Age Next Bday</th>' +
                   '<th width="5%">Sex</th>' +
                   '<th width="5%">Marr. Stat.</th>' +
                   '<th width="8%">Deaths in 1851</th>' +
                   '<th width="8%">Dwelling</th>' +
                   '<th width="8%">Other Building</th>' +
                   '<th width="4%">Agric. Ref.</th>' +
                   '<th width="5%">Lot No.</th></tr>');
} //trHead

// This builds a table row in the transcription. 
function trRow(theLine,theSurname,theGivenNames,theOccupation,theBirthPlace,theReligion,theResidence,theAge,theSex,theMaritalStatus,theDeath,theDwelling,theOther,theAgric,theLot){
    document.write('<tr>' +
                   '<td align="middle">' + theLine + '</td>' +
                   '<td>' + theSurname + '</td>' +
                   '<td>' + theGivenNames + '</td>' +
                   '<td>' + theOccupation + '</td>' +
                   '<td>' + theBirthPlace + '</td>' +
                   '<td>' + theReligion + '</td>' +
                   '<td>' + theResidence + '</td>' +
                   '<td align="middle">' + theAge + '</td>' +
                   '<td align="middle">' + theSex + '</td>' +
                   '<td align="middle">' + theMaritalStatus + '</td>' +
                   '<td>' + theDeath + '</td>' +
                   '<td>' + theDwelling + '</td>' +
                   '<td>' + theOther + '</td>' +
                   '<td>' + theAgric + '</td>' +
                   '<td>' + theLot + '</td>' +
                   '</tr>');
} //trRow

// This builds the last row on each page in the transcription.  (This defines one more cell than the
// header to force a blank column on the right.)
function trNull(){
    document.write('<tr><td></td><td colspan="14"></td><td></td></tr>');
} //trNull

