# First attempt at a macros
||ifdef||addr1||\
	||if(istrue(all_rcpts))||\
		||show_rcpts_3(p1,9999)||\
	||else||\
		||show_rcpts_3(p1,3)||\
	||endif||\
	||ifdef||rcpt_overflow|| ||define||nrcpt||rcpt_overflow|| \
	  <span title="||show_rcpts(p1)||">... <a href="#" onclick="show_all(\'rcpts\')"><i>x||nrcpt|| $$st_more$$</i></a>\
	||endif||\
||endif||\
\
||ifdef||abook_entry||\
# THIS IS NOW HANDLED IN C IN SURGEMAIL FOR SPEED IMPROVEMENT
	||if(equal(output,(plain_list)))||plain_entry||else||abook_entry||endif||(\
		'||client_cid||',{svr_id:'||web_encode_js(contact_id)||',\
\
\
#				All the actual database fields
		||if(not(json_blank(contact_name)))||name:||json_validate(contact_name)||,||endif||\
		||if(not(json_blank(contact_company)))||company:||json_validate(contact_company)||,||endif||\
		||if(not(json_blank(contact_file_by_co)))||file_by_co:||json_validate_bool(contact_file_by_co)||,||endif||\
		||if(not(json_blank(contact_email)))||email:||json_validate(contact_email)||,||endif||\
		||if(not(json_blank(contact_phone)))||phone:||json_validate(contact_phone)||,||endif||\
	||iftrue(vault_lock)||\
		vaultsafe:||json_validate_bool(contact_vaultsafe)||,\
		vaultwild:||json_validate_bool(contact_vaultwild)||,\
	||endif||\
	||iftrue(full_info)||\
		full:true,\
		||if(istrue(contact_invalid))||invalid:||contact_invalid||,||endif||\
		||if(not(json_blank(contact_other_names)))||other_names:||json_validate(contact_other_names)||,||endif||\
		||if(not(json_blank(contact_im)))||im:||json_validate(contact_im)||,||endif||\
		||if(not(json_blank(contact_url)))||url:||json_validate(contact_url)||,||endif||\
		||if(not(json_blank(contact_birthday)))||birthday:||json_validate(contact_birthday)||,||endif||\
		||if(not(json_blank(contact_dates)))||dates:||json_validate(contact_dates)||,||endif||\
		||if(not(json_blank(contact_related_names)))||related_names:||json_validate(contact_related_names)||,||endif||\
		||if(not(json_blank(contact_phonetic)))||phonetic:||json_validate(contact_phonetic)||,||endif||\
		||if(not(json_blank(contact_address)))||address:||json_validate(contact_address)||,||endif||\
		||if(not(json_blank(contact_custom)))||custom:||json_validate(contact_custom)||,||endif||\
		||if(not(json_blank(contact_comment)))||comment:||json_validate(contact_comment)||,||endif||\
		icon:'||contact_icon||',\
	||endif||\
\
#				Various parameters and flags that are not part of the actual stored addressbook fields
#					param
						isgroup:||isgroup||,\
						isfav:||isfav||,\
						||if(true(autofav))||autofav:||autofav||,||endif||\
						shared:||contact_shared||,\
						abook:'||abook||',\
						webmail:||contact_webmail||,\
		||iftrue(contact_linked)||linked:true,||endif||\
		||iftrue(contact_webmail_group)||webmail_group:true,||endif||\
						groups:'||contact_groups2||',\
						index_letter:'||index_letter||',\
\
#				Various additional fields not currently used (much) - REVIEW AND REMOVE
						nick:'||web_encode_js(web_encode(contact_nickname))||',\
						shortlist:'shortlist_na',\
						instant:'',\
						nused:''\
					}, ||late_add||);
||endif||\
\
||ifdef||abook_entry_group||\
||endif||\
\