function isValidEmail(ob) {
  if (!cs_IsEmail(ob.value)) {
    alert('The email address you have entered cannot be recognised.\r\nPlease enter a new email address...');
    ob.focus();
    return false;
  }
  return true;
}

function isDelete() {
  if (confirm('Are you sure you wish to delete your account?\r\nThis action cannot be undone...')) return true;
  return false;
}


function isChecked(param) {
  var ob = document.content;
  if (!ob.nvEmail.value) {
    alert('Please enter your email address...');
    ob.nvEmail.focus();
    return false;
  }  
  if (!isValidEmail(ob.nvEmail)) return false;
  if (parseInt(param)==1) if (!isDelete()) return false;
  return true;
}

function isValidData(iType) {
  switch(iType) {
    case 1 : if (isChecked(0)) submitForm('tp_UnSubscribeForm.asp?q=0'); break;
    case 2 : if (isChecked(1)) submitForm('tp_UnSubscribeForm.asp?q=1'); break;
    default : location.href = '/'; return true;
  }
  return false;
}
