<script type="text/javascript" language="javascript">var akbPath = '%%GLOBAL_pathToKB%%';</script>
<script type="text/javascript" src="%%GLOBAL_pathToKB%%/javascript/ars.js"></script>

<form action="%%GLOBAL_pathToKB%%/contact.php" method="post" onSubmit="return CheckContactForm()">
	<input type="hidden" name="ToDo" value="SendQuestion">
	<table class="BodyPanel" width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td class="Text">
			%%LNG_conContactIntro%%<br /><br />
			<span style="color: red;">%%GLOBAL_Message%%</span>
		</td>
	</tr>
	<tr>
		<td>
			<table class="FormPanel">
			<tr>
				<td class="FieldLabel"><span class="Required">*</span>&nbsp;%%LNG_conNameLabel%%:</td>
				<td>
					<input type="text" name="name" id="FromName" class="Field300" MaxLength="50" value="%%GLOBAL_name%%">
				</td>
			</tr>
			<tr>
				<td class="FieldLabel"><span class="Required">*</span>&nbsp;%%LNG_conEmailLabel%%:</td>
				<td>
					<input type="text" name="email" id="FromEmail" class="Field300" MaxLength="50" value="%%GLOBAL_email%%">
				</td>
			</tr>
			<tr>
				<td class="FieldLabel">&nbsp;&nbsp;&nbsp;%%LNG_conSubjectLabel%%:</td>
				<td>
					<input type="text" name="subject" id="Subject" class="Field300" MaxLength="255" value="%%GLOBAL_subject%%">
				</td>
			</tr>
			%%Panel.ContactGroupSelectPanel%%
			<tr>
				<td class="FieldLabel" valign="top"><span class="Required">*</span>&nbsp;%%LNG_conQuestionCommentLabel%%:</td>
				<td>
					<textarea name="message" id="Message" class="Field300" Rows="8" onkeyup="ARS(this.id);">%%GLOBAL_message%%</textarea>
					<img src="%%Config.ImagePath%%/searching.gif" id="contactImgSearching" height="16" width="16" alt="searching" align="top" style="display: none" title="%%LNG_ARSSearching%%">
					<img src="%%Config.ImagePath%%/blank.gif" id="contactImgNotSearching" height="16" width="16" alt="not searching" align="top">
					<span id="SearchResults"></span>
				</td>
			</tr>
			<tr style="display: %%GLOBAL_ShowCaptcha%%">
				<td class="FieldLabel" valign="top" align="right"><span class="Required">*</span>&nbsp;%%LNG_enterCode%%:</td>
				<td valign="top">
						<input type="text" name="captcha" id="captcha" value="">
						%%GLOBAL_AKB_CAPTCHA%%
				</td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td>
					<input type="submit" name="SubmitButton" id="SubmitButton" value="%%LNG_conSendMessage%%">
				</td>
			</tr>
			</table>
		</td>
	</tr>
	</table>
</form>

<script type="text/javascript" language="javascript">
	function CheckContactForm()
	{
		if(document.getElementById("FromName").value == "")
		{
			alert("%%LNG_conInvalidName%%");
			document.getElementById("FromName").focus();
			return false;
		}

		if(document.getElementById("FromEmail").value.indexOf("@") == -1 || document.getElementById("FromEmail").value.indexOf(".") == -1)
		{
			alert("%%LNG_conInvalidEmail%%");
			document.getElementById("FromEmail").focus();
			document.getElementById("FromEmail").select();
			return false;
		}

		if(document.getElementById("Message").value == "")
		{
			alert("%%LNG_conQuestionRequired%%");
			document.getElementById("Message").focus();
			return false;
		}

		return true;
	}

	function GoToPage(Page)
	{
		document.getElementById("Page").value = Page;
		document.getElementById("frmCPResult").submit();
	}

	function SendMessage()
	{
		document.frmCPResult.ToDo.value = "SendQuestion";
		document.getElementById("frmCPResult").submit();
	}

	window.onload = function()
	{
		f = document.getElementById('captcha');
		if (f) {
			if (navigator.userAgent.indexOf("Safari") > 0) {
				f.setAttribute("autocomplete","off");
			} else if (navigator.product == "Gecko") {
				f.setAttribute("autocomplete","off");
			} else {
				isIE = true;
				f.setAttribute("autocomplete","off");
			}
		}
	}

</script>

