function EnableSubmitButton() {
	var ctl_name = '_submit';
	document.forms[0][ctl_name].value = 'Click here to submit your download request';
	document.forms[0][ctl_name].disabled = false;
}

function ValidateAndSubmit() {
	if (CheckData()) {
		document.forms[0].submit();
	}
}

function CheckData() {

	var ctl_name = 'FirstName';
	strValue = AllTrim(document.forms[0][ctl_name].value);
	document.forms[0][ctl_name].value = strValue;
	if (strValue.length==0) {
		alert("Please enter your first name.");
		document.forms[0][ctl_name].focus();
		return false;
	}
	
	ctl_name = 'LastName';
	strValue = AllTrim(document.forms[0][ctl_name].value);
	document.forms[0][ctl_name].value = strValue;
	if (strValue.length==0) {
		alert("Please enter your last name.");
		document.forms[0][ctl_name].focus();
		return false;
	}
	
	ctl_name = 'Email';
	strValue = AllTrim(document.forms[0][ctl_name].value);
	document.forms[0][ctl_name].value = strValue;
	if (strValue.length==0) {
		alert("Please enter your e-mail address.");
		document.forms[0][ctl_name].focus();
		return false;
	}
	
	ctl_name = 'Company';
	strValue = AllTrim(document.forms[0][ctl_name].value);
	document.forms[0][ctl_name].value = strValue;
	if (strValue.length==0) {
		alert("Please enter your company name.");
		document.forms[0][ctl_name].focus();
		return false;
	}
	
if (1==2) {	
	ctl_name = 'message';
	strValue = AllTrim(document.forms[0][ctl_name].value);
	document.forms[0][ctl_name].value = strValue;
	if (strValue.length==0) {
		alert("Please enter your suggestion.");
		document.forms[0][ctl_name].focus();
		return false;
	}
}  // if (1==2)
	
	return true;
}


function LeftTrim(String,TrimChar)
{
 // **********************************************************
 // Placed in the public domain by Affordable Production Tools
 // April 27, 1998
 // Web site: http://www.aptools.com
 //
 // December 2, 1998 -- Modified to allow specification of
 // character to be trimmed.
 //
 // This function trims spaces (default) or the specified
 // character from the left of a string or form field.
 // **********************************************************
 String += ""         // Force argument to string.
 TrimChar += ""       // Force argument to string.
 if((TrimChar == "") || (!(TrimChar.length == 1)))
  TrimChar = " "
 if(String.length == 0)
  return(String)
 var Count = 0
 for(Count = 0;Count < String.length;Count++)
 {
  if(!(String.charAt(Count) == TrimChar))
   return(String.substring(Count,String.length))
 }
 return("")
}

function RightTrim(String,TrimChar)
{
 // **********************************************************
 // Placed in the public domain by Affordable Production Tools
 // April 27, 1998
 // Web site: http://www.aptools.com
 //
 // December 2, 1998 -- Modified to allow specification of
 // character to be trimmed.
 //
 // This function trims spaces (default) or the specified
 // character from the right of a string or form field.
 // **********************************************************
 String += ""        // Force argument to string.
 TrimChar += ""      // Force argument to string.
 if((TrimChar == "") || (!(TrimChar.length == 1)))
  TrimChar = " "
 if(String.length == 0)
  return(String)
 var Count = 0
 for(Count = String.length -1;Count >= 0;Count--)
 {
  if(!(String.charAt(Count) == TrimChar))
   return(String.substring(0,Count + 1))
 }
 return("")
}

function AllTrim(String,TrimChar)
{
 // **********************************************************
 // Placed in the public domain by Affordable Production Tools
 // April 27, 1998
 // Web site: http://www.aptools.com
 //
 // December 2, 1998 -- Modified to allow specification of
 // character to be trimmed.
 //
 // This function trims spaces (default) or the specified
 // character from the left and the right of a string or form field.
 //
 // Note that this functions uses two other library functions,
 // LeftTrim() and RightTrim().
 // **********************************************************
 String += ""        // Force argument to string.
 TrimChar += ""      // Force argument to string.
 if((TrimChar == "") || (!(TrimChar.length == 1)))
  TrimChar = " "
 return(RightTrim(LeftTrim(String,TrimChar),TrimChar))
}

