<!--

/*
 the topgen function describes the page layout using tables and also writes any canned content including text/banners/headers/images that appear at the top of every page.  "logo" is optional and will normally be some action, such as a home-page banner or text, that is only to appear on the home page.  This section should be designed as desired but must be consistent with the bottomgen as far as closing all tables or <div> sections that topgen opens.
*/
function topgen(logo,dir){
if(!dir)dir='';
if(!logo)logo='';
document.write('<div align=center><table border=0 cellpadding=0 cellspacing=0><TR><TH valign=top width="140">');
if(logo != ''){document.write('<div style="width:132;height:170;border:2px solid;border-color:#aaa #000 #000 #aaa;" id="'+logo+'"></div>')};
}

/*
the bottomgen function will generate a page footer. It is needed on every page to at least close the <table> constructs opened by the topgen() function. make sure that bottomgen matches topgen in that respect.

  bottomgen([content])

	If content is passed it will be used in place of the canned section you can hardcode below. The content should be HTML
	If you just want to close the tables, then use bottomgen(' ') which will overide the hardcoded with a blank and just close the tables.
*/
function bottomgen(content){
var tmp=new Date();thisyr=tmp.getFullYear();
copyr="2005";if(thisyr > copyr)copyr=copyr+'-'+thisyr;
document.write('</th></tr><tr><th colspan="2">');
if(!content)document.write('<div class="footer">Copyright © '+copyr+' HT Consulting. All rights reserved.</div>');
if(content)document.write(content);
document.write('</th></tr></table></div>');
}
/* Using menugen
reference:
  menugen('mainmenu button label[':submenu button label]',adflag,['directory location'])
	
This function generates the HTML for a menu which appears in a vertical column, normally on the left side of the page. (Think of the menugen call as simply being replaced by HTML statements that are the menu itself.)

menugen will mormally build all of the "main-level" buttons but only expand those into a submenu when told to do so.  At most one submenu, the currently "active" one, will ever be visible at one time.

In normal use, a file will call the menugen script to generate its own menu HTML as it is being loaded. Both the main-level button and its submenu button (if it is a submenu file) for itself will be hilited and made non-clickable by telling menugen which buttons(s) are "me"
 
The code below has hard-coded into it arrays containing pairs of Button Labels and the associated files those buttons are to link to. There is one array for the main menu itelf and one array for each submenu.

EXAMPLE:
Conceptually, a menu of 4 main-level buttons and two of those having submenus:

  A
  B
   b1
   b2
  C
  D
   d1
   d2
   d3
   d4

menugen will ALWAYS generate buttons for the MAIN-LEVEL "menuname" array (A, B, C, and D in the example).  

For example, the code in file "C" must generate its own menu by calling the menugen function and telling it to hilite the "C" button (and actually make it non-clickable- that is, a file would nomally not have a clickable link to itself). Thus, the "C" file would build its menu with a call of the form  menugen('C') and the menu would then appear as follows:

   A
   B
  *C*  (this entry is a non-clickable hilited button)
   D

If a submenu file has been called and is being loaded it must tell menugen to generate ITS menu by telling menugen to generate the  main level AND the submenu and that its own submenu entry should be hilited.  For example in the code of file b2, its menu is built by a call of the form:  menugen('B:b2') and will look like

   A
  *B*
    b1
   *b2*
   C
   D


Additional notes and optional call parameters:

	adflag=1 generates Google Ads, adflag=0 no Google ads
	if the 'mainmenu button label' parameter is not given, then the files <title>xxxxx</title> must match exactly a menuname[] value.
	If directory location is passed, that value will be prefixed onto the a=href references that will be used for all of the links in the generated menu.  
  If the directory location parameter is omitted, then the a=href will simply be to the locations in the array.  This would be the normal case.
	
*/
function menugen(menume,ads,dir){
if(!dir)dir='';
Smenume=null;
if(!menume)menume=document.title;
if(menume.indexOf(':')>=0){
s=menume.indexOf(':')
Smenume=menume.slice(s+1)
menume=menume.slice(0,s)
}
document.write('&nbsp;');
// set the main menu parameters
notmea='<div class="menut"><A HREF="'+dir;
notmeb='"> ';
notmec=' </a></div>';
mea='<div class="menume">';
meb='';
mec=' </div>';
// Build the main menu
var menuname= new Array();
var menuurl= new Array();
menuurl[1]="index.htm";menuname[1]='Home';
  
menuurl[2]="using_v2.htm";menuname[2]='Using Version 2';   
menuurl[3]="about.htm";menuname[3]='About Us';   
menuurl[4]="contactus.htm";menuname[4]='Contact Us';
menuurl[5]="history.htm";menuname[5]='Release History';   
menuurl[6]="screenshots.htm";menuname[6]='Screenshots';   
menuurl[7]="download.htm";menuname[7]='Downloads';   
menun=7;  // number of main menu items
// set submenu parameters
Snotmea='<div class="Smenut"><A HREF="'+dir;
Snotmeb='"> ';
Snotmec=' </a></div>';
Smea='<div class="Smenume">';
Smeb='';
Smec=' </div>';
// Build the "Using Clipguru" submenu
var Smenuname= new Array();
var Smenuurl= new Array();
// generate the menu and submenu if this file has one. highlight the current file(s)
document.write('<div style="text-align:center;">');
for(i=1;i<=menun;i++){;
 if(i==7)document.write('&nbsp;'); // extra line before download
 if(menuname[i] == menume){;
// if the menu item being written is this file, then highlight it. Also, if this one has a submenu, generate it and highlight any appropriate submenu entry if we are coming from one of the submenu files. 
 document.write(mea,menume,mec);
//
 if(Smenume){
// Submenu for "Using Version 1"
if (menume=="Using Version 1"){
Smenuurl[1]="using.htm";Smenuname[1]='General';
Smenuurl[2]="traymenu.htm";Smenuname[2]='The Tray Icon';   
Smenuurl[3]="filemenu.htm";Smenuname[3]='File Menu';
Smenuurl[4]="editmenu.htm";Smenuname[4]='Edit Menu';   
Smenuurl[5]="optionsmenu.htm";Smenuname[5]='Options Menu';   
Smenuurl[6]="helpmenu.htm";Smenuname[6]='Help Menu';
Smenuurl[7]="sets.htm";Smenuname[7]='Using Sets';
Smenun=7;  // number of "Using Clipguru" submenu items
}
if (menume=="Using Version 2"){
// Submenu for "Using Version 2"
Smenuurl[1]="using_v2.htm";Smenuname[1]='General';
Smenuurl[2]="traymenu_v2.htm";Smenuname[2]='The Tray Icon';   
Smenuurl[3]="filemenu_v2.htm";Smenuname[3]='File Menu';
Smenuurl[4]="editmenu_v2.htm";Smenuname[4]='Edit Menu';   
Smenuurl[5]="optionsmenu_v2.htm";Smenuname[5]='Options Menu';   
Smenuurl[6]="helpmenu_v2.htm";Smenuname[6]='Help Menu';
Smenuurl[7]="sets_v2.htm";Smenuname[7]='Using Sets';
Smenuurl[8]="backup_v2.htm";Smenuname[8]='Backup and Restore';
Smenuurl[9]="misc_v2.htm";Smenuname[9]='Other Features';
//Smenuurl[10]="convert_v2.htm";Smenuname[10]='V1 to V2 Conversion';
Smenun=9;  // number of "Using Clipguru" submenu items
}
  for(j=1;j<=Smenun;j++){;
   if(Smenuname[i,j] == Smenume){document.write(Smea,Smenume,Smec)}
   else{document.write(Snotmea,Smenuurl[i,j],Snotmeb,Smenuname[i,j],Snotmec)}; 
  }
 document.write('&nbsp;');
 }
//
 }
 else{document.write(notmea,menuurl[i],notmeb,menuname[i],notmec);
 }
}
document.write('</div>&nbsp;<p>')

//
// GOOGLE ADS
//
google_ad_client = "pub-4276166048595157";
google_alternate_color = "FFFFFF";
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = "120x600_as";
google_ad_type = "text";
//2006-10-21: Clipguru
google_ad_channel = "8310946495";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "FF0000";
google_color_text = "000000";
google_color_url = "0000FF";
//

//-->
