<table width="100%" cellpadding="0" cellspacing="0" border="0">
	<tr><td class="nav"><a href="index.php?section=home">Home</a>&nbsp;&gt;&nbsp;<a href="index.php?section=ads&theme=<?php echo $data["theme"] ?>">Advertisements</a>&nbsp;&gt;&nbsp;<a href="index.php?section=ads&action=create_campaign&theme=<?php echo $data["theme"]; ?>">Create New Campaign</a></td></tr>
	<tr><td>&nbsp;</td></tr>
	<tr><td><table cellpadding="5" cellspacing="2" border="0" align="center" width="400">
		<tr><td class="form_cell"><table cellpadding="0" cellspacing="3" border="0" align="center" width="400">
		<form action="index.php" method="post">
		<input type="hidden" name="section" value="ads">
		<input type="hidden" name="action" value="do_create_campaign">
		<input type="hidden" name="theme" value="<?php echo $data["theme"]; ?>">
			<tr><td class="body" width="150">Campaign Name:</td><td class="highlight"><?php
			admin_form_element( array ("type" => "input", "name" => "name", "size" =>30, "value" => $data["values"]["name"]) );
			?></td></tr>
			<tr><td class="body" valign="top">Campaign Type:</td><td class="highlight"><table cellpadding="0" cellspacing="2" border="0">
				<tr><td><?php
				admin_form_element( array ("type" => "radio", "name" => "type", "ovalue" => "external", "value" => $data["values"][type], "javascript" => "onclick='HS_UpdateCostType(this.form)'") );
				?></td><td class="highlight">External</td></tr>
				<tr><td><?php
				admin_form_element( array ("type" => "radio", "name" => "type", "ovalue" => "ppc", "value" => $data["values"][type], "javascript" => "onclick='HS_UpdateCostType(this.form)'") );
				?></td><td class="highlight">Pay Per Click</td></tr>
				<tr><td><?php
				admin_form_element( array ("type" => "radio", "name" => "type", "ovalue" => "impressions", "value" => $data["values"][type], "javascript" => "onclick='HS_UpdateCostType(this.form)'") );
				?></td><td class="highlight">Impressions</td></tr>
				<tr><td><?php
				admin_form_element( array ("type" => "radio", "name" => "type", "ovalue" => "subscription", "value" => $data["values"][type], "javascript" => "onclick='HS_UpdateCostType(this.form)'") );
				?></td><td class="highlight">Subscription</td></tr>
			</table></td></tr>
			<tr id="cost_row" <?php echo ($data["values"][type] == "external") ? "style='display:none'" : ""; ?>><td class="body">Cost:</td><td class="highlight"><table cellpadding="0" cellspacing="2" border="0">
				<tr><td><?php
				include_once(DOC_ROOT."/themes/".$data["theme"]."/options/currencies.inc.php");
				admin_form_element( array ("type" => "select", "name" => "currency", "value" => $data["values"][currency], "options" => $options) );
				?></td><td><?php
				admin_form_element( array ("type" => "input", "size" => 5, "javascript" => "style='width:50px'", "name" => "price", "value" => $data["values"][price]) );
				?></td><td class="highlight"><div id="cost_type"></div></td></tr>
			</table></td></tr>
			<tr id="credit_row" <?php echo ($data["values"][type] == "external") ? "style='display:none'" : ""; ?>><td class="body">Initial Credit<br><small>in a same currency as cost</small></td><td valign="top" class="highlight"><?php
			admin_form_element( array ("type" => "input", "size" => 5, "javascript" => "style='width:50px'", "name" => "credit", "value" => $data["values"][credit]) );
			?></td></tr>
			<tr><td class="body">Campaign Start</td><td><?php
			$field["name"]  = "start";
			$field["value"] = $data["values"][start];
			$field["dets"][0] = "start";
			$field["dets"][1] = 1;
			echo build_field("date",$field);
			?></td></tr>
			<tr><td class="body" valign="top">Campaign End</td><td><table cellpadding="0" cellspacing="2" border="0">
				<tr><td width="20"><?php
				$value = ($data["values"][end]) ? 1 : 0;
				admin_form_element( array ("type" => "radio", "name" => "cend", "ovalue" => "0", "value" => $value) );
				?></td><td class="highlight" width="100%">unlimited</td></tr>
				<tr><td><?php
				admin_form_element( array ("type" => "radio", "name" => "cend", "ovalue" => "1", "value" => $value) );
				?></td><td class="highlight">date</td></tr><tr><td colspan="2"><?php
				$field["name"]  = "end";
				$field["value"] = $data["values"][end];
				$field["dets"][0] = "end";
				$field["dets"][1] = 1;
				echo build_field("date",$field);
				?></td></tr>
			</table></td></tr>
			<tr><td colspan="2" align="center"><?php
			admin_form_element( array ("type" => "button", "value" => "Back", "link" => $data["link"]) );
			echo "&nbsp;";
			admin_form_element( array ("type" => "button", "value" => "Create") );
			?></td></tr>
		</form>
		</table></td></tr>
	</table></td></tr>
</table>