
//---------------------------------------------------------------------------
// LOGIN/PASSWORD FUNCTIONS

function fncLoginUsernameClick(oField) {
  // Clear the value of the Username field if it is the tip
  if (oField.value == "Username:") {
    oField.value = "";
  }
}

function fncLoginPasswordClick(oField) {
  // Clear the value of the Password field and convert it to password type if it is the tip
  if (oField.value == "Password:") {
    oField.value = "";
  }
  fncSetToPassword(oField);
}

function fncSetToPassword(oField) {
  // If the browser is IE then can't change the "type" so replace it with a new password field
  if (document.all) {
    var oPassword = document.createElement('input');
    oPassword.setAttribute('type', 'password');
    oPassword.setAttribute('name', oField.name);
    oPassword.setAttribute('id', 'idLoginPassword');
    oField.parentNode.replaceChild(oPassword,oField);
    setTimeout('document.all["idLoginPassword"].focus();',100);
  }
  else {
    oField.type = "password";
  }
}



//---------------------------------------------------------------------------
// UTILITY FUNCTIONS

function fncPopup(strName,strURL,intWidth,intHeight) {
  if (strURL.length > 0) {
    var winPopup = window.open(strURL, strName, "width=" + intWidth + ",innerWidth=" + intWidth + ",height=" + intHeight + ",innerHeight=" + intHeight + ",directories=0,statusbar=0,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0");
  }
  return false;
}
