char ch;
void BrowserPass1(SectionInfo *browser){	FILE *Fp;	SectionInfo *Root;	char *file;	char *omhDir;	char ch;	char *tmp;	char *s;	char *number;	int  i;	assert( browser != NULL );	assert( SectionCount == 0 );	assert( ! PrintableOmhelp() );	// directory where Omhelp is installed	omhDir = OmhDir();	assert( omhDir != NULL );	CopyImage(omhDir, "_close.gif");	CopyImage(omhDir, "_open.gif");	CopyImage(omhDir, "_closeblue.gif");	CopyImage(omhDir, "_openblue.gif");	// Open the Pass One output file for this section	file = str_cat(browser->tag, ".tmp");	PushOutput(file);	FreeMem(file);	// Determine the root of the section tree	Root = browser;	while( Root->parent != NULL )		Root = Root->parent;	assert( Root->next == NULL && Root->previous == NULL );	// title for this section	OutputString("<center><b><big><big>\n");	OutputString(browser->title);	OutputString("\n</big></big></b></center>\n");		// Start with the root of the tree	SectionCount = 0;	NextSection(Root, 0);	// load Javascript at end of file so getElementById works	FormatOutput(		"<script type='text/javascript' src='%s.js'></script>\n",		browser->tag	);	PopOutput();	// Open the Pass One output file for this section	file = str_cat(browser->tag, ".js");	DirSep(file);	Fp = fopen(file, "w");	if( Fp == NULL )		fatalerr("Cannot create a new ", file, " file\n", NULL);	FreeMem(file);	// replace 000000 with actual number of sections	tmp = str_alloc(Javascript);	s   = strstr(tmp, "000000");	assert( s != NULL );	for(i = 0; i < 6; i++)		s[i] = ' ';	assert(SectionCount <= 999999 );	number = int2str(SectionCount);	i = strlen(number);	while(i)	{	i--;		s[i] = number[i];	}	fprintf(Fp, "%s", tmp);	FreeMem(number);	FreeMem(tmp);		fclose(Fp);}