function sendmail(theObj, domain, username, subject) {
      var atsign = String.fromCharCode(64);
      var mailto = String.fromCharCode(109,97,105,108,116,111,58);
      theObj.href = mailto + username + atsign + domain + '?' + "subject=" + subject;
      return true;
};

function sendHTMLemail($HTML, $from, $to, $subject)
{

        $random_hash = md5(date('r', time())); 

        $headers = "From: jeff@mineralmovies.com\r\nReply-To: jeff@mineralmovies.com";

        $headers = $headers + "\r\nContent-Type: multipart/alternative; boundary=\"PHP-alt-" + $random_hash + "\"";

        $message = "--PHP-alt-" + $random_hash;
        $message  +=  'Content-Type: text/plain; charset="iso-8859-1"\r\n';
        $message  += 'Content-Transfer-Encoding: 7bit\r\n';
        $message  += strip_tags($HTML) + "\r\n";
        $message  += "--PHP-alt-" + $random_hash + "\r\n";
        $message  += 'Content-Type: text/html; charset="iso-8859-1"\r\n';
        $message  += 'Content-Transfer-Encoding: 7bit\r\n';
        $message  += $HTML + "\r\n";
        $message  += "--PHP-alt-" + $random_hash + "--\r\n";

        $mail_sent = @mail( $to, $subject, $message, $headers );


};

