rem: for ( var index = 0; index < body.childNodes.length; index++ ) { item = body.childNodes[index]; if ( item.childNodes && item.childNodes.length ) { row = item.childNodes[0]; if (  row.childNodes &&  row.childNodes.length ) { cell = row.childNodes[0]; text = cell.getAttribute('value'); email = cell.getAttribute('email'); if ( text ) { switch ( text[0] ) { case prefixTo[0]: if ( toAddress ) toAddress += ", "; toAddress += text.substring(prefixTo.length, text.length); break; case prefixCc[0]: if ( ccAddress ) ccAddress += ", "; ccAddress += text.substring(prefixCc.length, text.length); break; case prefixBcc[0]: if ( bccAddress ) bccAddress += ", "; bccAddress += text.substring(prefixBcc.length, text.length); break; } } if(!email) { if (emptyEmail) emptyEmail +=", "; emptyEmail += text.substring(prefixTo.length, text.length-2); } } } } if(emptyEmail) { var alertText = gAddressBookBundle.getString("emptyEmailCard"); alert(alertText + emptyEmail); return false; }  msgCompFields.SetTo(toAddress); msgCompFields.SetCc(ccAddress); msgCompFields.SetBcc(bccAddress); top.composeWindow.CompFields2Recipients(top.msgCompFields);  return true; 
add: for ( var index = 0; index < body.childNodes.length; index++ ) { item = body.childNodes[index]; if ( item.childNodes && item.childNodes.length ) { row = item.childNodes[0]; if (  row.childNodes &&  row.childNodes.length ) { cell = row.childNodes[0]; text = cell.getAttribute('label'); email = cell.getAttribute('email'); if ( text ) { switch ( text[0] ) { case prefixTo[0]: if ( toAddress ) toAddress += ", "; toAddress += text.substring(prefixTo.length, text.length); break; case prefixCc[0]: if ( ccAddress ) ccAddress += ", "; ccAddress += text.substring(prefixCc.length, text.length); break; case prefixBcc[0]: if ( bccAddress ) bccAddress += ", "; bccAddress += text.substring(prefixBcc.length, text.length); break; } } if(!email) { if (emptyEmail) emptyEmail +=", "; emptyEmail += text.substring(prefixTo.length, text.length-2); } } } } if(emptyEmail) { var alertText = gAddressBookBundle.getString("emptyEmailCard"); alert(alertText + emptyEmail); return false; }  msgCompFields.SetTo(toAddress); msgCompFields.SetCc(ccAddress); msgCompFields.SetBcc(bccAddress); top.composeWindow.CompFields2Recipients(top.msgCompFields);  return true; 
context: function SelectAddressOKButton(){	var body = document.getElementById('bucketBody');	var item, row, cell, text, colon,email;	var toAddress="", ccAddress="", bccAddress="", emptyEmail="";	for ( var index = 0; index < body.childNodes.length; index++ )	{		item = body.childNodes[index];		if ( item.childNodes && item.childNodes.length )		{			row = item.childNodes[0];			if (  row.childNodes &&  row.childNodes.length )			{				cell = row.childNodes[0];				text = cell.getAttribute('value');				email = cell.getAttribute('email');				if ( text )				{					switch ( text[0] )					{						case prefixTo[0]:							if ( toAddress )								toAddress += ", ";							toAddress += text.substring(prefixTo.length, text.length);							break;						case prefixCc[0]:							if ( ccAddress )								ccAddress += ", ";							ccAddress += text.substring(prefixCc.length, text.length);							break;						case prefixBcc[0]:							if ( bccAddress )								bccAddress += ", ";							bccAddress += text.substring(prefixBcc.length, text.length);							break;					}				}				if(!email)				{					if (emptyEmail)						emptyEmail +=", ";						emptyEmail += text.substring(prefixTo.length, text.length-2);				}			}		}	}	if(emptyEmail)	{			var alertText = gAddressBookBundle.getString("emptyEmailCard");		alert(alertText + emptyEmail);		return false;	}	// reset the UI in compose window	msgCompFields.SetTo(toAddress);	msgCompFields.SetCc(ccAddress);	msgCompFields.SetBcc(bccAddress);	top.composeWindow.CompFields2Recipients(top.msgCompFields);		return true;}
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/0b2dd2b2d2fd037df917e07645fa019a963332a5/abSelectAddressesDialog.js/buggy/mailnews/addrbook/resources/content/abSelectAddressesDialog.js