// goes through all form fields and appends them to a string variable.
// keep formatted output short or some fields will be truncated in Netscape.
function FormatPetition () {
var PetitionContents = " ";

   PetitionContents += '\n\nPleased add my name to the Save Michael Tate Petition\n\nDate: ' + document.PetitionForm.elements["Date"].value;
   PetitionContents += '\n\nName: ' + document.PetitionForm.elements["Name"].value + '\nAddress: ';
   PetitionContents += document.PetitionForm.elements["Address"].value + '\n\nComments: ';
   PetitionContents += document.PetitionForm.elements["Comments"].value + '\n\n';
   if( document.PetitionForm.elements["New Trial"].checked )
   {
      PetitionContents += 'I think Michael should be returned to William Head pending a new trial.\n';
   }
   if( document.PetitionForm.elements["Reduced Sentence"].checked )
   {
      PetitionContents += 'I think Michael deserves a reduced sentence.\n';
   }
   //window.alert(PetitionContents);
return PetitionContents;
};

function PetitionSubmitter() {

var PetitionResults;
var isIE = false, isNetscape=false, isMozilla=false;

// get formatted survey results from function.
PetitionResults = FormatPetition();

// set form properties common to IE, Mozilla, and Netscape.
document.EmailForm.method   = "POST";
document.EmailForm.encoding = "text/plain";
document.EmailForm.action   = 'mailto:duped@telus.net?subject=Save Michael Tate Petition';

// put formatted petition contents in hidden field of email form for browser to send in message.
document.EmailForm.elements["Petition"].value = PetitionResults;

if ( navigator.appName == "Netscape" )
{
      if ( navigator.appCodeName == "Mozilla" )
      {
          isMozilla = true;
      }
      else
      {
          // do netscape specific email setup.
          isNetscape = true;
          document.EmailForm.action += '&body=' + PetitionResults;
          parent.location.href = 'mailto:duped@telus.net?subject=Save Michael Tate Petition';
      }
}
else if ( navigator.appName == "Microsoft Internet Explorer" )
{
      isIE = true;
}
// if you return false, the email won't be sent.
return true;
};


