
/* Validate length of textarea or input type=text fields */
function profileTextValidateLen (oText, maxLen, fTtl, Txt1, Txt2)
{
  if (oText.value.length > maxLen)
	alert (Txt1 + '\n' + Txt2 + ' ' + oText.value.length);
}

function profileShowMap (PageName){
	newwin=window.open(PageName,"MapSelector","height=650,width=570, toolbar=no, menubar=no,scrollbars=yes,resizable=yes");
}

function profileClearLocation () {
  var o = document.getElementById ("iLat");
  if (o) {o.value = "";}
  o = document.getElementById ("iLng");
  if (o) {o.value = "";}
}

function resendConfirmation (fid) {
  var i, email;
  i = document.getElementById (fid);
  if (i) {
    email = i.value;
    email = email.replace (/ /g, ""); /* strip all spaces */
    if (email.length == 0) {
      alert ("Please enter valid e-mail.");
    }
    else {
      window.open("sendConfirmation.asp?email=" + email + "&fid=" + fid, 
        "profile", "height=575, width=600, scrollbars=yes, resizable=yes");
    }
  }
}
