function name_phone()
{
 
 document.write("<CENTER>");
 document.write("<TABLE cellspacing=0 cellpadding=0>");
 document.write("<TR>");
 document.write("<TD style='padding:0pt 0pt 5pt 0pt'><P style='text-align:right; font-size:10.0pt'>First Name:&nbsp;</P></TD>");
 document.write("<TD style='padding:0pt 0pt 5pt 0pt'><INPUT TYPE='text' Name='firstname' SIZE='20' MAXLENGTH='45'></TD>");
 document.write("</TR>");
 document.write("<TR>");
 document.write("<TD style='padding:0pt 0pt 5pt 0pt'><P style='text-align:right; font-size:10.0pt'>Last Name:&nbsp;</P></TD>");
 document.write("<TD style='padding:0pt 0pt 5pt 0pt'><INPUT TYPE='text' Name='lastname' SIZE='20' MAXLENGTH='45'></TD>");
 document.write("</TR>");
 document.write("<TR>");
 document.write("<TD width ='50%'><P style='text-align:right; font-size:10.0pt'>Phone Number:&nbsp;</P></TD>");
 document.write("<TD width ='50%'><INPUT TYPE='text' Name='areacode' SIZE='3' MAXLENGTH='3'>");
 document.write("&nbsp;");
 document.write("<INPUT TYPE='text' Name='exchange' SIZE='3' MAXLENGTH='3'>");
 document.write("&nbsp;");
 document.write("<INPUT TYPE='text' Name='number' SIZE='4' MAXLENGTH='4'></TD>");
 document.write("</TR>");
 document.write("</TABLE>");
 document.write("<BR>");
 document.write("</CENTER>");
}

function check_na_ph()
{
 var tomatch=/[!-&(-,\/0-@\[-`\{-~]{1,}/;
 var tomatchalpha=/^[a-zA-Z]{1}/;
 var field=document.na_ph.firstname.value;
 if (tomatch.test(field))
 {
  invalid_fstna();
  return false;
 }
 else if (tomatchalpha.test(field))
 {
  var field=document.na_ph.lastname.value;
  if (tomatch.test(field))
  {
   invalid_lstna();
   return false;
  }
  else if (tomatchalpha.test(field))
  {
   var tomatch3=/[0-9]{3}/;
   var tomatch4=/[0-9]{4}/;
   var num1=document.na_ph.areacode.value;
   var num2=document.na_ph.exchange.value;
   var num3=document.na_ph.number.value;
   if ((tomatch3.test(num1))&&(tomatch3.test(num2))&&(tomatch4.test(num3)))
   {
    return true;
   }
   else
   {
    window.alert("Entry invalid.  Please re-enter a valid Phone Number.");
    document.na_ph.areacode.value="";
    document.na_ph.exchange.value="";
    document.na_ph.number.value="";
    document.na_ph.areacode.focus();
    return false;
   }
  }
  else
  {
   invalid_lstna();
   return false;
  }
 }
 else
 {
  invalid_fstna();
  return false;
 }
}
function invalid_fstna()
{
 window.alert("Entry invalid.  Please re-enter your First Name.");
 document.na_ph.firstname.value="";
 document.na_ph.firstname.focus();
}
function invalid_lstna()
{
 window.alert("Entry invalid.  Please re-enter your Last Name.");
 document.na_ph.lastname.value="";
 document.na_ph.lastname.focus();
}
function bottom_of_page()
{
 document.write("<HR SIZE='10' style='color:#E4EFFE'>");
 document.write("<CENTER>");
 document.write("<table border='0' cellspacing='0' cellpadding='0' bgcolor='#E2DBC5'>");
 document.write("<TR align='center' valign='middle' bgcolor='#E2DBC5'>");
 document.write("<TD bgcolor='#E2DBC5'>&nbsp;&nbsp;<A style='font-variant:small-caps' HREF='index.html'><small><font size='1'  face='verdana,arial,sans-serif'><b>Home</b></font></small></a></TD>");
 document.write("<TD bgcolor='#E2DBC5'>&nbsp;&nbsp;<A style='font-variant:small-caps' HREF='listings.html'><small><font size='1'  face='verdana,arial,sans-serif'><b>Listings</b></font></small></a></TD>");
 document.write("<TD bgcolor='#E2DBC5'>&nbsp;&nbsp;<A style='font-variant:small-caps' HREF='askbob.html'><small><font size='1'  face='verdana,arial,sans-serif'><b>Looking for a Property?<BR>Ask Bob</b></font></small></a></TD>");
 document.write("<TD bgcolor='#E2DBC5'>&nbsp;&nbsp;<A style='font-variant:small-caps' HREF='selling.html'><small><font size='1'  face='verdana,arial,sans-serif'><b>Thinking of Selling?<BR>Ask Bob</b></font></small></a></TD>");
 document.write("<TD bgcolor='#E2DBC5'>&nbsp;&nbsp;<A style='font-variant:small-caps' HREF='contact.html'><small><font size='1'  face='verdana,arial,sans-serif'><b>Contact Us</b></font></small></a></TD>");
 document.write("<TD bgcolor='#E2DBC5'>&nbsp;&nbsp;<A style='font-variant:small-caps' HREF='aboutus.html'><small><font size='1'  face='verdana,arial,sans-serif'><b>About Us</b></font></small></a></TD>");
 document.write("<TD bgcolor='#E2DBC5'>&nbsp;&nbsp;<A style='font-variant:small-caps' HREF='news.html'><small><font size='1'  face='verdana,arial,sans-serif'><b>Real Estate News</b></font></small></a></TD>");
 document.write("</TR>");
 document.write("</TABLE>");
 document.write("</CENTER>");
}
function build_page(photo,property_no,price,town,county,rooms,bedrooms,fullbaths,halfbaths,style,type,garage,basement,waterview,waterfront,taxes,description,agent,phone1,phone2,email)
{
 document.write("<CENTER>");
 document.write("<table border='0' width='98%' cellpadding='5'>");
 document.write("<tr>");
 document.write("<td colspan=3 width=100%><font face=arial size=4><font color=#659DFA><b>Listing Highlights </b></font></font><font face=arial size=2><b>Property #: </b>"+property_no+"</FONT></td>");
 document.write("</tr>");
 document.write("<tr>");
 document.write("<td width='33%' valign='top'><img border=1 IMG "+photo+" width=271 height=210><br></td>");
 document.write("<TD width='28%' valign='top'><P><FONT face=Arial size=2>");
 document.write("<br>Price: <B>"+price+"</B>");                 
 document.write("<br>Town: "+town);
 document.write("<br>County: "+county);
 document.write("<br>Rooms: "+rooms);
 document.write("<br>Bedrooms: "+bedrooms);
 document.write("<br>Full Baths: "+fullbaths);
 document.write("<br>Half Baths: "+halfbaths);
 document.write("<br></FONT></P></td>");
 document.write("<td width='35%' valign='top'><P><FONT face=Arial size=2>");
 document.write("<br>Style: "+style);
 document.write("<br>Type: "+type);
 document.write("<br>Garage: "+garage);
 document.write("<br>Basement: "+basement);
 document.write("<br>View of Water: "+waterview);
 document.write("<br>Water Front: "+waterfront);
 document.write("<br>Taxes: "+taxes);
 document.write("</font></P></td></tr>");
 document.write("<tr><td width='100%' colspan=3 valign='top'><p align='justify'><font face=arial size=4><font color=#659DFA><b>Property Description:</b></font></font><BR><font face=arial size=2>");
 document.write(description);
 document.write("</font></td></tr></table>");
 document.write("<BR><img border=0 src='bobgrimmredlogo.gif' width=105 height=46><br>");
 document.write("<P><FONT face=Arial color=#800000 size=2><b>BOB GRIMM AGENCY</FONT></b><FONT face=Arial color=#800000 size=2>");
 document.write("<BR></FONT><FONT face=Arial size=2>For more information contact: <font color='#800000'></font>"+agent);
 document.write("<BR>"+phone1+"</FONT><BR>"+email);
 document.write("<P><p align=center><font face=arial size=1 color=#C00000><i>Information herein is deemed reliable but not guaranteed.</i></font></p>");
 document.write("</center>");
 bottom_of_page()
}