// ****************************************************************************
// *                                                                          *
// *                          Copyright 2003                                  *
// *                       CHECCO COMPUTER SERVICES                           *
// *                        All Rights Reserved.                              *
// *                                                                          *
// *     This software contains proprietary and confidential information      *
// *     belonging to CHECCO COMPUTER SERVICES, and may not be decompiled,    *
// *     disassembled, disclosed, reproduced or copied without the prior      *
// *     written consent of CHECCO COMPUTER SERVICES.                         *
// *                                                                          *
// ****************************************************************************
// -------------------------------------------
// preprocessing goes here
// -------------------------------------------
var menuCloseDelay = 500;
var visibleLayerName = new String();
var focusedLayerName = new String();
var shownArray = new Array();
var gotlayers = new Number();
var master_Alignment = new String();
var imgbackground = new Image(10,10);
var imglogo = new Image(10,10);
// ----------------------------------------------------------------------------------------------
function noop()
{
}

// -----------------------------
function findform(byname)
{
   //if ( is_gecko ) { return findDOM(document,"form",byname); }
   for ( i = 0; i < document.forms.length; i ++ )
   {
      if ( document.forms[i].name == byname )
      {
         return document.forms[i];
      }
   }
   return null;
}

function findimage(byname)
{
   //if ( is_gecko ) { return findDOM(document,"img",byname); }
   if (is_nav) {
      for ( var i = 0; i < document.images.length; i ++ )
      {
         if ( document.images[i].name == byname )
         {
            return document.images[i];
         }
      }
   }
   else {
      for ( var i = 0; i < document.all.length; i ++ )
      {
         if ( document.all[i].name == byname )
         {
            return document.all[i];
         }
      }
   }
   return null;
}

function findelement(byform,byname)
{
   //if ( is_gecko ) { return findDOM(byform,"input",byname); }
   for ( var i = 0; i < byform.elements.length; i ++ )
   {
      if ( byform.elements[i].name == byname )
      {
         return byform.elements[i];
      }
   }
   return null;
}

function nextelement(byform,fromfld)
{
   //if ( is_gecko ) { return nextDOM(byname); }
   var found = 0;
   for ( var i = 0; i < byform.elements.length; i ++ )
   {
      if ( found == 0 && byform.elements[i] == fromfld )
      {
         found = 1;
      }
      else if ( found == 1 && byform.elements[i].name == fromfld.name )
      {
         return byform.elements[i];
      }
   }
   return null;
}

// -------------------------------------------
function setCookie(name, value, expire) 
{   
   document.cookie = name + "=" + escape(value) + ";path=/" + ((expire == null) ? "" : ("; expires=" + expire.toGMTString()));
   return 0;
}

function getCookie(Name) 
{   
   var search = Name + "="   
   if (document.cookie.length > 0)
   { 
      // if there are any cookies      
      offset = document.cookie.indexOf(search)       
      if (offset != -1) 
      { 
         // if cookie exists          
         offset += search.length          
         // set index of beginning of value         
         end = document.cookie.indexOf(";", offset)          
         // set index of end of cookie value         
         if (end == -1)             
         {
            end = document.cookie.length         
         }
         return unescape(document.cookie.substring(offset, end))      
      }    
   }
   return "";
}

// ----------------------------------------------------------------------------------------------
// MAIN NAVIGATION
// ----------------------------------------------------------------------------------------------

// -------------------------------------------
// preprocessing goes here
// -------------------------------------------
var init_done = false;
var bpLoginID = "";
var bpLoginName = "";
var bpLoginScore = "";
var bpLoginLevel = "";
init_main();

// -------- STYLES --------
//document.write("<BASE HREF=\"http://"+location.host+"\">");
document.write("<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso8859-1\">");
document.write("<meta http-equiv=\"Pragma\" content=\"no-cache\">");
document.write("<meta http-equiv=\"expires\" content=\"now\">");
document.write("<meta http-equiv=\"Cache-Control\" content=\"no-cache\">");
document.write("<META NAME=\"description\" CONTENT=\"\">");
document.write("<META NAME=\"keywords\" CONTENT=\"hockey skate figure sport equipment store\">");

document.write("<STYLE type=text/css> \n" +
	"BODY { \n" +
	"	FONT-SIZE: 14pt; " + 
	"	FONT-FAMILY: Verdana,Arial,Helvetica; " +
	"	background-image: url('"+imgbackground.src+"'); " +
	"	color: #000000; " + 
	"	margin-top: 0px; " + 
	"	margin-left: 0px; " + 
	"	margin-right: 0px; " + 
	"	margin-bottom: 0px; " + 
	"	padding-top: 0; " + 
	"	padding-left: 0; " + 
	"	padding-right: 0; " + 
	"	padding-bottom: 0; " + 
	"	border-top: 0; " + 
	"	border-left: 0; " + 
	"	border-bottom: 0; " + 
	"	border-right: 0; " + 
	"} \n" +
	"A { \n" +
	"	TEXT-DECORATION: none \n" +
	"} \n" +
	"A.bare { \n" +
	"	TEXT-DECORATION: none \n" +
	"} \n" +
	"A.menu { \n" +
	"	FONT-WEIGHT: bold; FONT-SIZE: 9pt; \n" +
	"} \n" +
	".sidebar { \n" +
	"	FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #ffffff; \n" +
	"} \n" +
	".sidebarsub { \n" +
	"	FONT-WEIGHT: 100; FONT-SIZE: 10pt; COLOR: #ffffff; \n" +
	"} \n" +
	".sidebar2 { \n" +
	"	FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #ffffff; \n" +
	"} \n" +
	".sidebarsub2 { \n" +
	"	FONT-WEIGHT: 100; FONT-SIZE: 10pt; COLOR: #ffffff; \n" +
	"} \n" +
	".sidebarsubsub { \n" +
	"	FONT-WEIGHT: 100; FONT-SIZE: 9pt; COLOR: #ffffff; \n" +
	"} \n" +
	".subsub { \n" +
	"	MARGIN: 2px \n" +
	"} \n" +
	".subsub:hover { \n" +
	"	MARGIN: 2px; COLOR: #0000ff; BACKGROUND-COLOR: #ffffff \n" +
	"} \n" +
	".title { \n" +
	"	FONT-WEIGHT: 300; FONT-SIZE: 18pt \n" +
	"} \n" +
	".subtitle { \n" +
	"	FONT-WEIGHT: bold \n" +
	"} \n" +
	"A.normal { \n" +
	"	FONT-WEIGHT: bold; FONT-SIZE: 10pt; \n" +
	"} \n" +
	"A:hover { \n" +
	"	COLOR: #0000ff; BACKGROUND-COLOR: #ffffff; TEXT-DECORATION: none \n" +
	"} \n" +
	"</STYLE>");

// -------------------------------------------
// functions go here
// -------------------------------------------
function init_main()
{
   if ( init_done ) {
      return true;
   }
   init_done = true;
   
   bpLoginId = getCookie('bp_USERID');
   bpLoginName = getCookie('bp_NAME');
   bpLoginScore = getCookie('bp_SCORE');
   bpLoginLevel = getCookie('bp_LEVEL');

   args_pairs = new Object();	// Array()
   args = new Object();	// Array()
   section_filename = "";
   section_page = "";
   section_directory = "";
   browsertype = 0;
   browser = navigator.appName;
   version = navigator.appVersion;
   display_navbar = true;
   page_title = "";

   // Determine browser type
   if (browser.indexOf("Netscape") > -1) {
      if (parseInt(version) >= 3) {
         browsertype = 1;
      }
   }
   else if (browser.indexOf("Explorer") > -1) {
      if (parseInt(version) >= 4) {
         browsertype = 1;
      }
   }

   Parse_Args();
   Parse_Section_Pathname(top.location.pathname);

   // preload images
   imglogo.src = "/images/logo-1_h125.gif";
   //imgbackground.src = "/images/background/pecks.jpg";

   return true;
}

function isNumber(str)
{
	var validNumbers="0123456789";
	var num = "";
	str = str + "";
	if (str.length < 1)
		return(false);
	for ( var x = 0 ; x < str.length ; x++ ) {
		num = str.substring(x,x+1);
		if (validNumbers.indexOf(num) == -1) {
			return(false);
		}
	}
	return(true);
}

function String_Split(delim, str)
{
	var values = new Object();
	var i;
	var count = 0;
// when str is not defined or empty, account for NS2.0 not handling: "while ((i = str.indexOf(delim)) >= 0)"
// NS2.0 can't do a comparison against "str.indexOf(delim)" when str is empty or not defined
	if (str.length <= 0) {
		values.length = 0;
		return(values);
	}

	while ((i = str.indexOf(delim)) >= 0) {
		values[count++] = str.substring(0, i);
		str = str.substring(i+1);		// truncate end of str
	}
	values[count] = str;
	values.length = count + 1;
	return(values);
}

function Parse_Args()
{
	var search_str = top.location.search.substring(1, top.location.search.length);
	args_pairs = String_Split('\&', search_str);
	for (var i=0; i<args_pairs.length; ++i) {
		var args_pair = args_pairs[i];
		var name_val = String_Split('=', args_pair);
		args[name_val[0]] = name_val[1];
	}
	return(args);
}

function Parse_Section_Pathname()
{
	var pathname = arguments[0];
	directorys = String_Split('\/', pathname);	// e.g.: "/version1/admissions/applying.html"
      var use_idx = directorys.length - 1;
	// e.g.: "applying.html"
	section_filename = directorys[use_idx - 1];	// the actual filename is in the last element
      use_idx --;
	// e.g.: "applying"
	var section_pages = String_Split('\.', section_filename);	// let's assume we always only have one . in a filename
	section_page = section_pages[0];
	// e.g.: "admissions"
	section_directory = directorys[use_idx];	// the bottom directory is now in the last element
      while ( use_idx > 0 )
      {
         if ( section_directory == "" ) 
         {
            use_idx --;
            section_directory = directorys[use_idx];	// the bottom directory is now in the last element
            continue;
         }
         else if ( section_directory == "cgi-bin" ) 
         {
            use_idx --;
            section_directory = directorys[use_idx];	// the bottom directory is now in the last element
            continue;
         }
         else if ( section_directory == "files" ) 
         {
            use_idx --;
            section_directory = directorys[use_idx];	// the bottom directory is now in the last element
            continue;
         }
         else
         {
            break;
         }
     }
}

function Parse_Root_Pathname()
{
	var pathname = arguments[0];
	directorys = String_Split('\/', pathname);	// e.g.: "/version1/applying.html"
	// e.g.: "applying.html"
	root_filename = directorys[directorys.length - 1];	// the actual filename is in the last element
	--directorys.length;	// get rid of it from the array
	// e.g.: "applying"
	var root_pages = String_Split('\.', root_filename);	// let's assume we always only have one . in a filename
	root_page = root_pages[0];
}

function showMainNavigation(title)
{
	init_main();

	page_title = title;
	master_Alignment = "left";
	document.write('<A name=top></A>');

	// spacer
	document.write('<br>');
		
	// Logo
	document.write('<TABLE name="logo" cellSpacing=0 cellPadding=0 width="100%" border=0>' +
  		'<TR>' +
    		'<TD colspan=2 vAlign=center align=center nowrap>');
	document.write('&nbsp;&nbsp;<a href="/"><IMG alt="Pecks Skate Shop" src="' + imglogo.src + '" border=0></a>&nbsp;&nbsp;');
	/*
	document.write('</TD><TD vAlign=center align=center>');
	document.write('<FONT color=black size=5><B>');
	createTitleBar();
	document.write('</B>');
   	if ( bpLoginName ) {
   		document.write("<br><font size=2>(Logged in as: " + bpLoginName + ")</font>");
   	}
	document.write('</FONT></TD><TD align=right>');
	*/
	document.write('</TD></TR>');
	document.write('</TABLE>');

	// spacer
	/*
	document.write('<TABLE name="menu" border=0 cellpadding=0 cellspacing==0>');
	//document.write('<TD>Menu:</TD>');
	createMenuBar();
	document.write('</TR></TABLE><!-- end table "menu" -->');
	document.write('<br><br>');
	*/
	
	// Sidebar (includes content)
	document.write('<TABLE name="lower" cellSpacing=0 cellPadding=0 width="100%" height="100%" border=0><TR><TD valign=top>');
  		
	// Sidebar 
	document.write('<TABLE align=top name="inner1" cellSpacing=0 cellPadding=0 width="100%" height="100%" border=0>' +
  		'<TR><TD vAlign=top width=118>' +
      		'<TABLE name="inner2a" cellSpacing=0 cellPadding=0 width=145 bgColor=black border=0>');
   	createLinkEntry(0,"Home Page","/");
	createSideBar();
/*
	if ( bpLoginId ) {
   		createLinkEntry(0,"Member Area","/pecks/member/index.jsp");
      		createLinkEntry(1,"Logout","/pecks/logout.jsp","sub");
	}
	else {
      		createLinkEntry(0,"Member Login","/pecks/login.jsp");
      		createLinkEntry(1,"New Member","/pecks/newMember.jsp","sub");
	}
*/
        createLinkEntry(0,"Privacy Policy","/privacy_policy.html");
	document.write('<TR><TD><IMG height=18 alt="" src="/images/blank.gif" width=1></TD></TR>' +
        		'<TR><TD>' +
        		'<FORM name=searchbox action="http://search.atomz.com/search/" method=get>' +
			'<B class=sidebar>&nbsp;&nbsp;Quick Search</B><BR>&nbsp;&nbsp;' +
        		'<INPUT size=10 name=query>' +
			'<input type=hidden name="sp-a" value="sp10029f71">&nbsp;&nbsp;' +
        		'<INPUT style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: #ffffff; BACKGROUND-COLOR: #0000ff" type=submit value=" Go ">' +
        		'<br>&nbsp;&nbsp;<a class=sidebarsub href="/search.html">Advanced Search</a>' +
        		'</FORM>');
	document.write("</TD></TR>");
	document.write("<TR><TD align=center>");
	document.write('</TD></TR></TABLE><!-- end table "inner2a" -->');

      
    // other
/*
    document.write('<br><br>' +
    		'<TABLE name="inner3a" cellSpacing=0 cellPadding=0 width=145 bgColor=black border=0>' +
		'<TR><TD width=10>&nbsp;</TD><TD>' +
    		'<br><br></TD></TR></TABLE><!-- end table "inner3a" -->');
*/
    document.write('</TD>');

    // Content
    document.write('<TD vAlign=top><IMG alt="" src="/images/blank.gif" width=10></TD><TD vAlign=top width="100%">');
    //document.write('<TABLE name="inner2d" width="90%" border=0><TR><TD><FONT size=3><!-- body -->');
}

function endMainNavigation()
{
    //document.write('<!-- body end --></FONT></TD></TR></TABLE><!-- end table "inner2d" -->');
    document.write('</FONT></TD></TR></TABLE><!-- end table "inner1" -->');
    document.write('</TD></TR></TABLE><!-- end table "lower" -->');
    document.write('<!--trailer--><center><hr><FONT SIZE=1 COLOR=blue>' +
		'Copyright &copy; 2003-2006, Checco Services, Inc. All rights reserved.' +
		'</FONT></CENTER>');      
	document.write("    <br>");
        if ( location.protocol == "https:" )
        {
document.write('<script src="https://seal.thawte.com/getthawteseal?host_name=www.checco.com&size=L&use_flash=NO&use_transparent=NO&lang=en"></script>');
        }
	document.write("    <br>");
    document.write('<script language=javascript src="/js/awstats_misc_tracker.js"></script>');
    document.write('</BODY></HTML>');
}

// -------------------------------------------
function OnDocLoad()
{
   return true
}

// -------------------------------------------
function entryPrefix(ht)
{
	document.write('<TR><TD><IMG height=' + ht + ' alt="" src="/images/blank.gif" width=1></TD></TR>' +
        '<TR><TD nowrap><FONT color=#ffffff size=2>&nbsp;&nbsp;');
}

function entrySuffix()
{
	document.write('</FONT>&nbsp;&nbsp;</TD></TR>');

}

// -------------------------------------------
function createLinkEntry(nest,desc,link,type)
{
	var ht = 18;
	if ( nest ) 
	{
		ht = 1;
	}
	if ( !type )
	{
		type = '';
	}
	entryPrefix(ht);
	for ( i=0; i < nest; i ++)
	{
		document.write('&nbsp;&nbsp;&nbsp;');
	}
	if ( link )
	{
		document.write('<A class=sidebar' + type + ' href="' + link + '">');
	}
	else
	{
		document.write('<B class=sidebar' + type + '>');
	}
	if ( desc )
	{
		document.write(desc);
	}
	if ( link )
	{
		document.write('</A>');
	}
	else
	{
		document.write('</B>');
	}
	entrySuffix();
}

function createPopupEntry(nest,desc,link,type)
{
	var ht = 18;
	if ( nest ) 
	{
		ht = 1;
	}
	entryPrefix(ht);
	if ( !type )
	{
		type = '';
	}
	for ( i=0; i < nest; i ++)
	{
		document.write('&nbsp;&nbsp;&nbsp;');
	}
	if ( link )
	{
		document.write('<A class=sidebar' + type + ' href="' + link + '">');
	}
	else
	{
		document.write('<B class=sidebar' + type + '>');
	}
	if ( desc )
	{
		document.write(desc);
	}
	if ( link )
	{
		document.write('</A>');
	}
	else
	{
		document.write('</B>');
	}
	entrySuffix();
}


//<!--
// Ultimate client-side JavaScript client sniff. Version 3.01
// (C) Netscape Communications 1999-2001.  Permission granted to reuse and distribute.
// Revised 17 May 99 to add is_nav5up and is_ie5up (see below).
// Revised 20 Dec 00 to add is_gecko and change is_nav5up to is_nav6up
//                      also added support for IE5.5 Opera4&5 HotJava3 AOLTV
// Revised 22 Feb 01 to correct Javascript Detection for IE 5.x, Opera 4, 
//                      correct Opera 5 detection
//                      add support for winME and win2k
//                      synch with browser-type-oo.js
// Everything you always wanted to know about your JavaScript client
// but were afraid to ask. Creates "is_" variables indicating:
// (1) browser vendor:
//     is_nav, is_ie, is_opera, is_hotjava, is_webtv, is_TVNavigator, is_AOLTV
// (2) browser version number:
//     is_major (integer indicating major version number: 2, 3, 4 ...)
//     is_minor (float   indicating full  version number: 2.02, 3.01, 4.04 ...)
// (3) browser vendor AND major version number
//     is_nav2, is_nav3, is_nav4, is_nav4up, is_nav6, is_nav6up, is_gecko, is_ie3,
//     is_ie4, is_ie4up, is_ie5, is_ie5up, is_ie5_5, is_ie5_5up, is_hotjava3, is_hotjava3up,
//     is_opera4, is_opera5, is_opera5up
// (4) JavaScript version number:
//     is_js (float indicating full JavaScript version number: 1, 1.1, 1.2 ...)
// (5) OS platform and version:
//     is_win, is_win16, is_win32, is_win31, is_win95, is_winnt, is_win98, is_winme, is_win2k
//     is_os2
//     is_mac, is_mac68k, is_macppc
//     is_unix
//     is_sun, is_sun4, is_sun5, is_suni86
//     is_irix, is_irix5, is_irix6
//     is_hpux, is_hpux9, is_hpux10
//     is_aix, is_aix1, is_aix2, is_aix3, is_aix4
//     is_linux, is_sco, is_unixware, is_mpras, is_reliant
//     is_dec, is_sinix, is_freebsd, is_bsd
//     is_vms
//
// See http://www.it97.de/JavaScript/JS_tutorial/bstat/navobj.html and
// http://www.it97.de/JavaScript/JS_tutorial/bstat/Browseraol.html
// for detailed lists of userAgent strings.
//
// Note: you don't want your Nav4 or IE4 code to "turn off" or
// stop working when new versions of browsers are released, so
// in conditional code forks, use is_ie5up ("IE 5.0 or greater") 
// is_opera5up ("Opera 5.0 or greater") instead of is_ie5 or is_opera5
// to check version in code which you want to work on future
// versions.
    // convert all characters to lowercase to simplify testing
    var agt=navigator.userAgent.toLowerCase();
    // *** BROWSER VERSION ***
    // Note: On IE5, these return 4, so use is_ie5up to detect IE5.
    var is_major = parseInt(navigator.appVersion);
    var is_minor = parseFloat(navigator.appVersion);
    // Note: Opera and WebTV spoof Navigator.  We do strict client detection.
    // If you want to allow spoofing, take out the tests for opera and webtv.
    var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
                && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
    var is_nav2 = (is_nav && (is_major == 2));
    var is_nav3 = (is_nav && (is_major == 3));
    var is_nav4 = (is_nav && (is_major == 4));
    var is_nav4up = (is_nav && (is_major >= 4));
    var is_navonly      = (is_nav && ((agt.indexOf(";nav") != -1) ||
                          (agt.indexOf("; nav") != -1)) );
    var is_nav6 = (is_nav && (is_major == 5));
    var is_nav6up = (is_nav && (is_major >= 5));
    var is_gecko = (agt.indexOf('gecko') != -1);
    var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
    var is_ie3    = (is_ie && (is_major < 4));
    var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5")==-1) );
    var is_ie4up  = (is_ie && (is_major >= 4));
    var is_ie5    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
    var is_ie5_5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
    var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
    var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
    var is_dom     = (is_gecko || is_ie5up);
    // KNOWN BUG: On AOL4, returns false if IE3 is embedded browser
    // or if this is the first browser window opened.  Thus the
    // variables is_aol, is_aol3, and is_aol4 aren't 100% reliable.
    var is_aol   = (agt.indexOf("aol") != -1);
    var is_aol3  = (is_aol && is_ie3);
    var is_aol4  = (is_aol && is_ie4);
    var is_aol5  = (agt.indexOf("aol 5") != -1);
    var is_aol6  = (agt.indexOf("aol 6") != -1);
    var is_opera = (agt.indexOf("opera") != -1);
    var is_opera4 = (agt.indexOf("opera 4") != -1);
    var is_opera5 = (is_opera5 && (is_major == 5));
    var is_opera5up = (is_opera5 && (is_major >=5));
    var is_webtv = (agt.indexOf("webtv") != -1); 
    var is_TVNavigator = ((agt.indexOf("navio") != -1) || (agt.indexOf("navio_aoltv") != -1)); 
    var is_AOLTV = is_TVNavigator;
    var is_hotjava = (agt.indexOf("hotjava") != -1);
    var is_hotjava3 = (is_hotjava && (is_major == 3));
    var is_hotjava3up = (is_hotjava && (is_major >= 3));
    // *** JAVASCRIPT VERSION CHECK ***
    var is_js;
    if (is_nav2 || is_ie3) is_js = 1.0;
    else if (is_nav3) is_js = 1.1;
    else if (is_opera5up) is_js = 1.3;
    else if (is_opera) is_js = 1.1;
    else if ((is_nav4 && (is_minor <= 4.05)) || is_ie4) is_js = 1.2;
    else if ((is_nav4 && (is_minor > 4.05)) || is_ie5) is_js = 1.3;
    else if (is_hotjava3up) is_js = 1.4;
    else if (is_nav6 || is_gecko) is_js = 1.5;
    // NOTE: In the future, update this code when newer versions of JS
    // are released. For now, we try to provide some upward compatibility
    // so that future versions of Nav and IE will show they are at
    // *least* JS 1.x capable. Always check for JS version compatibility
    // with > or >=.
    else if (is_nav6up) is_js = 1.5;
    // NOTE: ie5up on mac is 1.4
    else if (is_ie5up) is_js = 1.3
    // HACK: no idea for other browsers; always check for JS version with > or >=
    else is_js = 0.0;
    // *** PLATFORM ***
    var is_win   = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
    // NOTE: On Opera 3.0, the userAgent string includes "Windows 95/NT4" on all
    //        Win32, so you can't distinguish between Win95 and WinNT.
    var is_win95 = ((agt.indexOf("win95")!=-1) || (agt.indexOf("windows 95")!=-1));
    // is this a 16 bit compiled version?
    var is_win16 = ((agt.indexOf("win16")!=-1) || 
               (agt.indexOf("16bit")!=-1) || (agt.indexOf("windows 3.1")!=-1) || 
               (agt.indexOf("windows 16-bit")!=-1) );  
    var is_win31 = ((agt.indexOf("windows 3.1")!=-1) || (agt.indexOf("win16")!=-1) ||
                    (agt.indexOf("windows 16-bit")!=-1));
    var is_winme = ((agt.indexOf("win 9x 4.90")!=-1));
    var is_win2k = ((agt.indexOf("windows nt 5.0")!=-1));
    // NOTE: Reliable detection of Win98 may not be possible. It appears that:
    //       - On Nav 4.x and before you'll get plain "Windows" in userAgent.
    //       - On Mercury client, the 32-bit version will return "Win98", but
    //         the 16-bit version running on Win98 will still return "Win95".
    var is_win98 = ((agt.indexOf("win98")!=-1) || (agt.indexOf("windows 98")!=-1));
    var is_winnt = ((agt.indexOf("winnt")!=-1) || (agt.indexOf("windows nt")!=-1));
    var is_win32 = (is_win95 || is_winnt || is_win98 || 
                    ((is_major >= 4) && (navigator.platform == "Win32")) ||
                    (agt.indexOf("win32")!=-1) || (agt.indexOf("32bit")!=-1));
    var is_os2   = ((agt.indexOf("os/2")!=-1) || 
                    (navigator.appVersion.indexOf("OS/2")!=-1) ||   
                    (agt.indexOf("ibm-webexplorer")!=-1));
    var is_mac    = (agt.indexOf("mac")!=-1);
    // hack ie5 js version for mac
    if (is_mac && is_ie5up) is_js = 1.4;
    var is_mac68k = (is_mac && ((agt.indexOf("68k")!=-1) || 
                               (agt.indexOf("68000")!=-1)));
    var is_macppc = (is_mac && ((agt.indexOf("ppc")!=-1) || 
                                (agt.indexOf("powerpc")!=-1)));
    var is_sun   = (agt.indexOf("sunos")!=-1);
    var is_sun4  = (agt.indexOf("sunos 4")!=-1);
    var is_sun5  = (agt.indexOf("sunos 5")!=-1);
    var is_suni86= (is_sun && (agt.indexOf("i86")!=-1));
    var is_irix  = (agt.indexOf("irix") !=-1);    // SGI
    var is_irix5 = (agt.indexOf("irix 5") !=-1);
    var is_irix6 = ((agt.indexOf("irix 6") !=-1) || (agt.indexOf("irix6") !=-1));
    var is_hpux  = (agt.indexOf("hp-ux")!=-1);
    var is_hpux9 = (is_hpux && (agt.indexOf("09.")!=-1));
    var is_hpux10= (is_hpux && (agt.indexOf("10.")!=-1));
    var is_aix   = (agt.indexOf("aix") !=-1);      // IBM
    var is_aix1  = (agt.indexOf("aix 1") !=-1);    
    var is_aix2  = (agt.indexOf("aix 2") !=-1);    
    var is_aix3  = (agt.indexOf("aix 3") !=-1);    
    var is_aix4  = (agt.indexOf("aix 4") !=-1);    
    var is_linux = (agt.indexOf("inux")!=-1);
    var is_sco   = (agt.indexOf("sco")!=-1) || (agt.indexOf("unix_sv")!=-1);
    var is_unixware = (agt.indexOf("unix_system_v")!=-1); 
    var is_mpras    = (agt.indexOf("ncr")!=-1); 
    var is_reliant  = (agt.indexOf("reliantunix")!=-1);
    var is_dec   = ((agt.indexOf("dec")!=-1) || (agt.indexOf("osf1")!=-1) || 
           (agt.indexOf("dec_alpha")!=-1) || (agt.indexOf("alphaserver")!=-1) || 
           (agt.indexOf("ultrix")!=-1) || (agt.indexOf("alphastation")!=-1)); 
    var is_sinix = (agt.indexOf("sinix")!=-1);
    var is_freebsd = (agt.indexOf("freebsd")!=-1);
    var is_bsd = (agt.indexOf("bsd")!=-1);
    var is_unix  = ((agt.indexOf("x11")!=-1) || is_sun || is_irix || is_hpux || 
                 is_sco ||is_unixware || is_mpras || is_reliant || 
                 is_dec || is_sinix || is_aix || is_linux || is_bsd || is_freebsd);
    var is_vms   = ((agt.indexOf("vax")!=-1) || (agt.indexOf("openvms")!=-1));
//--> end hide JavaScript

function queryVersion()
{
  alert("Navigator.appCodeName= [" + navigator.appCodeName + "]\n" +
 	"Navigator.appName= [" + navigator.appName + "]\n" +
 	"Navigator.userAgent= [" + navigator.userAgent + "]\n" );
}

// -------------------------------------------
// MUST DEFINE:
//	 createTitleBar		// Title area
//	 createMenuBar		// horizontal area
//	 createSideBar		// sidebar
//	 createPopupMenus	// various popup menus
// -------------------------------------------
