+ wprintf("<IMG SRC=\"/static/blank.gif\" onLoad=\"parent.location.replace('/display_main_menu');\">\n");
+ }
+
+ if (strlen(output_data) > 0) {
+
+ if (output_data[strlen(output_data)-1] == '\n') {
+ output_data[strlen(output_data)-1] = 0;
+ }
+
+ /* Output our fun to the other frame. */
+ wprintf("<IMG SRC=\"/static/blank.gif\" WIDTH=1 HEIGHT=1\n"
+ "onLoad=\" \n"
+ );
+
+ for (i=0; i<num_tokens(output_data, '\n'); ++i) {
+ extract_token(buf, output_data, i, '\n');
+ extract_token(cl_user, buf, 0, '|');
+ extract_token(cl_text, buf, 1, '|');
+
+ wprintf("parent.chat_transcript.document.write('");
+ wprintf("<FONT SIZE=-1><B>");
+ jsescputs(cl_user);
+ wprintf(":</B> ");
+ jsescputs(cl_text);
+ wprintf("</FONT><BR>");
+ wprintf("'); \n");
+ }
+
+ wprintf("parent.chat_transcript.scrollTo(999999,999999);\">\n");