// Common scripts
function myMail()
{ // Obfuscates mail address from 'bots and other varmints
   return 'webmaster' + '\x40' + 'hisimageministries' + '\x2e' + 'org';
}

function mailLink(name,addr,subj)
{  // Writes a mailto link in the current doc
   document.write('<a href="mailto:' + addr + '?subject=' + subj + '">');
   document.write(name + '</a>');
}

function mailMe()
{  // Calls the mailLink function with the default set of information
   mailLink(myMail(),myMail(),'Regarding your web page: ' + document.title);
}

function writeStdFooter()
{  // Writes a standard footer to the current document
   document.write('<hr width=100% size=1 align=left />' );
   writeGoogleSearchBox();
   document.write('<hr width=80% size=1 align=right />' );
   document.write('<table><tr><td width=80%>');
   document.write('<p class=footer><B>His Image Ministries Web Pages:&nbsp;</B>');
   document.write(document.title + '</p>');
   document.write('<p class=footer><B>Created by: </B>');
   mailMe();
   document.write('</p>');
   document.write('<p class=footer><B>Please Note:&nbsp;</B>We are not in any way affiliated with the John ');
   document.write('Avanzini&rsquo;s </i>His Image Ministries<i>.  While we accept gifts, we do not solicit them ');
   document.write('in any way via phone, mail, or the Internet. Thank you.</p>');
   // append a modification date only if server provides a valid date
   if (Date.parse(document.lastModified) > 0) {
      document.write('<p class=footer><b>Last modified: </b>' +
      document.lastModified + '</p>');
   }
   document.write('<p class=footer><b>URL: </b>' + document.location.href +
              '</font></p>');
   document.write('</td><td><a href="http://patswebgraphics.com">');
   if (arguments.length > 0) {
	document.write('<img class=right border=0 src=images/pwg.' + arguments[0] + '>');
   } else {
	document.write('<img class=right border=0 src=images/pwg.gif>');
   }
   document.write('</a></td></tr></table>');
}

function writeGoogleSearchBox()
{
   document.write('<!-- Search Google -->');
   document.write('<form method=GET action=http://www.google.com/u/HIM>');
   document.write('<table bgcolor=#FFFFFF cellspacing=0 border=0><tr valign=middle><td>');
   document.write('<a href=http://www.google.com/>');
   document.write('<img src="http://www.google.com/logos/Logo_40wht.gif" border=0 alt=Google /></a>');
   document.write('</td>');
   document.write('<td>');
   document.write('<input type=text name=q size=31 maxlength=255 value="Search Google" />&nbsp;');
   document.write('<input type=submit name=sa value="Google Search" />');
   document.write('<input type=hidden name=domains value="hisimageministries.org" /><br>');
   document.write('<input type=radio name=sitesearch value="google.com">Search WWW&nbsp;&nbsp;</input>');
   document.write('<input type=radio name=sitesearch value="hisimageministries.org" checked>');
   document.write('Search His Image Ministries</input>');
   document.write('</td></tr></table>');
   document.write('</form>');
   document.write('<!-- Search Google -->');
}

function paypalDonate()
{
   document.write('<!-- Donate via PayPal -->');
   document.write('<form action="https://www.paypal.com/cgi-bin/webscr" method="post">');
   document.write('<input type="hidden" name="cmd" value="_s-xclick">');
   document.write('<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-butcc-donate.gif" border="0"');
   document.write('name="submit" alt="Make donations with PayPal - fast, free and secure!">');
   document.write('<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">');
   document.write('<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----');
   document.write('MIIHbwYJKoZIhvcNAQcEoIIHYDCCB1wCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMC');
   document.write('VVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwt');
   document.write('QYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHD');
   document.write('AaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYCvMhUex');
   document.write('+szTE1ImmIF6npg7uVK0KXffwqGkWCwJJ8i0d9avEuz9RsGzHXw55W38ARLwLl2KOOG5o/T2');
   document.write('+WSdAQCTDsnJ25gwF0G3TW0AtlWUk0GnpKewwKu17uaeAnYCpE3QyKGZ2hKC6KVYN1MyV/');
   document.write('H4c0NHWO4ptt+aXOpGSzlKjELMAkGBSsOAwIaBQAwgewGCSqGSIb3DQEHATAUBggqhkiG9');
   document.write('w0DBwQIUlXcTgGWxvaAgcgWODYThsAhUqQ2gAph17kHRbLXUSdtxsyFxAWnn2fNlgYaSPR3k');
   document.write('BObhKEPSmsRzfQ/WQAOECS9gB986bajpk1B/Jeem61PCOBRo8/hyqrrEUht2MHqO/k/Of1/gIg');
   document.write('KLkyb3sGUgtJ+k426AgeqgRFSXhepx78/t7bdBOMXWKfAc7/0RV2XUJaw8PmHiYLmdTYTa/xO');
   document.write('DDe9k6u7l5pAcSqDMf51+MJZxnN9151Y+bwZNDOoEJnRupPnK4EhNy+rJi+vcru+OGo+Y6CCA');
   document.write('4cwggODMIIC7KADAgECAgEAMA0GCSqGSIb3DQEBBQUAMIGOMQswCQYDVQQGEwJVUzELM');
   document.write('AkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJ');
   document.write('bmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSI');
   document.write('b3DQEJARYNcmVAcGF5cGFsLmNvbTAeFw0wNDAyMTMxMDEzMTVaFw0zNTAyMTMxMDEzMTVa');
   document.write('MIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZ');
   document.write('XcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQ');
   document.write('DFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbTCBnzANBgkqhkiG9w0');
   document.write('BAQEFAAOBjQAwgYkCgYEAwUdO3fxEzEtcnI7ZKZL412XvZPugoni7i7D7prCe0AtaHTc97CYgm');
   document.write('7NsAtJyxNLixmhLV8pyIEaiHXWAh8fPKW+R017');
   document.write('+EmXrr9EaquPmsVvTywAAE1PMNOKqo2kl4Gxiz9zZqIajOm1fZGWcGS0f5JQ2kBqNbvbg2/Za+');
   document.write('GJ/qwUCAwEAAaOB7jCB6zAdBgNVHQ4EFgQUlp98u8ZvF71ZP1LXChvsENZklGswgbsGA1Ud');
   document.write('IwSBszCBsIAUlp98u8ZvF71ZP1LXChvsENZklGuhgZSkgZEwgY4xCzAJBgNVBAYTAlVTMQswCQ');
   document.write('YDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4x');
   document.write('EzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkB');
   document.write('Fg1yZUBwYXlwYWwuY29tggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAgV86');
   document.write('VpqAWuXvX6Oro4qJ1tYVIT5DgWpE692Ag422H7yRIr/9j/iKG4Thia/Oflx4TdL+IFJBAyPK');
   document.write('9v6zZNZtBgPBynXb048hsP16l2vi0k5Q2JKiPDsEfBhGI+HnxLXEaUWAcVfCsQFvd2A1sxRr67ip5y2');
   document.write('wwBelUecP3AjJ+YcxggGaMIIBlgIBATCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNB');
   document.write('MRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1U');
   document.write('ECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBhe');
   document.write('XBhbC5jb20CAQAwCQYFKw4DAhoFAKBdMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIh');
   document.write('vcNAQkFMQ8XDTA3MDUzMDExMTYxNlowIwYJKoZIhvcNAQkEMRYEFEdoM6+tYxIP7vaE2DazMoMj');
   document.write('+7xMMA0GCSqGSIb3DQEBAQUABIGAi9rGgLdOHmTouau0nxAzTk0yFKxzwTdWJB99iivbYebFxMzJ/');
   document.write('yxE1oyCFjEt8bg6fRysjJqnBSEful1hQnx3WMcp6xHJvrQVijE0Sy2OIrcOeld');
   document.write('+zUSeswVvMztVWOusxr9LZoXRTsT2jAgUOAhxDMq0up2OVmTDCP5j2AeCHG4=-----END PKCS7-----">');
   document.write('</form>');
   document.write('<!-- Donate via PayPal -->');
}

