<div class="BodyContainer">

			<form action="index.php?ToDo=%%GLOBAL_FormAction%%" onSubmit="return CheckForm(this)" name="frmAddUser" method="post">
			%%GLOBAL_hiddenFields%%
			<input type="hidden" id="icon" name="icon" value="%%GLOBAL_CategoryIcon%%">
			<table class="OuterPanel" cellspacing="0" cellpadding="0" border="0">
			<tr>
				<td class="Heading1">%%GLOBAL_CatTitle%%</td>
			</tr>
			<tr>
				<td class="Intro">
					<div>%%GLOBAL_CatIntro%%</div>
					<div>
						<input type="submit" name="SubmitButton1" value="%%LNG_Save%%" class="FormButton">
						<input type="button" name="CancelButton1" value="%%LNG_Cancel%%" class="FormButton" onClick="ConfirmCancel()">
					</div>
				</td>
			</tr>
			<tr>
				<td>
					%%GLOBAL_Message%%
				</td>
			</tr>
			<tr>
				<td>
					<table class="Panel">
						<tr>
							<td class="Heading2" colspan=2>%%LNG_AddCatDetails%%</td>
						</tr>
						<tr>
							<td class="FieldLabel">
								<span class="Required">*</span>&nbsp;%%LNG_CatName%%:
							</td>
							<td>
								<input type="text" name="name" class="Field500" value="%%GLOBAL_CategoryName%%">
							</td>
						</tr>
						<tr>
							<td class="FieldLabel">
								&nbsp;&nbsp;&nbsp;%%LNG_CatDesc%%:
							</td>
							<td>
								<input type="text" name="description" class="Field500" value="%%GLOBAL_CategoryDesc%%" maxlength="250">
							</td>
						</tr>
						<tr>
							<td class="FieldLabel">
								&nbsp;&nbsp;&nbsp;%%LNG_CategorySortOrder%%:
							</td>
							<td>
								<input class="Field50" type="text" value="%%GLOBAL_CategoryOrder%%" name="catorder"/>
								<img style="margin-top:5px; margin-left:5px; vertical-align: top;" onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_CategorySortOrder%%', '%%LNG_CategorySortOrderHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help" >
							</td>
						</tr>
						<tr>
							<td class="FieldLabel">
								<span class="Required">*</span>&nbsp;%%LNG_CatIcon%%:
							</td>
							<td>
								<div class="CategoryIcons" style="float:left" id="iconsdiv">
									%%GLOBAL_CategoryIcons%%
								</div>
								<img style="margin-top:5px; margin-left:5px; vertical-align: top;" onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_CatIcon%%', '%%LNG_CatIconHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help" >
							</td>
						</tr>
						<tr>
							<td class="FieldLabel">
								<span class="Required">*</span>&nbsp;%%LNG_CatParentCategories%%:
							</td>
							<td>
								<select size="5" name="category[]" id="category" class="Field500" style="height:115px" multiple="multiple">
								%%GLOBAL_CategoryOptions%%
								</select>
								<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_CatParentCategories%%', '%%LNG_CatParentCategoriesHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help" style="margin-top:5px; vertical-align: top;">
							</td>
						</tr>
						<input type="hidden" name="workflow" value="0" />		
						%%Panel.UserGroupsWorkflow%%
						<tr>
							<td colspan="2">
								%%Panel.UserGroupsCategoryArticle%%
							</td>
						</tr>
						<tr class="ClearGap">
							<td class="FieldLabel"></td>
							<td>
								<br />
								<input type="submit" name="SubmitButton2" value="%%LNG_Save%%" class="FormButton" />
								<input type="button" name="CancelButton2" value="%%LNG_Cancel%%" class="FormButton" onclick="ConfirmCancel()" />
							</td>
						</tr>
					</table>
				</td>
			</tr>
			</table>
			</form>
			<script type="text/javascript" language="javascript">
				var numIcons = %%GLOBAL_IconCount%%;

				function ConfirmCancel()
				{
					if(confirm('%%LNG_CancelMessage%%')) {
						document.location.href='index.php?ToDo=viewCategories';
					} else {
						return false;
					}
				}

				function CheckForm(f)
				{
					if (f.name.value == "") {
						alert("%%LNG_NoCategory%%");
						f.name.focus();
						f.name.select();
						return false;
					}

					if(document.getElementById("category").selectedIndex == -1)
					{
						alert("%%LNG_NoParentCategory%%");
						document.getElementById("category").focus();
						return false;
					}

					// Everything is OK, return true
					return true;
				}

				function SelectIcon(IconId, IconName)
				{
					for (i = 0; i < numIcons; i++) {
						var span = document.getElementById("span_cat_"+i);
						span.className = 'CategoryIcon';
					}

					var span = document.getElementById("span_cat_"+IconId);
					span.className = 'SelectedCategoryIcon';
					document.getElementById('icon').value = IconName;
				}

				if (navigator.userAgent.indexOf('MSIE') <= -1) {
					document.getElementById('iconsdiv').style.width = '486px';
				}
			</script>

</div>