{
******/ if (!htmlLine1) {
static int OutputButtons(MimeObject *obj, PRBool basic, VObject *v){	int status = 0;	char * htmlLine1 = NULL;	char * htmlLine2 = NULL;	char* vCard = NULL;	char* vEscCard = NULL;	int len = 0;	char* rsrcString = NULL;	if (!obj->options->output_vcard_buttons_p)		return status;	vCard = writeMemoryVObjects(0, &len, v, PR_FALSE);	if (!vCard)		return VCARD_OUT_OF_MEMORY;	vEscCard = nsEscape (vCard, url_XAlphas);	PR_FREEIF (vCard);	if (!vEscCard)		return VCARD_OUT_OF_MEMORY;	if (basic)	{		rsrcString = VCardGetStringByID(VCARD_ADDR_VIEW_COMPLETE_VCARD);    htmlLine1 = PR_smprintf ("<FORM name=form1><INPUT type=reset value=\\\"%s\\\" onClick=\\\"showAdvanced%d();\\\"></INPUT></FORM>", 			                        rsrcString, s_unique);	}	else 	{		rsrcString = VCardGetStringByID(VCARD_ADDR_VIEW_CONDENSED_VCARD);		htmlLine1 = PR_smprintf ("<FORM name=form1><INPUT type=reset value=\\\"%s\\\" onClick=\\\"showBasic%d();\\\"></INPUT></FORM>", 			                        rsrcString, s_unique);	}  PR_FREEIF(rsrcString);	rsrcString = VCardGetStringByID(VCARD_MSG_ADD_TO_ADDR_BOOK);	// RICHIE - Once this is completed in the back end, we can enable the button again	// htmlLine2 = PR_smprintf ("<FORM name=form1 METHOD=get ACTION=\"addbook:add\"><INPUT TYPE=hidden name=vcard VALUE=\"%s\"><INPUT type=submit value=\"%s\"></INPUT></FORM>",	//	                        vEscCard, rsrcString);	htmlLine2 = PR_smprintf ("<FORM name=form1 METHOD=get ACTION=\"addbook:add\"><INPUT TYPE=hidden name=vcard VALUE=\"%s\"><INPUT type=submit disabled=\"true\" value=\"%s\"></INPUT></FORM>",		                        vEscCard, rsrcString);	  PR_FREEIF(rsrcString);	if (!htmlLine1 && !htmlLine2)	{		nsCRT::free (vEscCard);		PR_FREEIF (htmlLine1);		PR_FREEIF (htmlLine2);		return VCARD_OUT_OF_MEMORY;	}		status = OutputTableRowOrData (obj, PR_FALSE, PR_FALSE, "LEFT", "TOP", NULL, NULL);	if (status < 0) goto FAIL;	/*	 * WARNING: This HTML is written to the stream using JavaScript,	 * because we don't want this button to be displayed when JS has	 * been switched off (in the whole client or just in email). The	 * button won't work when JS is switched off (since it calls a JS	 * function), so then we don't want the button to be displayed.	 *   -- erik (and jfriend)	 */	status = WriteEachLineToStream (obj, "<SCRIPT>document.write(\"");	if (status < 0) goto FAIL;	status = WriteLineToStream (obj, htmlLine1, PR_FALSE);	if (status < 0) goto FAIL;	status = WriteEachLineToStream (obj, "\")</SCRIPT>");	if (status < 0) goto FAIL;	status = WriteLineToStream (obj, htmlLine2, PR_FALSE);	if (status < 0) goto FAIL;	status = OutputTableRowOrData (obj, PR_FALSE, PR_TRUE, NULL, NULL, NULL, NULL);	if (status < 0) goto FAIL;	FAIL:	PR_FREEIF (vEscCard);	PR_FREEIF (htmlLine1);	PR_FREEIF (htmlLine2);	return status;}