function out(msg) {
  document.write(msg);
}

function startPage(center, section) {
  out("<TABLE width=\"100%\" height=\"100%\" cellpadding=\"10\" cellspacing=\"0\" border=\"0\" bgcolor=\"#6666ff\"><TBODY>");
  out("<TR height=\"30\" bgcolor=\"#999999\" ><TD>&nbsp;</TD><TD align=\"center\"><h2>Cardella Family Website</h2></TD></TR>");
  out("<TR><TD valign=\"top\" bgcolor=\"#666666\">");
  out("<TABLE cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"90\"><TBODY><TR>");
  out("</TR><TR><TD width=\"80\"><A href=\"index.html\">Home</A></TD><TR>");
  out("</TR><TR><TD><A href=\"tree.html\">Family Tree</A></TD><TR>");
  if(section == 'tree') {
      out("</TR><TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;<A href=\"tree_legend.html\"><i>Legend</i></A></TD>");
  }
  out("</TR><TR><TD><A href=\"pictures.html\">Pictures</A></TD>");
  if(section == 'pics') {
      out("</TR><TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;<A href=\"pics_0703.html\"><i>07, March</i></A></TD>");
      out("</TR><TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;<A href=\"pics_0601.html\"><i>06, Jan</i></A></TD>");
      out("</TR><TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;<A href=\"pics_0512.html\"><i>05, 10-12</i></A></TD>");
      out("</TR><TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;<A href=\"pics_0509.html\"><i>05, 7-9</i></A></TD>");
      out("</TR><TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;<A href=\"pics_0506.html\"><i>05, 4-6</i></A></TD>");
      out("</TR><TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;<A href=\"pics_0503.html\"><i>05, 1-3</i></A></TD>");
      out("</TR><TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;<A href=\"pics_041206.html\"><i>10-12 mon</i></A></TD>");
      out("</TR><TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;<A href=\"pics_040823.html\"><i>7-9 months</i></A></TD>");
      out("</TR><TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;<A href=\"pics_040518.html\"><i>5-6 months</i></A></TD>");
      out("</TR><TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;<A href=\"pics_040328.html\"><i>3-4 months</i></A></TD>");
      out("</TR><TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;<A href=\"pics_0402.html\"><i>2-3 months</i></A></TD>");
      out("</TR><TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;<A href=\"pics_alex.html\"><i>Alesandra</i></A></TD>");
      out("</TR><TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;<A href=\"pics_alex.html\"><i>Alesandra</i></A></TD>");
      out("</TR><TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;<A href=\"pics_dom.html\"><i>Dom Wedd</i></A></TD>");
      out("</TR><TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;<A href=\"pics_chile.html\"><i>Chile</i></A></TD>");
      out("</TR><TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;<A href=\"pics_wedding.html\"><i>Wedding</i></A></TD>");
      out("</TR><TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;<A href=\"pics_europe.html\"><i>Europe</i></A></TD>");
      out("</TR><TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;<A href=\"pics_ecuador.html\"><i>Ecuador</i></A></TD>");
      out("</TR><TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;<A href=\"pics_costarica.html\"><i>Costa Rica</i></A></TD>");
      out("</TR><TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;<A href=\"pics_others.html\"><i>Others</i></A></TD>");
  }
  out("</TR><TR><TD><A href=\"whale/\" target=\"newWindow\">Whales</A></TD>");
  out("</TR><TR><TD><A href=\"us.html\">About Us</A></TD>");
  if(section == 'us') {
	  out("</TR><TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;<A href=\"hobbies.html\"><i>Hobbies</i></A></TD>");
	  out("</TR><TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;<A href=\"honeymoon.html\"><i>Honeymoon</i></A></TD>");
  }
  out("</TR><TR><TD><A href=\"sudoku/home.html\">Sudoku</A></TD>");
  out("</TR><TR><TD><A href=\"contact.html\">Contact Us</A></TD>");
  out("</TR><TR height=\"100%\">&nbsp;");
  out("<TD></TD>");
  out("</TR></TBODY></TABLE>");
  out("</TD>");
  if(center) {
	  out("<TD valign=\"top\" align=\"center\">");
  } else {
	  out("<TD valign=\"top\">");
  }
  out("<br>");
 }

function endPage() {
  out("</TD>");
  out("</TR></TBODY>");
  out("</TABLE>");
}

var pic_root = '';
function picCell(pic_name, text) {
	out('<TD><A href="#" onClick="onClickThumb(\'' + pic_root + pic_name + '\')"><IMG src="' + pic_root + pic_name + '_s.jpg" border="0"><br>' + text + '</A></TD>');
}

function onClickThumb(picture) {
	if (event.ctrlKey) {
		location.href = picture + '.jpg';
	} else {
		location.href = picture + '_m.jpg';
	}
	
	return false;	
}


