<script type='text/javascript'>
function validateForm() 
 {
     var valid_input = true;
     var formerror = document.getElementById("form_error");
     var emailerror = document.getElementById("email_error");
     var levelserror = document.getElementById("levels_error");
     var baseerror = document.getElementById("base_error");
     var notrunerror = document.getElementById("notrun_error");
     var testedwitherror = document.getElementById("testedwith_error");

     if (document.forms["textmaker"]["email"].value.search("@") == -1) 
     {
         emailerror.style.display = "inline";
         valid_input = false;
     }
     else
     {
         emailerror.style.display = "none";
     }

     if (document.forms["textmaker"]["new_levels"].value == "Number of levels or 'None'") 
     {
         levelserror.style.display = "inline";
         valid_input = false;
     }
     else
     {
         levelserror.style.display = "none";
     }
     
     if(document.forms["textmaker"]["base"].value == "New from scratch or Modified version of (name of original file)")
     {
         baseerror.style.display = "inline";
         valid_input = false;
     }
     else
     {
         baseerror.style.display = "none";
     }
     
     if(document.forms["textmaker"]["not_run"].value == "Engines/ports/EXEs known to have problems with it")
     {
         notrunerror.style.display = "inline";
         valid_input = false;
     }
     else
     {
         notrunerror.style.display = "none";
     }

     if(document.forms["textmaker"]["tested_with"].value == "Engines/ports/EXEs used to test (include version numbers)")
     {
         testedwitherror.style.display = "inline";
         valid_input = false;
     }
     else
     {
         testedwitherror.style.display = "none";
     }

     if(valid_input == false)
     {
         formerror.style.display = "inline";
     }
     else
     {
         formerror.style.display = "none";
     }

     return valid_input;
 }
</script>

<form name="textmaker" action="textmaker.php" method="POST" onsubmit="return validateForm()">

<table>
	<tr>
		<td class="textmaker_label">
			Msg to archive maintainer
		</td>
		<td class="textmaker_field">
			<textarea rows="1" cols="50" name="archive_maintainer"></textarea>
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			Update to
		</td>
		<td class="textmaker_field">
			<input type="text" size="50" name="update_to">
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			Advanced engine needed
		</td>
		<td class="textmaker_field">
			<input type="text" size="50" name="engine_needed">
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			Primary purpose
		</td>
		<td class="textmaker_field">
			<select name="primary_purpose">
			<option>Single play
			<option>Single + coop play
			<option>Coop play
			<option>Deathmatch
			<option>Other multiplayer
			<option>No levels included
			</select>
		</td>
	</tr>
	<tr>
		<td colspan="2">
		<hr>
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			Title
		</td>
		<td class="textmaker_field">
			<input type="text" size="50" name="title">
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			Filename
		</td>
		<td class="textmaker_field">
			<input type="text" size="50" name="filename">
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			Release date
		</td>
		<td class="textmaker_field">
			<input type="text" size="50" name="release_date">
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			Author
		</td>
		<td class="textmaker_field">
			<input type="text" size="50" name="author">
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			E-mail address
			<span id="email_error" class="textmaker_error"> ***</span>
		</td>
		<td class="textmaker_field">
			<input type="text" size="50" name="email">
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			Other files by author
		</td>
		<td class="textmaker_field">
			<textarea rows="2" cols="50" name="other_files"></textarea>
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			Misc. author info
		</td>
		<td class="textmaker_field">
			<textarea rows="2" cols="50" name="misc_info"></textarea>
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			Description
		</td>
		<td class="textmaker_field">
			<textarea rows="4" cols="50" name="description"></textarea>
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			Additional credits to
		</td>
		<td class="textmaker_field">
			<textarea rows="2" cols="50" name="credits"></textarea>
		</td>
	</tr>
	<tr>
		<td colspan="2" height="60" valign="bottom">
		<hr>
		<h3>What is included</h3>
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			New levels
			<span id="levels_error" class="textmaker_error"> ***</span>
		</td>
		<td class="textmaker_field">
			<input type="text" size="50" name="new_levels" value="Number of levels or 'None'">
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			Sounds
		</td>
		<td class="textmaker_field">
			<input type="checkbox" name="sounds">
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			Music
		</td>
		<td class="textmaker_field">
			<input type="checkbox" name="music">
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			Graphics
		</td>
		<td class="textmaker_field">
			<input type="checkbox" name="graphics">
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			Dehacked/BEX patch
		</td>
		<td class="textmaker_field">
			<input type="checkbox" name="dehacked">
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			Demos
		</td>
		<td class="textmaker_field">
			<input type="checkbox" name="demos">
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			Other
		</td>
		<td class="textmaker_field">
			<input type="text" size="50" name="other" value="No">
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			Other files required
		</td>
		<td class="textmaker_field">
			<input type="text" size="50" name="other_files_required" value="None">
		</td>
	</tr>
	<tr>
		<td colspan="2" height="60" valign="bottom">
		<h3>Play Information</h3>
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			Game
		</td>
		<td class="textmaker_field">
			<select name="game">
			<option>Doom 2
			<option>Doom
			<option>Final Doom
			<option>Heretic
			<option>Hexen
			<option>Strife
			<option>Chex Quest
			</select>
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			Map #
		</td>
		<td class="textmaker_field">
			<input type="text" size="50" name="map">
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			Single Player
		</td>
		<td class="textmaker_field">
			<select name="single_player">
			<option>Designed for
			<option>Player starts only
			<option>No
			</select>
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			Cooperative 2-4 Player
		</td>
		<td class="textmaker_field">
			<select name="coop">
			<option>Designed for
			<option>Player starts only
			<option>No
			</select>
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			Deathmatch 2-4 Player
		</td>
		<td class="textmaker_field">
			<select name="dm">
			<option>Designed for
			<option>Player starts only
			<option>No
			</select>
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			Other game styles
		</td>
		<td class="textmaker_field">
			<input type="text" size="50" name="other_game_styles" value="None">
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			Difficulty Settings
		</td>
		<td class="textmaker_field">
			<input type="checkbox" name="difficulty">
		</td>
	</tr>
	<tr>
		<td colspan="2" height="60" valign="bottom">
		<h3>Construction</h3>
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			Base
			<span id="base_error" class="textmaker_error"> ***</span>
		</td>
		<td class="textmaker_field">
		  <input type="text" size="50" name="base" value="New from scratch or Modified version of (name of original file)">
<!--			<select name="base">
			<option>New from scratch
			<option>Modified
			</select> -->
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			Build Time
		</td>
		<td class="textmaker_field">
			<input type="text" size="50" name="build_time">
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			Editor(s) used
		</td>
		<td class="textmaker_field">
			<input type="text" size="50" name="editors">
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			Known Bugs
		</td>
		<td class="textmaker_field">
			<textarea rows="2" cols="50" name="known_bugs"></textarea>
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			May Not Run With
    	<span id="notrun_error" class="textmaker_error"> ***</span>
		</td>
		<td class="textmaker_field">
			<input type="text" size="50" name="not_run" value="Engines/ports/EXEs known to have problems with it">
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			Tested With
    	<span id="testedwith_error" class="textmaker_error"> ***</span>
		</td>
		<td class="textmaker_field">
			<input type="text" size="50" name="tested_with" value="Engines/ports/EXEs used to test (include version numbers)">
		</td>
	</tr>
	<tr>
		<td colspan="2" height="60" valign="bottom">
		<h3>Copyright / Permissions</h3>
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			Allow adaptations of your work to be shared?
		</td>
		<td class="textmaker_field">
			<input type="radio" name="share" value="yes" id="yes" checked><label for="yes">Yes</label><br>
            <input type="radio" name="share" value="no" id="no"><label for="no">No</label><br>
            <input type="radio" name="share" value="sharealike" id="sharealike"><label for="sharealike">Yes, as long as others share alike</label>
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			Allow commercial uses of your work?
		</td>
		<td class="textmaker_field">
			<input type="checkbox" name="commercial" CHECKED>
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			Web sites this file is available from
		</td>
		<td class="textmaker_field">
			<textarea rows="2" cols="50" name="web_sites"></textarea>
		</td>
	</tr>
	<tr>
		<td class="textmaker_label">
			FTP sites this file is available from
		</td>
		<td class="textmaker_field">
			<textarea rows="2" cols="50" name="ftp_sites"></textarea>
		</td>
	</tr>
</table>

<input type="hidden" name="form_filled" value="1">
<input type="submit"> <span id="form_error" class="textmaker_error"><br>There's some information not specified. 
                                                                    Please correct the information in the fields highlighted above.</span>

</form>