<!-- 
document.writeln('<div style="text-align:left;">');
document.writeln('<div style="');
document.writeln('   width: 80px; ');
document.writeln('   height: 105px; ');
document.writeln('   margin-right: 20px; ');
document.writeln('   margin-top: 0px; ');
document.writeln('   margin-left: 0px; ');
document.writeln('   margin-bottom: 10px; ');
document.writeln('   float: left;">');
document.writeln('<a href="http://www.willmaster.com" target="_blank"><img src="http://willmaster.com/images/20000710w80105.jpg" width="80" height="105" border="0" alt="author">');
document.writeln('</a>');
document.writeln('</div>');
document.writeln('');
document.writeln('<h2>');
document.writeln('' + '<' + '!' + '-' + '-' + ' title start ' + '-' + '-' + '>' + '');
document.writeln('Testing HTML Emails');
document.writeln('' + '<' + '!' + '-' + '-' + ' title end ' + '-' + '-' + '>' + '');
document.writeln('</h2>');
document.writeln('');
document.writeln('<p>by <a target="_blank" href="http://www.willmaster.com"><i>Will Bontrager</i></a>');
document.writeln('<br />Copyright 2012 <a target="_blank" href="http://www.willmaster.com">Will Bontrager Software, LLC</a>');
document.writeln('</p>');
document.writeln('' + '<' + '!' + '-' + '-' + ' article start ' + '-' + '-' + '>' + '');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('<p>');
document.writeln('This article contains the source code of a PHP scr' + 'ipt that can be used to send an HTML email to yourself for testing before the email is sent to a list.');
document.writeln('</p>');
document.writeln('<p>');
document.writeln('HTML emails are constructed with HTML tags much like web pages are. But there are some caveats, which the test email may reveal depending on which email reading software is being used.');
document.writeln('</p>');
document.writeln('<p>');
document.writeln('When testing HTML email to be sent to a list, it is prudent to read the test email on as many different email readers as feasible.');
document.writeln('</p>');
document.writeln('<p>');
document.writeln('Some caveats:');
document.writeln('</p>');
document.writeln('<ol>');
document.writeln('<li>');
document.writeln('<p>');
document.writeln('URLs need to be absolute http://... URLs. Relative URLs will not work.');
document.writeln('</p>');
document.writeln('<p>');
document.writeln('Relative URLs indicate a URL relative to the location of a web page. The HTML email is not an actual web page nor is it on the server from where it originated. Thus, any relative URLs are broken.');
document.writeln('</p>');
document.writeln('<p>');
document.writeln('Look for relative URLs in href and src attributes and change them to absolute URLs.');
document.writeln('</p>');
document.writeln('</li>');
document.writeln('<li>');
document.writeln('<p>');
document.writeln('No JavaScr' + 'ipt.');
document.writeln('</p>');
document.writeln('<p>');
document.writeln('It\'s not that you can\'t embed JavaScr' + 'ipt. You can. But most email reading software will either ignore it or convert it into visible code.');
document.writeln('</p>');
document.writeln('</li>');
document.writeln('<li>');
document.writeln('<p>');
document.writeln('Any code to import files from the internet might be ignored by the email reading software. Examples are CSS styles and images. It generally depends on the preferences set up in the software.');
document.writeln('</p>');
document.writeln('<p>');
document.writeln('If a required CSS style sheet is not imported, the email will render without the CSS styles.');
document.writeln('</p>');
document.writeln('<p>');
document.writeln('If possible, embed CSS styles within the email content rather than importing it. A CSS style sheet can be embedded within the email content in the head section of the content source code. Inline styles can also be used.');
document.writeln('</p>');
document.writeln('<p>');
document.writeln('Images might not display by default, leaving it up to the email recipient to click something to display the images.');
document.writeln('</p>');
document.writeln('<p>');
document.writeln('This is generally less critical than CSS styles. However, if images absolutely must display, there is a way to embed images instead of using an img tag. It is, however, outside the scope of this article. The technique uses multi-part email and encoded images.');
document.writeln('</p>');
document.writeln('<p>');
document.writeln('The thing to remember is any request to import a file from a server on the internet may fail to import except with the email recipient\'s express permission.');
document.writeln('</p>');
document.writeln('</li>');
document.writeln('<li>');
document.writeln('<p>');
document.writeln('The email content needs to have HTML markup. Otherwise, it will tend to all run into one paragraph.');
document.writeln('</p>');
document.writeln('</li>');
document.writeln('</ol>');
document.writeln('<p>');
document.writeln('</p>');
document.writeln('');
document.writeln('<h3>The Scr' + 'ipt to Send an HTML Email for Testing</h3>');
document.writeln('<p>');
document.writeln('Upload the PHP scr' + 'ipt to your server in a password protected area, if possible. Then type its URL into your browser.');
document.writeln('</p>');
document.writeln('<p>');
document.writeln('The control panel of the PHP scr' + 'ipt itself is password protected. Putting it into a password protected area is additional security.');
document.writeln('</p>');
document.writeln('<p>');
document.writeln('Here is the PHP scr' + 'ipt to send an HTML email. Customization instructions below.');
document.writeln('</p>');
document.writeln('');
document.writeln('<pre onclick="containerSelect(this)" style="max-width:300px; min-height:25px; max-height:200px; border:1px solid black; padding:10px; overflow:auto; margin:0 0 25px 0;">');
document.writeln('&lt;?php');
document.writeln('/* ');
document.writeln('   Scr' + 'ipt to Send an HTML Email for Testing');
document.writeln('   Version 1.0');
document.writeln('   January 30, 2012');
document.writeln('');
document.writeln('   Will Bontrager Software, LLC');
document.writeln('   http://www.willmaster.com/');
document.writeln('   Copyright 2012 Will Bontrager Software, LLC');
document.writeln('');
document.writeln('   This software is provided "AS IS," without ');
document.writeln('   any warranty of any kind, without even any ');
document.writeln('   implied warranty such as merchantability ');
document.writeln('   or fitness for a particular purpose.');
document.writeln('   Will Bontrager Software, LLC grants ');
document.writeln('   you a royalty free license to use or ');
document.writeln('   modify this software provided this ');
document.writeln('   notice appears on all copies. ');
document.writeln('*/');
document.writeln('//////////////////////////////////////////////////');
document.writeln('//');
document.writeln('// Customizations:');
document.writeln('// Specify a username and password for accessing the control panel.');
document.writeln('');
document.writeln('$Username = "username";');
document.writeln('$Password = "password";');
document.writeln('');
document.writeln('// End of customization.');
document.writeln('//////////////////////////////////////////////////');
document.writeln('$SoftwareName = \'Scr' + 'ipt to Send an HTML Email for Testing\';');
document.writeln('$Version = \'1.0\';');
document.writeln('$Message = \'\';');
document.writeln('$LoginCookieName = \'Scr' + 'iptToSendAnHTMemailForTesting\';');
document.writeln('$TestingCookieName = \'HTMemailForTestingMemory\';');
document.writeln('$Username = trim($Username);');
document.writeln('$Password = trim($Password);');
document.writeln('');
document.writeln('if( empty($_POST[\'log_in\']) and empty($_COOKIE[$LoginCookieName]) ) { LogIn(); }');
document.writeln('else');
document.writeln('{');
document.writeln('   if( isset($_POST[\'log_in\']) ) { SetLoginCookie(); }');
document.writeln('   elseif( isset($_POST[\'mail_it\']) ) { MailIt(); }');
document.writeln('   ControlPanel();');
document.writeln('}');
document.writeln('');
document.writeln('');
document.writeln('function PageTop()');
document.writeln('{');
document.writeln('   global $Message;');
document.writeln('   $me = $_SERVER[\'PHP_SELF\'];');
document.writeln('   echo &lt;&lt;&lt;TOPOFPAGE');
document.writeln('&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;');
document.writeln('&lt;html lang="en"&gt;');
document.writeln('&lt;head&gt;');
document.writeln('&lt;meta http-equiv="Content-Type" content="text/html;charset=utf-8" &gt;');
document.writeln('&lt;title&gt;Scr' + 'ipt to Send an HTML Email for Testing&lt;/title&gt;');
document.writeln('&lt;style type="text/css"&gt;');
document.writeln('body { margin:0; font-family:sans-serif; }');
document.writeln('th { font-size:12px; }');
document.writeln('td { padding-top:3px; }');
document.writeln('p, li, td { font-size:14px; line-height:120%; }');
document.writeln('a { text-decoration:none; }');
document.writeln('.width { width:500px; }');
document.writeln('.col1 { width:100px; }');
document.writeln('.col2 { width:400px; }');
document.writeln('#content { margin:0 0 0 150px; padding:75px 0 100px 50px; width:500px; }');
document.writeln('&lt;/style&gt;');
document.writeln('&lt;/head&gt;');
document.writeln('&lt;body&gt;&lt;div id="content"&gt;');
document.writeln('&lt;a href="http://www.willmaster.com/"&gt;');
document.writeln('&lt;img style="position:absolute; left:250px; top:20px;" src="http://www.willmaster.com/images/wmlogo_icon.gif" width="50" height="50" border="0" alt="Willmaster.com logo"&gt;&lt;/a&gt;');
document.writeln('&lt;h3 style="margin-bottom:50px;"&gt;Scr' + 'ipt to Send an HTML Email for Testing&lt;/h3&gt;');
document.writeln('&lt;form method="post" action="$me" style="margin-bottom:25px;"&gt;');
document.writeln('$Message');
document.writeln('TOPOFPAGE;');
document.writeln('} # function PageTop()');
document.writeln('');
document.writeln('');
document.writeln('function PageBottom()');
document.writeln('{');
document.writeln('   global $SoftwareName, $Version;');
document.writeln('   echo &lt;&lt;&lt;BOTTOMOFPAGE');
document.writeln('&lt;/form&gt;');
document.writeln('&lt;hr width="100" align="left"&gt;');
document.writeln('&lt;p style="margin-top:0;"&gt;');
document.writeln('$SoftwareName, version $Version&lt;br&gt;');
document.writeln('Copyright 2012 &lt;a href="http://www.willmaster.com/"&gt;Will Bontrager Software, LLC&lt;/a&gt;');
document.writeln('&lt;/p&gt;');
document.writeln('&lt;/div&gt;');
document.writeln('&lt;/body&gt;');
document.writeln('&lt;/html&gt;');
document.writeln('BOTTOMOFPAGE;');
document.writeln('} # function PageBottom()');
document.writeln('');
document.writeln('');
document.writeln('function LogIn()');
document.writeln('{');
document.writeln('   PageTop();');
document.writeln('   echo &lt;&lt;&lt;LOGIN');
document.writeln('&lt;table border="0" cellpadding="0" cellspacing="0"&gt;');
document.writeln('&lt;tr&gt;');
document.writeln('&lt;td class="col1"&gt;Username:&amp;nbsp;&lt;/td&gt;');
document.writeln('&lt;td&gt;&lt;input type="text" name="un" class="col2"&gt;&lt;/td&gt;');
document.writeln('&lt;/tr&gt;');
document.writeln('&lt;tr&gt;');
document.writeln('&lt;td class="col1"&gt;Password:&amp;nbsp;&lt;/td&gt;');
document.writeln('&lt;td&gt;&lt;input type="password" name="pw" class="col2"&gt;&lt;/td&gt;');
document.writeln('&lt;/tr&gt;');
document.writeln('&lt;tr&gt;');
document.writeln('&lt;td&gt;&amp;nbsp;&lt;/td&gt;');
document.writeln('&lt;td style="padding-top:6px;"&gt;&lt;input type="submit" name="log_in" value="Log In" class="col2"&gt;&lt;/td&gt;');
document.writeln('&lt;/tr&gt;');
document.writeln('&lt;/table&gt;');
document.writeln('LOGIN;');
document.writeln('   PageBottom();');
document.writeln('} # function LogIn()');
document.writeln('');
document.writeln('');
document.writeln('function SetLoginCookie()');
document.writeln('{');
document.writeln('   global $Username, $Password, $LoginCookieName;');
document.writeln('   if( $_POST[\'un\'] == $Username and $_POST[\'pw\'] == $Password )');
document.writeln('   {');
document.writeln('      setcookie($LoginCookieName,\'1\');');
document.writeln('      ControlPanel();');
document.writeln('   }');
document.writeln('   else');
document.writeln('   {');
document.writeln('      LogIn();');
document.writeln('      exit;');
document.writeln('   }');
document.writeln('} # function SetLoginCookie()');
document.writeln('');
document.writeln('');
document.writeln('function MailIt()');
document.writeln('{');
document.writeln('   global $Message, $TestingCookieName;');
document.writeln('   $to = stripslashes(trim($_POST[\'to\']));');
document.writeln('   $charset = stripslashes(trim($_POST[\'charset\']));');
document.writeln('   $charset = preg_replace(\'/["\'."\'".\']/\',\'\',$charset);');
document.writeln('   $subject = stripslashes(trim($_POST[\'subject\']));');
document.writeln('   $body = stripslashes(trim($_POST[\'body\']));');
document.writeln('   if( strpos($body,"\\n") === false ) { $body = str_replace("\\r","\\n",$body); }');
document.writeln('   else { $body = str_replace("\\r",\'\',$body); }');
document.writeln('   $headers = array();');
document.writeln('   $headers[] = \'Mime-Version: 1.0\';');
document.writeln('   $headers[] = "Content-type: text/html; charset=$charset";');
document.writeln('   $headers[] = "From: $to";');
document.writeln('   mail($to,$subject,$body,implode("\\n",$headers));');
document.writeln('   $Message = &lt;&lt;&lt;MAILINGSENT');
document.writeln('&lt;div style="border:1px solid black; padding:25px; margin:35px 0 50px 0;"&gt;');
document.writeln('&lt;p style="margin:0;"&gt;');
document.writeln('A test email has been sent to $to');
document.writeln('&lt;/p&gt;');
document.writeln('&lt;/div&gt;');
document.writeln('MAILINGSENT;');
document.writeln('   setcookie($TestingCookieName,"to=$to&amp;charset=$charset&amp;subject=$subject",time() + (10 * 365 * 24 * 60 * 60));');
document.writeln('} # function MailIt()');
document.writeln('');
document.writeln('');
document.writeln('function ControlPanel()');
document.writeln('{');
document.writeln('   global $TestingCookieName;');
document.writeln('   $prefil = array();');
document.writeln('   $prefil[\'to\'] = $prefil[\'charset\'] = $prefil[\'subject\'] = \'\';');
document.writeln('   if( isset($_COOKIE[$TestingCookieName]) )');
document.writeln('   {');
document.writeln('      foreach( explode(\'&amp;\',$_COOKIE[$TestingCookieName]) as $piece )');
document.writeln('      {');
document.writeln('         list($key,$value) = explode(\'=\',$piece,2);');
document.writeln('         $prefil[$key] = $value;');
document.writeln('      }');
document.writeln('   }');
document.writeln('   $to = $prefil[\'to\'];');
document.writeln('   $charset = $prefil[\'charset\'];');
document.writeln('   $subject = $prefil[\'subject\'];');
document.writeln('   PageTop();');
document.writeln('   echo &lt;&lt;&lt;CP');
document.writeln('&lt;table border="0" cellpadding="0" cellspacing="0"&gt;');
document.writeln('&lt;tr&gt;');
document.writeln('&lt;td class="col1"&gt;Email To:&amp;nbsp;&lt;/td&gt;');
document.writeln('&lt;td&gt;&lt;input type="text" name="to" class="col2" value="$to"&gt;&lt;/td&gt;');
document.writeln('&lt;/tr&gt;');
document.writeln('&lt;tr&gt;');
document.writeln('&lt;td class="col1"&gt;Character Set:&amp;nbsp;&lt;/td&gt;');
document.writeln('&lt;td&gt;&lt;input type="text" name="charset" class="col2" value="$charset"&gt;&lt;/td&gt;');
document.writeln('&lt;/tr&gt;');
document.writeln('&lt;tr&gt;');
document.writeln('&lt;td class="col1"&gt;Subject:&amp;nbsp;&lt;/td&gt;');
document.writeln('&lt;td&gt;&lt;input type="text" name="subject" class="col2" value="$subject"&gt;&lt;/td&gt;');
document.writeln('&lt;/tr&gt;');
document.writeln('&lt;tr&gt;');
document.writeln('&lt;td colspan="2"&gt;Email content:&lt;br&gt;');
document.writeln('&lt;textarea name="body" class="width" style="height:200px;"&gt;&lt;/textarea&gt;&lt;/td&gt;');
document.writeln('&lt;/tr&gt;');
document.writeln('&lt;tr&gt;');
document.writeln('&lt;td colspan="2" style="padding-top:9px;"&gt;&lt;input type="submit" name="mail_it" value="Send Test Email" class="width"&gt;&lt;/td&gt;');
document.writeln('&lt;/tr&gt;');
document.writeln('&lt;/table&gt;');
document.writeln('CP;');
document.writeln('   PageBottom();');
document.writeln('} # function ControlPanel()');
document.writeln('?&gt;');
document.writeln('</pre>');
document.writeln('');
document.writeln('<p>');
document.writeln('<b>');
document.writeln('Customization:');
document.writeln('</b>');
document.writeln('</p>');
document.writeln('<p>');
document.writeln('Two things need to be customized, the control panel username and the control panel password. You\'ll find them at about lines 25 and 26 of the PHP scr' + 'ipt.');
document.writeln('</p>');
document.writeln('<p>');
document.writeln('The PHP scr' + 'ipt file can be named anything you wish, so long as has a .php extension. Example: mailtester.php');
document.writeln('</p>');
document.writeln('<p>');
document.writeln('If you have no secure area for the scr' + 'ipt, give the file a name unlikely to be guessed, like sdfks32332dSSSds.php (but something different, as that name suggestion is published here). Then, spammers are less likely to find it by guessing the file name.');
document.writeln('</p>');
document.writeln('<p>');
document.writeln('When the customization is done, upload the PHP scr' + 'ipt to the server. Then, type its URL into your browser.');
document.writeln('</p>');
document.writeln('<h3>');
document.writeln('Using the PHP Scr' + 'ipt Control Panel');
document.writeln('</h3>');
document.writeln('<p>');
document.writeln('When the URL of the PHP scr' + 'ipt is first loaded into the browser, you will be asked to log in. Use the username and password specified in the scr' + 'ipt when the customization was done.');
document.writeln('</p>');
document.writeln('<p>');
document.writeln('Cookies are required.');
document.writeln('</p>');
document.writeln('<p>');
document.writeln('After logging in, you\'ll see four form fields.');
document.writeln('</p>');
document.writeln('<ol>');
document.writeln('<li>');
document.writeln('<p>');
document.writeln('<b>Email To:</b> Type in the email address to send the test email to.');
document.writeln('</p>');
document.writeln('</li>');
document.writeln('<li>');
document.writeln('<p>');
document.writeln('<b>Character Set:</b> Type in the character set to use for the email. Unless there is reason to do otherwise, specify <nobr>"utf-8"</nobr> (no quotes). For a list of character sets, perhaps incomplete, <a href="http://www.lsoft.com/manuals/maestro/4.0/htmlhelp/interface%20user/CharacterSets.html">click here.</a>');
document.writeln('</p>');
document.writeln('</li>');
document.writeln('<li>');
document.writeln('<p>');
document.writeln('<b>Subject:</b> The subject line for the email.');
document.writeln('</p>');
document.writeln('</li>');
document.writeln('<li>');
document.writeln('<p>');
document.writeln('<b>Email content:</b> The source code of the HTML email. (The source code is the content with HTML tags.)');
document.writeln('</p>');
document.writeln('</li>');
document.writeln('</ol>');
document.writeln('<p>');
document.writeln('You now have a way to test HTML emails.');
document.writeln('</p>');
document.writeln('<p>');
document.writeln('As stated before, it is prudent to read the test HTML email on as many different email readers as feasible before sending it to a list.');
document.writeln('</p>');
document.writeln('<h3>Sending HTML Email to a List</h3>');
document.writeln('<p>');
document.writeln('Sending HTML email to a list, of course, requires software that inserts the special headers required to send HTML email.');
document.writeln('</p>');
document.writeln('<p>');
document.writeln('If you don\'t already have such software, have a look at <a href="http://www.willmaster.com/software/b-mailer/"><span style="white-space:nowrap;">B-Mailer.</span></a> The subscr' + 'iption list mailer has many features for your convenience, including the ability to send test emails to yourself. No separate software required.');
document.writeln('</p>');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('' + '<' + '!' + '-' + '-' + ' article end ' + '-' + '-' + '>' + '');
document.writeln('<p style="font-style: italic">');
document.writeln('Will Bontrager');
document.writeln('</p>');
document.writeln('');
document.writeln('<p>');
document.writeln('This weekly Possibilities ezine article provided courtesy of<br>');
document.writeln('<a target="_blank" href="http://willmaster.com/possibilities/">Will Bontrager Software, LLC</a>');
document.writeln('<scr' + 'ipt type="text/javascr' + 'ipt" language="JavaScr' + 'ipt">' + '<' + '!' + '-' + '-' + '');
document.writeln('var statsurl = \'http://www.willmaster.com/possibilities/syndication/fromload.mth\';');
document.writeln('statsurl += \'?from=\'+escape(document.URL)+\'&title=\'+escape(document.title);');
document.writeln('statsurl += \'&1\'+Math.random();');
document.writeln('document.write(\'<img src="\'+statsurl+\'" height="1" width="2" border="0">\');');
document.writeln('//' + '-' + '-' + '>' + '</scr' + 'ipt>');
document.writeln('');
document.writeln('<scr' + 'ipt type="text/javascr' + 'ipt">');
document.writeln('function containerSelect(id) {');
document.writeln('containerUnselect();');
document.writeln('if(document.selection) {');
document.writeln('	var range = document.body.createTextRange();');
document.writeln('	range.moveToElementText(id);');
document.writeln('	range.select();');
document.writeln('	}');
document.writeln('else if(window.getSelection) {');
document.writeln('	var range = document.createRange();');
document.writeln('	range.selectNode(id);');
document.writeln('	window.getSelection().addRange(range);');
document.writeln('	}');
document.writeln('}');
document.writeln('function containerUnselect() {');
document.writeln('if (document.selection) { document.selection.empty(); }');
document.writeln('else if (window.getSelection) { window.getSelection().removeAllRanges(); }');
document.writeln('}');
document.writeln('</scr' + 'ipt>');
document.writeln('');
document.writeln('<form target="_blank" name="a1182735724a" id="a1182735724a" action="http://www.willmaster.com/possibilities/cgi-bin/b-mailer/bmailerSubscribe.cgi" method="POST">');
document.writeln('<table border="1" cellpadding="11" cellspacing="0"><tr><td>');
document.writeln('<p style="font-weight:bold;margin:0">Subscribe to the Possibilities Ezine here</p>');
document.writeln('<input type="hidden" name="FormTypeDefault" value="T"><input type="hidden" name="redirect" value="http://willmaster.com/possibilities/thsubscribe.shtml"><input type="hidden" name="c1182735724c" value="999"><input type="hidden" name="id" value="a1182735724a">');
document.writeln('<input type="text" name="subname" size="15" value="Name" onkeyup="f311827357243f()" onclick="javascr' + 'ipt:f211827357242f(\'subname\',\'Name\');">');
document.writeln('<input type="text" name="subemail" size="15" value="Email" onkeyup="f311827357243f()" onclick="javascr' + 'ipt:f211827357242f(\'subemail\',\'Email\');">');
document.writeln('<input type="submit" value="Subscribe Free!" onclick="return f1182735724f();">');
document.writeln('</td></tr></table>');
document.writeln('</form>');
document.writeln('<scr' + 'ipt type="text/javascr' + 'ipt" language="JavaScr' + 'ipt">' + '<' + '!' + '-' + '-' + '');
document.writeln('var c311827357243c = \'document.\'+"a1182735724a"+\'.\'+"c1182735724c"+".value"+\'=\'+"5";');
document.writeln('function StripSpacesFromEnds(s) {');
document.writeln('while((s.indexOf(\' \',0) == 0) && (s.length> 1)) { s = s.substring(1,s.length); }');
document.writeln('while((s.lastIndexOf(\' \') == (s.length - 1)) && (s.length> 1)) { s = s.substring(0,(s.length - 1)); }');
document.writeln('if((s.indexOf(\' \',0) == 0) && (s.length == 1)) { s = \'\'; }');
document.writeln('return s;');
document.writeln('}');
document.writeln('function RemoveEmbeddedSpaces(s) {');
document.writeln('var i = s.indexOf(\' \',0);');
document.writeln('while(i > -1)');
document.writeln('{');
document.writeln('s = s.substring(0,i) + s.substring((i + 1),s.length);');
document.writeln('i = s.indexOf(\' \',0);');
document.writeln('}');
document.writeln('return s;');
document.writeln('}');
document.writeln('function IsItPresent(s) {');
document.writeln('if(s.length > 0) { return true; }');
document.writeln('return false;');
document.writeln('}');
document.writeln('function CheckEmail(s_email) {');
document.writeln('s_email = StripSpacesFromEnds(s_email);');
document.writeln('s_email = RemoveEmbeddedSpaces(s_email);');
document.writeln('if(IsItPresent(s_email) == false) { return false; }');
document.writeln('if( (s_email.length <6) ||');
document.writeln('    (s_email.indexOf(\'@\',0) < 1) ||');
document.writeln('    (s_email.lastIndexOf(\'@\') != s_email.indexOf(\'@\',0)) ||');
document.writeln('    (s_email.lastIndexOf(\'@\') > (s_email.length - 5)) ||');
document.writeln('    (s_email.indexOf(\'..\',0) > -1) ||');
document.writeln('    (s_email.indexOf(\'@.\',0) > -1) ||');
document.writeln('    (s_email.indexOf(\'.@\',0) > -1) ||');
document.writeln('    (s_email.indexOf(\',\',0)  > -1) )');
document.writeln('{ return false; }');
document.writeln('return true;');
document.writeln('}');
document.writeln('function f311827357243f() {');
document.writeln('document.a1182735724a.c1182735724c.value *= 13;');
document.writeln('eval(c311827357243c);');
document.writeln('}');
document.writeln('function f1182735724f() {');
document.writeln('var ret = true;');
document.writeln('if( (document.a1182735724a.subemail.value == \'Email\') || (document.a1182735724a.subemail.value.length < 1) ) { alert(\'Your email address is required.\'); ret = false; }');
document.writeln('else if(CheckEmail(document.a1182735724a.subemail.value) == false) { alert(\'Your email address is formatted incorrectly.\'); ret = false; }');
document.writeln('if( ret && (document.a1182735724a.subemail.value.length > 5) ) { eval(c311827357243c); }');
document.writeln('return ret;');
document.writeln('}');
document.writeln('function f211827357242f(k,v) {');
document.writeln('var ev = new String();');
document.writeln('eval(\'ev = document.a1182735724a.\' + k + \'.value\');');
document.writeln('if(ev == v) { eval(\'document.a1182735724a.\' + k + ".value = \'\'"); }');
document.writeln('}');
document.writeln('//' + '-' + '-' + '>' + '</scr' + 'ipt>');
document.writeln('</div>');
// -->

