root_path = cou_getCORootPath( cnx );
__SEND_MESG_DEBUG(root_path)
fh = ap_pfopen(p, ap_pstrcat( p, root_path, "/forms/", "catalog", "_head.html", NULL), "r");
__ASSERT(fh, "Head file not found")
__SEND_MESG_DEBUG("sending head")
ap_rputs("<HEAD>\n", r);
ap_kill_timeout(r);

len = ap_send_fd( fh, r ); /* returns total of bytes sent */
__SEND_MESG_DEBUG("Head sent: %ld bytes", len)

ap_pfclose(p,fh);


__SEND_MESG_DEBUG("sending script")
ap_rputs("<SCRIPT>\n", r);

ap_rprintf( r, "var id_session = %d;\n", cou_assignNewSession( cnx ) );
ap_rprintf( r, "var par_id = %d;\n", par_id );
ap_rprintf( r, "var par_class=\'%s\';\n", par_class );
ap_rprintf( r, "var par_area = \'%s\';\n", par_area );
ap_rprintf( r, "var root_name = \'%s\';\n", root_name );
ap_rprintf( r, "var debug_level = %d;\n", cnx->debug_level );

ap_rputs("</SCRIPT>\n", r);
ap_rputs("</HEAD>\n", r);
fh = ap_pfopen(p, ap_pstrcat( p, root_path, "/forms/", "catalog", "_body.html", NULL), "r");
__ASSERT(fh,"Body file not found")
__SEND_MESG_DEBUG("sending body")
ap_rputs("<BODY>\n", r);
len = ap_send_fd( fh, r ); /* returns total of bytes sent */

if (r->connection->aborted) ap_log_rerror(APLOG_MARK, APLOG_DEBUG, r, "connection aborted");
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, r, "bytes_send=%ld", r->bytes_sent);

ap_soft_timeout((char *) "finish request", r);

ap_log_rerror(APLOG_MARK, APLOG_DEBUG, r, "Body sent: %ld bytes", len);

ap_pfclose(p,fh);
ap_rputs("</BODY>\n", r);

ap_rflush(r);