home *** CD-ROM | disk | FTP | other *** search
- var gscreenName;
- var gcurEmail=null;
-
-
- function storeEmailOnLoad()
- {
- doSetOKCancel(onOKStoreEmail, onCancel);
- gscreenName = window.arguments[0];
-
- document.getElementById("screenname").setAttribute("value",gscreenName);
- gcurEmail = aimFeedbagManager().GetEmailId(gscreenName);
- if (gcurEmail && gcurEmail != "")
- document.getElementById("fldnewEmail").setAttribute("value",gcurEmail);
- document.getElementById("fldnewEmail").focus();
- }
-
- function eaKeyPress(event)
- {
- if (event.keyCode == 13) {
- //enter key is pressed. ok the window. onOK will take care of validations
- onOKStoreEmail();
- }
- }
-
- function onOKStoreEmail()
- {
- var newemail = document.getElementById("fldnewEmail").value;
- if (!validateEmailAddress(newemail)) {
- aimErrorBox(aimString("msg.enterValidEmail"));
- return;
- }
- aimFeedbagManager().SetEmailId(gscreenName, newemail);
- aimBuddyManager().SetUserEmailStateinDS(gscreenName, Components.interfaces.nsAimBuddyEmailStates.HasEmail);
- window.close();
- }
-
- function onCancel()
- {
- window.close();
- }
-
-
-