if (document.getElementById('qa-setup-accountno').style.display == '') {   var page = document.getElementById('qa-setup-createaccount-iframe'). contentDocument; if (!page) { alert("create account page is missing"); return false; } if (page.wrappedJSObject == null) page.wrappedJSObject = page; if (page.forms[0] && page.forms[0].wrappedJSObject == null) page.forms[0].wrappedJSObject = page.forms[0];  if (page.location == litmus.baseURL+'extension.cgi?createAccount=1' && qaSetup.didSubmitForm==0) { document.getElementById('qa-setup-accountconfirmloading').value = document.getElementById("bundle_qa").getString("qa.extension.prefs.loadingMsg"); page.forms[0].wrappedJSObject.submit(); qaSetup.didSubmitForm = 1; setTimeout("qaSetup.validateAccount()", 5000); return false; } if (qaSetup.didSubmitForm == 1 && ! page.forms || ! page.forms[0].wrappedJSObject || ! page.forms[0].wrappedJSObject.email && ! page.forms[0].wrappedJSObject.email.value) {qaSetup.didSubmitForm = 2; setTimeout("qaSetup.validateAccount()", 4000); return false;} var e = ''; var p = ''; if (page.forms && page.forms[0].wrappedJSObject && page.forms[0].wrappedJSObject.email && page.forms[0].wrappedJSObject.email.value) { e=page.forms[0].wrappedJSObject.email.value } if (page.forms && page.forms[0].wrappedJSObject && page.forms[0].wrappedJSObject.password && page.forms[0].wrappedJSObject.password.value) { p=page.forms[0].wrappedJSObject.password.value } document.getElementById('username').value = e; document.getElementById('password').value = p; }  document.getElementById('qa-setup-accountconfirmloading').value = document.getElementById("bundle_qa").getString("qa.extension.prefs.loadingMsg");  var uname = document.getElementById('username').value; var passwd = document.getElementById('password').value;  var callback = function(resp) { if (resp.responseText != 1) { alert(document.getElementById("bundle_qa"). getString("qa.extension.prefs.loginError")); document.getElementById('qa-setup-accountconfirmloading').value = null; return false; } else { qaPref.litmus.setPassword(uname, passwd); document.getElementById('qa-setup-accountconfirmloading').value = null; document.getElementById('qa-setup').pageIndex++; return true; } } litmus.validateLogin(uname, passwd, callback); return false; }, 
if (document.getElementById('qa-setup-accountno').style.display == '') { var account = qaSetup.retrieveAccount("qa-setup-createaccount-iframe", "qa-setup-accountconfirmloading"); document.getElementById('username').value = account.name; document.getElementById('password').value = account.password; }  document.getElementById('qa-setup-accountconfirmloading').value = document.getElementById("bundle_qa").getString("qa.extension.prefs.loadingMsg");  var uname = document.getElementById('username').value; var passwd = document.getElementById('password').value;  var callback = function(resp) { if (resp.responseText != 1) { alert(document.getElementById("bundle_qa"). getString("qa.extension.prefs.loginError")); document.getElementById('qa-setup-accountconfirmloading').value = null; return false; } else { qaPref.litmus.setPassword(uname, passwd); document.getElementById('qa-setup-accountconfirmloading').value = null; document.getElementById('qa-setup').pageIndex++; return true; } } litmus.validateLogin(uname, passwd, callback); return false; }, 
	validateAccount : function() {		if (document.getElementById('qa-setup-accountno').style.display == '') {			// we're creating a new account, so get the uname and passwd 			// from the account created page:			var page = document.getElementById('qa-setup-createaccount-iframe').						contentDocument;			if (!page) {				alert("create account page is missing");				return false;			}			if (page.wrappedJSObject == null)				page.wrappedJSObject = page;			if (page.forms[0] && page.forms[0].wrappedJSObject == null)				page.forms[0].wrappedJSObject = page.forms[0];						if (page.location == litmus.baseURL+'extension.cgi?createAccount=1'			    && qaSetup.didSubmitForm==0) {			    document.getElementById('qa-setup-accountconfirmloading').value = document.getElementById("bundle_qa").getString("qa.extension.prefs.loadingMsg");				page.forms[0].wrappedJSObject.submit();				qaSetup.didSubmitForm = 1;				setTimeout("qaSetup.validateAccount()", 5000);				return false;			}			if (qaSetup.didSubmitForm == 1 && ! page.forms || 			   ! page.forms[0].wrappedJSObject || 			   ! page.forms[0].wrappedJSObject.email && 			   ! page.forms[0].wrappedJSObject.email.value)  			   		{qaSetup.didSubmitForm = 2;			   		setTimeout("qaSetup.validateAccount()", 4000);			   		return false;}			var e = '';			var p = '';			if (page.forms && page.forms[0].wrappedJSObject && 			    page.forms[0].wrappedJSObject.email && 				page.forms[0].wrappedJSObject.email.value) 				{ e=page.forms[0].wrappedJSObject.email.value }			if (page.forms && page.forms[0].wrappedJSObject && 			    page.forms[0].wrappedJSObject.password && 				page.forms[0].wrappedJSObject.password.value) 				{ p=page.forms[0].wrappedJSObject.password.value }			document.getElementById('username').value = e;			document.getElementById('password').value = p;		}				document.getElementById('qa-setup-accountconfirmloading').value = document.getElementById("bundle_qa").getString("qa.extension.prefs.loadingMsg");				var uname = document.getElementById('username').value;		var passwd = document.getElementById('password').value;				var callback = function(resp) {			if (resp.responseText != 1) { // failure				alert(document.getElementById("bundle_qa").					getString("qa.extension.prefs.loginError"));					document.getElementById('qa-setup-accountconfirmloading').value = null;				return false;			} else { // all's well				qaPref.litmus.setPassword(uname, passwd);				document.getElementById('qa-setup-accountconfirmloading').value = null;				document.getElementById('qa-setup').pageIndex++; // advance				return true;			}		}		litmus.validateLogin(uname, passwd, callback);		return false; // not ready to advance yet	},
5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5459/a3a9a2c311afc9d76e4e6bfc036e5897fa988bc1/settings.js/buggy/testing/extensions/community/chrome/content/settings.js