function thisMovie(movieName) {
    if (navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName]
    }
    else {
        return document[movieName]
    }
}
function getAddresses() {
	showPlaxoABChooser('recipient_list', 'plaxoImporter.html'); return false;
}
function sendToFlash (data) {
	thisMovie("flash").sendText(data);  /*has to be the name of the swf object*/
}
function onABCommComplete(data) {
	var emails = [];
	var divider = "|";
	for (var i = 0; i < data.length; i++) {
		var nameField = data[i][0];
		var emailField = data[i][1];
		// Strip Gmail Quotes (sometimes extranuous &quot; exists in addressbook [strip twice per Field]
		// and escape other unsupported CSV Characters
		nameField = nameField.replace("&quot;","");
		nameField = nameField.replace("&quot;","");
		nameField = nameField.replace("&quot;","");
		emailField = emailField.replace("&quot;","");
		// Strip unsupported characters
		emailField = emailField.replace("/","");
		nameField = nameField.replace("/","");
		nameField = nameField.replace("'","");
		// Strip trailing empty spaces from Email Field
		emailField = emailField.replace(" ","");
		// push the variables to new Array 
		emails.push(nameField);
		emails.push(emailField);
		emails.push(divider);
	}
	sendToFlash(emails);
}

