function checkCharacter(obj,limit) { 

    var s = obj.value.length
    
    if (s <= limit) { //if it is > than the limit, crop the the value
        var counter = limit - s;
     }
    else {
        obj.value = obj.value.substring(0,limit)
        alert("Please enter " + limit + " characters or less")
    }
}
function checkCharacter2(obj,limit,label) { 

    var s = obj.value.length
    
    if (s <= limit) { //if it is > than the limit, crop the the value
        var counter = limit - s;
        label.value = counter;
     }
    else {
        obj.value = obj.value.substring(0,limit)
        alert("Please enter " + limit + " characters or less")
    }
}

function validateFormInfo()
{   
    return (
      checkString(document.SUPPORT.elements["company"],"Company") &&
      checkString(document.SUPPORT.elements["firstname"],"First Name") &&
      checkString(document.SUPPORT.elements["lastname"],"Family Name") &&
	  checkEmail(document.SUPPORT.elements["email"]) &&
      checkString(document.SUPPORT.elements["phone"],"Phone Number") &&
      checkSelection(document.SUPPORT.elements["enquiry_type"],"Specify your driver/utility, etc.") &&
      checkSelection(document.SUPPORT.elements["os"],"Operationg System") &&
      checkString(document.SUPPORT.elements["application_used"],"Application Used") &&
      checkSelection(document.SUPPORT.elements["product"],"Epson Product") &&
	  checkString(document.SUPPORT.elements["request2"],"Request") &&
	  checkInjection(document.SUPPORT.elements["request2"]) 
	)
}
function cmdValidate()
{

if (validateFormInfo()) 
	{
	document.SUPPORT.ButtonSubmit.disabled=true
	document.SUPPORT.submit();
	}
else 
	{
	return false;
	 }
}

function cmdAdd()
{
if (validateFormInfo()) 
	{
	document.SUPPORT.submit();
	}
else 
	{
	return false;
	 }
}

function DeleteRecord(Seqno){
  theMsg = "Are you sure you want to permanently delete this PS USER from the database?" 
  if (confirm(theMsg))
	    parent.location="XT_DeleteUser.asp?Seqno="+Seqno;
}


