<!--
/* Javascript functions for generating the page title and navigation bar */
var navbarDarkColor='#006600';
var whiteColor='#ffffff';
function generatePageTop(){
  document.writeln('<table border="0" width="100%" cellpadding="0" cellspacing="0">');
}
function generateTitlePanel(){
  // Generate 5-pixel-high bar
  document.writeln('<tr><td align="center" width="100%"><table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFEE88"><tr>');
  generateSpacerCell('5', '1');
  document.writeln('</tr><tr>');
  // Generate title bar:
  //   Color the left side of the title bar
  document.writeln('<td width="50%"><img src="images/transparent1x1.gif" width="1" border="0"></td>');
  //   Generate the title image
  document.writeln('<td valign="center" align="center">');
  document.writeln('<img src="images/Larry_and_Andrea50x620.gif" height="50" width="620" border="0">');
  document.writeln('</td>');
  //   Color the right side of the title bar
  document.writeln('<td width="50%"><img src="images/transparent1x1.gif" width="1" border="0"></td>');
  // Generate 5-pixel-high bar
  document.writeln('</tr><tr>');
  generateSpacerCell('5', '1');
  document.writeln('</tr></table></td></tr>');
}
function generateNavigationBar(){
  document.writeln('<tr><td><table border="0" width="100%" cellpadding="0" cellspacing="0" bgcolor="'+navbarDarkColor+'">');
  document.writeln('<tr><td align="center"><table cellpadding="5" cellspacing="3" bgcolor="'+navbarDarkColor+'"><tr>');
  generateNavigationCell('index.html',         'Home');
  generateNavigationCell('personal.html',      'Personal');
  generateNavigationCell('ourhome/index.html', 'Landscaping');
  generateNavigationCell('projects.html',      'Projects');
  generateNavigationCell('restop.html',        'Resume');
  document.writeln('</tr></table></td></tr>');
  document.writeln('</table></td></tr>');
}
function generatePageBodyTop(){
  document.writeln('<tr><td><table border="0" width="100%" cellpadding="10" cellspacing="0">');
  document.writeln('<tr><td width="100%" valign="top">');
}
function generatePageBodyBottom(){
  document.writeln('</td></tr></table></td></tr>');
}
function generatePageBottom(){
  document.writeln('</table>');
}
// Generate one table cell containing a link in the navigation bar.
//  In browsers that support the DOM model, visually "arm" the link
//  by changing the background and text colors when the mouse hovers
//  over the link and "disarm" the link by restoring the original colors
//  when the mouse leaves the link.
function generateNavigationCell(target, label, title){
  var cellname=target+'_cell';
  var textname=target+'_text';
  var armNavCellCall="armNavigationCell('"+target+"');";
  var disarmNavCellCall="disarmNavigationCell('"+target+"');";
  var titleAttribute='';
  if(title){
    titleAttribute=' title="'+title+'"';
  }
  var urlParts=document.URL.split('/');
  var fileName=urlParts[urlParts.length-1];
  if(''==fileName){
    fileName='index.html';
  }
  if(target==fileName){
    document.writeln('<td bgColor="'+whiteColor+'">');
	document.writeln(' <b><font face="arial,helvetica,sans-serif" color="purple">'+label+'</font></b>');
  }else{
    document.writeln('<td id="'+cellname+'" bgColor="'+navbarDarkColor+'"'+titleAttribute
                   +' onMouseOver="'+armNavCellCall+'" onMouseOut="'+disarmNavCellCall+'" onClick="'+disarmNavCellCall+'">');
    document.writeln(' <b><a href="'+target+'">'
                   +'<font id="'+textname+'" face="arial,helvetica,sans-serif" color="'+whiteColor+'">'
				   +label+'</font></a></b>');
  }
  document.writeln('</td>');
}
// Visually arm a navigation link by changing text and background colors
//  if the browser supports the DOM model.
function armNavigationCell(target){
  var cellname=target+'_cell';
  var textname=target+'_text';
  document.getElementById(cellname).setAttribute('bgColor',whiteColor);
  document.getElementById(textname).setAttribute('color','purple');
}
// Visually disarm a navigation link by setting original text and background colors.
function disarmNavigationCell(target){
  var cellname=target+'_cell';
  var textname=target+'_text';
  document.getElementById(cellname).setAttribute('bgColor',navbarDarkColor);
  document.getElementById(textname).setAttribute('color',whiteColor);
}
// Generate a table cell for layout control
function generateSpacerCell(height, width){
  document.writeln('<td><img src="images/transparent1x1.gif" height="'+height+'" width="'+width+'"></td>'); 
}
// Open a document in a new window
function showdoc(docfile,height,width){
  open(docfile,"docwindow","menubar,location,status,scrollbars,resizable,height="+height+",width="+width);
  if(navigator.appName != "Microsoft Internet Explorer") w.window.focus();
}

// BEGIN Support for rotary arrays of pictures and captions
// To add a rotary array of pictures and captions:
// (1) Pick a PICTURESERIESNAME and ALTTITLE
// (2) Define in the page where the rotary array is to appear:
//     - An array named PICTURESERIESNAME+'PicturesAndCaptions' of alternating (relative path to picture)
//       and (picture caption) strings. The (picture caption)s MAY NOT CONTAIN HTML TAGS.
//     - An integer PICTURESERIESNAME+'PictureIndex' for the first picture in the array to display.
//     - Optional and maybe not necessary any more??: An array of Image whose sources are the (relative path
//       to picture)s in PICTURESERIESNAME
// (3) To load the pictures and captions:
//     		loadPictureAndCaption(
//				PICTURESERIESNAME+'PicturesAndCaptions',
//				PICTURESERIESNAME+'PictureIndex',
//				'PICTURESERIESNAME+\'picture\'',
//				'PICTURESERIESNAME+\'picturetext\'');
// (4) To put the pictures and captions into the HTML page:
//     add a generateRotaryPicturesAndCaptions() command
//     		generateRotaryPicturesAndCaptions(
//       		'HTML_PARAGRAPH_TITLE',
//       		'HTML_PARAGRAPH',
//       		'PICTURESERIESNAME',
//       		'ALTTITLE');
//      The HTML_PARAGRAPH may contain HTML tags.
function loadPictureAndCaption(pictureAndCaptionArray, pictureIndex, pictureid, captionid){
  document.getElementById(pictureid).setAttribute('src', pictureAndCaptionArray[pictureIndex]);
  document.getElementById(captionid).firstChild.firstChild.nodeValue=pictureAndCaptionArray[pictureIndex+1];
}
function previousPictureAndCaption(pictureAndCaptionArray, pictureIndex, pictureid, captionid){
  pictureIndex-=2;
  if(pictureIndex < 0){
    pictureIndex=pictureAndCaptionArray.length-2;
  }
  document.getElementById(pictureid).setAttribute('src', pictureAndCaptionArray[pictureIndex]);
  document.getElementById(captionid).firstChild.firstChild.nodeValue=pictureAndCaptionArray[pictureIndex+1];
  return pictureIndex;
}
function nextPictureAndCaption(pictureAndCaptionArray, pictureIndex, pictureid, captionid){
  pictureIndex+=2;
  if(pictureIndex >= pictureAndCaptionArray.length){
    pictureIndex=0;
  }
  document.getElementById(pictureid).setAttribute('src', pictureAndCaptionArray[pictureIndex]);
  document.getElementById(captionid).firstChild.firstChild.nodeValue=pictureAndCaptionArray[pictureIndex+1];
  return pictureIndex;
}
function generateRotaryPicturesAndCaptions(title, toptext, pictureAndCaptionName, pictureAndCaptionText){
  document.writeln('<tr>');
  document.writeln('  <td align="right" valign="top" height="100%">');
  document.writeln('    <table border="0" cellpadding="0" cellspacing="0" height="100%">');
  document.writeln('      <tr>');
  document.writeln('        <td align="right" valign="top">'
                  +'<font face="sans-serif"><i>'+title+':</i><br>'+toptext+'</font>'
                  +'</td>');
  document.writeln('      </tr>');
  document.writeln('      <tr><td height="20"><img src="images/tra1x1.gif" height="20" width="1"></td></tr>');
  document.writeln('      <tr>');
  document.writeln('        <td id="'+pictureAndCaptionName+'picturetext" align="right">'
                  +'<font face="sans-serif">'+pictureAndCaptionText+' placeholder</font>'
				  +'</td>');
  document.writeln('      </tr>');
  document.writeln('      <tr><td height="10"><img src="images/tra1x1.gif" height="10" width="1"></td></tr>');
  document.writeln('      <tr>');
  document.writeln('        <td align="right" height="100%" valign="bottom">');
  document.writeln('          <table border="0" cellpadding="0" cellspacing="3">');
  document.writeln('            <td align="right" valign="bottom"><input type="button" value="<- Prev"'
                   +' onclick="'+pictureAndCaptionName+'PictureIndex=previousPictureAndCaption('
                   +pictureAndCaptionName+'PicturesAndCaptions, '+pictureAndCaptionName+'PictureIndex, \''
				   +pictureAndCaptionName+'picture\', \''+pictureAndCaptionName+'picturetext\');">'
				   +'</td>');
  document.writeln('            <td align="right" valign="bottom"><input type="button" value="Next ->"'
                   +' onclick="'+pictureAndCaptionName+'PictureIndex=nextPictureAndCaption('
                   +pictureAndCaptionName+'PicturesAndCaptions, '+pictureAndCaptionName+'PictureIndex, \''
				   +pictureAndCaptionName+'picture\', \''+pictureAndCaptionName+'picturetext\');">'
				   +'</td>');
  document.writeln('            <td align="right" height="100%" valign="bottom"><i>or click the picture</i></td>');
  document.writeln('          </table>');
  document.writeln('        </td>');
  document.writeln('      </tr>');
  document.writeln('      <tr>');
  document.writeln('        <td height="10"><img src="images/tra1x1.gif" height="10" width="1"></td>');
  document.writeln('      </tr>');
  document.writeln('    </table>');
  document.writeln('  </td>');
  document.writeln('  <td align="left" valign="top">'
                   +'<a name="'+pictureAndCaptionName+'anchor"'
                   +' onClick="'+pictureAndCaptionName+'PictureIndex=nextPictureAndCaption('
                   +pictureAndCaptionName+'PicturesAndCaptions, '+pictureAndCaptionName+'PictureIndex, \''
				   +pictureAndCaptionName+'picture\', \''+pictureAndCaptionName+'picturetext\');">'
                   +'<img id="'+pictureAndCaptionName+'picture" alt="'+pictureAndCaptionText+'" width="300" height="225" border="0">'
				   +'<\a></td>');
  document.writeln('</tr>');
  document.writeln('');
}
// END Support for rotary arrays of pictures and captions

//-->

