function confirmLink(theLink, prompt, theAction)  // get url when onclick
{
  var is_confirmed = confirm(prompt);
  if (is_confirmed) 
  {
	theLink.href += 'action=' + theAction;
  }
  
  return is_confirmed;
}

function confirmLink_noprompt(theLink, theAction)  // get url when onclick
{
	theLink.href += 'action=' + theAction;
}

function confirmbox_direct(theLink, prompt, confirmed_destination_link)
{
  var is_confirmed = confirm(prompt);
  if (is_confirmed)
  {
    theLink.href = confirmed_destination_link;
  }
}
 
var submitcount=0;
function checkSubmit()
{

      if (submitcount == 0)
      {
      submitcount++;
      document.EditProfileForm.submit();
      }
   }

function textCounter(field, countfield, maxlimit)
{
  if (field.value.length > maxlimit)
      {field.value = field.value.substring(0, maxlimit);}
      else
      {countfield.value = maxlimit - field.value.length;}
}