  function getDirections(tf){
    var h = "http://maps.google.ca/maps?f=d&source=s_d&saddr="
    var startString;

    startString = tf.address.value.replace(/\s/g,'+');
    if (startString.length > 0) startString += ",";
    if (tf.city.value.length > 0) startString += tf.city.value.replace(/\s/g,'+') + ",";
    startString += tf.state.options[tf.state.selectedIndex].value.replace(/\s/g,'+');
    h = h + startString + "&daddr=210+Greenburg+St.,+Columbia+KY+42728";
    location.href = h;
    return(false);
  }






function generateResponse(page,name){

  var fromPage = "";
  var contact = "";
  var t = "<p>Testing</p>";
  var i = page.indexOf(":");
  if (i < 0) {
    // This is an error output a generic response page.
  }
  fromPage = page.slice(0,i);
  contact = page.slice(i+1,i+2);
  fromPage = fromPage.toLowerCase();
  if (fromPage ==  "onlinepreplan"){
    t = "<h1>On-Line Preplanning Submission</h1>\n";

    t += "<p><b>To: " + name + "</b></p>\n";
    if (contact.toLowerCase() == "n"){
      t += "<p class='responseP'>Thank you for you preplanning submission.  You have requested that we not contact you, so we will file your preplanning information.</p>";
    } else {
      t += "<p class='responseP'>Thank you for you preplanning submission.  We will contact you shortly to discuss the information you have sent.</p>";
    }
  } else if (fromPage == "contactus"){
    t = "<h1>Contact Us Inquiry</h1>\n";
    t += "<p><b>To: " + name + "</b></p>\n";
    t += "<p class='responseP'>Thank you for contacting us using our Contact Us form.  We will contact you shortly with regard to your inquiry.</p>";
  }
  t += "\n<p>Very truly yours,<br />Stotts-Phelps-McQueary Funeral Home</p>";
  document.writeln(t);
}

function newPage(h){
  location.href = h;
  return(false);
}

