<?php 
if(isset($_POST['submit']))  { 
$to  =  "mpetersen@advlitho.com";
$from = "from:newsletter@advlitho.com";
$email_field  =  $_POST['query'];
$subject  =  "subscribe abc1234  address=$email_field";
$body  =  "E-Mail: $email_field\n";

mail($to, $subject, $body, $from);

$m = "<h2>Thanks!</h2>
<p>You have been add to our mailing list.&nbsp;&nbsp;If and when we get around to putting out a quarterly newletter, you will be one of the first to receive it!</p>";
} else { 
$m = "<h2>Hmm</h2>
<p>You have ended up here some how incorrectly.&nbsp;&nbsp;If you would like to join our mailing list, just type in your email in the box on the right and hit join.</p>";
} 
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
		<meta name="generator" content="Notepad FTW!" />
		<meta name="name" content="" />
		<meta name="author" content="studio tomi" />
		<meta name="keywords" content="" />
		<meta name="description" content="" />
		<meta name="robots" content="all" />

		<title>Petersen Advanced Lithography</title>
		<link rel="stylesheet" type="text/css" href="css/litho.css"/>
		<link rel="stylesheet" type="text/css" href="css/extra.css"/>
		<script type="text/javascript" src="scripts/func.js"></script>
		<script type="text/javascript" src="scripts/utility.js"></script>
		<!-- favorite icon -->
		<link rel="SHORTCUT ICON" href="pal.ico" />
	</head>
	<body>
		<div id="overall">
			<div id="server">
				<div id="masthead">
				<a href="../index.html"><img src="images/pal-webheader.jpg" alt="Petersen Advanced lithography"/></a>
					<h1>Petersen Advanced Lithography</h1>
				</div>
				<div id="navhead">
					<ul>
						<li><a href="products.html">Products</a>
							<ul id="products">
								<li><a href="emf3.html">EMF3</a></li>
								<li><a href="idf.html">Image Design Factory</a></li>
								<li><a href="services.html">Image Design Services</a></li>
								<li><a href="toolbox.html">Litho Tool Box</a></li>
								<li><a href="papers.html">Technical Papers</a></li>
							</ul>
						</li>
						<li><a href="corporate.html">Corporate</a>
							<ul id="corporates">
								<li><a href="corporate.html">Mission</a></li>
								<li><a href="history.html">History</a></li>
								<li><a href="board.html">Board of Directors</a></li>
							</ul>
						</li>
						<li><a href="news.html">News</a></li>
						<li><a href="bookstore.html">Bookstore</a></li>
						<li><a href="contact.html">Contact</a></li>
						<!--li><a href="../index.html">Home</a></li-->
					</ul>
				</div>
				<div id="content">
					<div id="serverbar">
						<div id="search">
						<h2>Search</h2>
						<!-- SiteSearch Google -->
						<form method="get" action="http://www.google.com/search">
							<input type="hidden" name="ie" value="UTF-8">
							<input type="hidden" name="oe" value="UTF-8">
							<input TYPE="text" name="q" size="20" maxlength="255" value="">
							<input type="submit" name="btnG" VALUE="Google Search">
							<input type="hidden" name="domains" value="advlitho.com"><input type="hidden" name="sitesearch" value="advlitho.com">
						</form>
						<!--<form action="" method="get">
								<fieldset>
									<legend>Search</legend>
									<input type="text" size="20" value="" name="query">
									<input type="submit" class="button" value="Search">
								</fieldset>
							</form>-->
						</div>
						<div id="news">
							<h2>News</h2>
							<ul>
								<li><a href="#">PAL gets Honored</a></li>
								<li><a href="#">EMF# is here!</a></li>
								<li><a href="#">We will take your money</a></li>
								<li><a href="#">New Paper published</a></li>
							</ul>
						</div>
						<div id="newsletter">
						<h2>Newsletter</h2>
							<form action="mailer.php" method="post">
								<fieldset>
									<legend>Newsletter</legend>
									<input type="text" size="20" value="" name="query">
									<input type="submit" class="button" value="Join">
								</fieldset>
							</form>
						</div>
						<div id="contact">
							<h2>Quick Contact</h2>
							<ul>
								<li><a href="mailto:Sales@Advlitho.com">Sales</a></li>
								<li><a href="mailto:Support@Advlitho.com<">Support</a></li>
								<li><a href="mailto:Info@Advlitho.com">Information</a></li>
								<li><a href="contact.html">Contact Information</a></li>
							</ul>
						</div>
						<div id="breadcrumb">
						<h2><a href="sitemap.html">Site Map</a></h2>
							<ul>
								<li><a href="../index.html">Home</a></li>
								<li>Contact</li>
								<!--<a href=""></a>-->
							</ul>
						</div>
					</div>
					<div id="text">
<?PHP echo $m; ?>
<p>Have a nice day.</p>
          </div>
				</div>
				<div id="footer">
					<p>Copyright Petersen Advanced Lithography 2005</p>
				</div>
			</div>
		</div>
	</body>
</html>
