// Hidden Earth Booking Form
// Copyright 2006 David Gibson

// housekeeping

function reportPHP()
  {
  if (php_status.substr(0,1) != '3')    // replace this with a substr function
    {
    document.writeln(
    '<TABLE WIDTH="60%" CELLPADDING="8" CELLSPACING="0" BORDER="2">' , 
    '<TR><TD BGCOLOR="#FFFFFF"> &nbsp;' , 
    '<H2 ALIGN="CENTER"><FONT COLOR="#FF0000">' , 
    'Debug info: PHP status' , 
    '</FONT></H2><P ALIGN="CENTER">' , 
    'These pages require PHP to be running on the web server.' , 
    '</P><P ALIGN="CENTER">' , 
    'JavaScript is reporting <I>php_status = ' , php_status,  
    '</I></P></TD></TR></TABLE><BR>&nbsp;<BR>' );
    }
  }

function makeURLwithSubject(user, subject, domain, tld ) 
  {
    if (domain == null) domain = "caves" ;
    if (tld == null)  tld = "org.uk" ;
    if (subject != null) tld += "?subject=" + subject ;
    str = "mai" + "lto:" + user + "@" + domain + "." + tld;
    return str ;
  }