<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Admin Control Panel</title>
<style>A:hover {color: #FF0000}</style>
<script language="JavaScript">
function validateform()
{
//validation
	var group = document.form1.group.value;
	var from = document.form1.from.value;
	var replyto = document.form1.replyto.value;
	var subject = document.form1.subject.value;
	var body = document.form1.body.value;

	if(group == "")
	{
	alert( "Please select one or more GROUPS to send email to");
	document.form1.group.focus();
	return false;
	}
	if(from == "")
	{
	alert( "Please enter a FROM email address");
	document.form1.from.focus();
	return false;
	}
	if(replyto == "")
	{
	alert("Please enter a REPLY TO email address");
	document.form1.replyto.focus();
	return false;
	}
	if(subject == "")
	{
	alert("Please enter a SUBJECT");
	document.form1.subject.focus();
	return false;
	}
	if(body == "")
	{
	alert("Please enter your MESSAGE");
	document.form1.body.focus();
	return false;
	}
	return true;
}
</script>
</head>

<body link="#000080" vlink="#000080" alink="#000080" bgcolor="#FFFFFF">

<table border="1" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse" bordercolor="#111111">
  <tr>
    <td width="100%" bgcolor="#000000" colspan="4">
    <table border="0" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse" bordercolor="#111111">
      <tr>
        <td width="100%" background="{images}/hdrBG.gif">
        <img src="{images}/hdr.gif" border="0" width="744" height="26"></td>
      </tr>
    </table>
    </td>
  </tr>
  <tr>
    <td width="20%" bgcolor="#666666" rowspan="2" nowrap valign="top">
    {menu}
    </td>
    <td colspan="3" bgcolor="#E6E6E6">&nbsp;</td>
  </tr>
  <tr>
    <td width="80%" colspan="3" valign="top">&nbsp;<div align="center">
      <center>
	  <form name="form1" method="post" action="email_preview.php"  onSubmit="return validateform()">
      <table border="1" cellpadding="4" width="90%" cellspacing="0">
        <tr>
          <td width="100%" bgcolor="#E6E6E6"><font color="#000080"><b>Send Email</b></font></td>
        </tr>
        <tr>
          <td width="100%" bgcolor="#F7F7F7">
          <p align="left">&nbsp;</p>
                  <table borderColor="#000000" cellSpacing="0" cellPadding="3" border="0" style="border-collapse: collapse">
                    <tr>
                      <td vAlign="top" colspan="2"> <font color="#000080"><b>
                      Send an email to your locations</b></font></td>
                    </tr>
                    <tr>
                      <td vAlign="top" colspan="2">&nbsp;</td>
                    </tr>
                    <tr>
                      <td vAlign="top" colspan="2"><font size="2">Please select
                        your options below to send out an email to your
                      locations.&nbsp; An email will<br>
                      only be sent, if an email address is included in the
                      location's record.</font></td>
                    </tr>
                    <tr>
                      <td vAlign="top" colspan="2"> <hr color="#000080" size="1">
                      </td>
                    </tr>
                    <tr>
                      <td vAlign="top"><font size="2">Send to:</font></td>
                      <td vAlign="top"> <select size="5" name="group[ ]" multiple id="group">
                      <option value="1">All Locations</option>
                      <option value="2">Active Locations Only</option>
                      <option value="3">Preferred Locations Only</option>
                      <option value="4">Hidden Locations Only</option>
                      <option value="5">Pending Locations Only</option>
                      </select><p><font size="2">Please select which locations
                      shall receive this email message by<br>
                      selecting a group from above.&nbsp; Hold down the 'CTRL'
                      button while<br>
                      clicking to select multiple groups.</font></td>
                    </tr>
                    <tr>
                      <td vAlign="top">&nbsp;</td>
                      <td vAlign="top">&nbsp; </td>
                    </tr>
					<tr>
              <td><font size="2">From:</font></td>
                      <td vAlign="top">
                      <input type="text" name="from" size="30" value="{fromemail}"></td>
			</tr>
                    <tr>
                      <td><font size="2">Reply to:</font></td>
                      <td vAlign="top">
                      <input type="text" name="replyto" size="30" value="{replytoemail}"></td>
                    </tr>
                    <tr>
                      <td><font size="2">Subject:</font></td>
                      <td vAlign="top">
                      <input type="text" name="subject" size="50"  value="{subject}"></td>
                    </tr>
                    <tr>
                      <td><font size="2">Format:</font></td>
                      <td vAlign="top">
                      <input type="radio" name="format" value="text" checked><font size="2">Plain
                      Text </font>&nbsp;&nbsp;&nbsp;
                      <input type="radio" value="html" name="format"><font size="2">HTML</font></td>
                    </tr>
                    <tr>
                      <td vAlign="top"><font size="2">Message:</font></td>
                      <td vAlign="top">
                      <textarea rows="15" name="body" cols="45">Hello {email},
</textarea></td>
                    </tr>
                    <tr>
                      <td vAlign="top">&nbsp;</td>
                      <td vAlign="top"><font size="2">You may use the following
                      tags inside your message above to personalize<br>
                      your message to each recipient.&nbsp; An example would be
                      to start the message<br>
                      with: Hello {email},<br>
&nbsp;</font><div align="center">
                        <center>
                        <table border="0" cellpadding="4" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
                          <tr>
                            <td bgcolor="#E6E6E6"><font size="2">{name}</font></td>
                            <td bgcolor="#E6E6E6"><font size="2">- Location Name</font></td>
                          </tr>
                          <tr>
                            <td bgcolor="#FFFFFF"><font size="2">{address1}</font></td>
                            <td bgcolor="#FFFFFF"><font size="2">- Location
                            Address</font></td>
                          </tr>
                          <tr>
                            <td bgcolor="#E6E6E6"><font size="2">{address2}</font></td>
                            <td bgcolor="#E6E6E6"><font size="2">- Location
                            Address 2</font></td>
                          </tr>
                          <tr>
                            <td bgcolor="#FFFFFF"><font size="2">{city}</font></td>
                            <td bgcolor="#FFFFFF"><font size="2">- Location City</font></td>
                          </tr>
                          <tr>
                            <td bgcolor="#E6E6E6"><font size="2">{state}</font></td>
                            <td bgcolor="#E6E6E6"><font size="2">- Location
                            State</font></td>
                          </tr>
                          <tr>
                            <td bgcolor="#FFFFFF"><font size="2">{country}</font></td>
                            <td bgcolor="#FFFFFF"><font size="2">- Location
                            Country</font></td>
                          </tr>
                          <tr>
                            <td bgcolor="#E6E6E6"><font size="2">{zip}</font></td>
                            <td bgcolor="#E6E6E6"><font size="2">- Location Zip
                            Code</font></td>
                          </tr>
                          <tr>
                            <td bgcolor="#FFFFFF"><font size="2">{telephone}</font></td>
                            <td bgcolor="#FFFFFF"><font size="2">- Location
                            Telephone</font></td>
                          </tr>
                          <tr>
                            <td bgcolor="#E6E6E6"><font size="2">{fax}</font></td>
                            <td bgcolor="#E6E6E6"><font size="2">- Location Fax</font></td>
                          </tr>
                          <tr>
                            <td bgcolor="#FFFFFF"><font size="2">{email}</font></td>
                            <td bgcolor="#FFFFFF"><font size="2">- Location
                            Email Address</font></td>
                          </tr>
                          <tr>
                            <td bgcolor="#E6E6E6"><font size="2">{website}</font></td>
                            <td bgcolor="#E6E6E6"><font size="2">- Location
                            website address</font></td>
                          </tr>
                          <tr>
                            <td bgcolor="#FFFFFF"><font size="2">{user1}</font></td>
                            <td bgcolor="#FFFFFF"><font size="2">- User 1 field
                            value</font></td>
                          </tr>
                          <tr>
                            <td bgcolor="#E6E6E6"><font size="2">{user2}</font></td>
                            <td bgcolor="#E6E6E6"><font size="2">- User 2 field
                            value</font></td>
                          </tr>
                          <tr>
                            <td bgcolor="#FFFFFF"><font size="2">{user3}</font></td>
                            <td bgcolor="#FFFFFF"><font size="2">- User 3 field
                            value</font></td>
                          </tr>
                          <tr>
                            <td bgcolor="#E6E6E6"><font size="2">{user4}</font></td>
                            <td bgcolor="#E6E6E6"><font size="2">- User 4 field
                            value</font></td>
                          </tr>
                          <tr>
                            <td bgcolor="#FFFFFF"><font size="2">{user5}</font></td>
                            <td bgcolor="#FFFFFF"><font size="2">- User 5 field
                            value</font></td>
                          </tr>
                          <tr>
                            <td>&nbsp;</td>
                            <td>&nbsp;</td>
                          </tr>
                        </table>
                        </center>
                      </div>
                      </td>
                    </tr>
                    <tr>
                      <td vAlign="top">&nbsp;</td>
                      <td vAlign="top"><font size="2">Click the button below to
                      preview your message..</font></td>
                    </tr>
                    <tr>
                      <td vAlign="top" colspan="2"> <hr color="#000080" size="1">
                      </td>
                    </tr>
                    <tr>
                      <td vAlign="top">&nbsp; </td>
                      <td vAlign="top">
                      <input type="submit" value=" Preview... "></td>
                    </tr>
                  </table>
          <p align="left">&nbsp;</td>
        </tr>
      </table>
	  </form>
      </center>
    </div>
    </td>
  </tr>
  <tr>
    <td width="50%" bgcolor="#000000" colspan="2">&nbsp;</td>
    <td width="50%" bgcolor="#000000" colspan="2"><align="center"><font size="2" color="#FFFFFF">Ultimate Locator {version}</font></td>
  </tr>
</table>

</body>

</html>