	<!-- APPLE QUICKTIME JAVASCRIPT PATCH -->
/*

File: AC_QuickTime.js

Abstract: This file contains functions to generate OBJECT and EMBED tags for QuickTime content.

Version: <1.1>

*/

/************** LOCALIZABLE GLOBAL VARIABLES ****************/

var gArgCountErr =	'The "%%" function requires an even number of arguments.'
				+	'\nArguments should be in the form "atttributeName", "attributeValue", ...';

/******************** END LOCALIZABLE **********************/

var gTagAttrs				= null;
var gQTGeneratorVersion		= 1.0;

function AC_QuickTimeVersion()	{ return gQTGeneratorVersion; }

function _QTComplain(callingFcnName, errMsg)
{
    errMsg = errMsg.replace("%%", callingFcnName);
	alert(errMsg);
}

function _QTAddAttribute(prefix, slotName, tagName)
{
	var		value;

	value = gTagAttrs[prefix + slotName];
	if ( null == value )
		value = gTagAttrs[slotName];

	if ( null != value )
	{
		if ( 0 == slotName.indexOf(prefix) && (null == tagName) )
			tagName = slotName.substring(prefix.length); 
		if ( null == tagName ) 
			tagName = slotName;
		return '' + tagName + '="' + value + '"';
	}
	else
		return "";
}

function _QTAddObjectAttr(slotName, tagName)
{
	// don't bother if it is only for the embed tag
	if ( 0 == slotName.indexOf("emb#") )
		return "";

	if ( 0 == slotName.indexOf("obj#") && (null == tagName) )
		tagName = slotName.substring(4); 

	return _QTAddAttribute("obj#", slotName, tagName);
}

function _QTAddEmbedAttr(slotName, tagName)
{
	// don't bother if it is only for the object tag
	if ( 0 == slotName.indexOf("obj#") )
		return "";

	if ( 0 == slotName.indexOf("emb#") && (null == tagName) )
		tagName = slotName.substring(4); 

	return _QTAddAttribute("emb#", slotName, tagName);
}


function _QTAddObjectParam(slotName, generateXHTML)
{
	var		paramValue;
	var		paramStr = "";
	var		endTagChar = (generateXHTML) ? ' />' : '>';

	if ( -1 == slotName.indexOf("emb#") )
	{
		// look for the OBJECT-only param first. if there is none, look for a generic one
		paramValue = gTagAttrs["obj#" + slotName];
		if ( null == paramValue )
			paramValue = gTagAttrs[slotName];

		if ( 0 == slotName.indexOf("obj#") )
			slotName = slotName.substring(4); 
	
		if ( null != paramValue )
			paramStr = '<param name="' + slotName + '" value="' + paramValue + '"' + endTagChar;
	}

	return paramStr;
}

function _QTDeleteTagAttrs()
{
	for ( var ndx = 0; ndx < arguments.length; ndx++ )
	{
		var attrName = arguments[ndx];
		delete gTagAttrs[attrName];
		delete gTagAttrs["emb#" + attrName];
		delete gTagAttrs["obj#" + attrName];
	}
}

		

// generate an embed and object tag, return as a string
function _QTGenerate(callingFcnName, generateXHTML, args)
{
	// is the number of optional arguments even?
	if ( args.length < 4 || (0 != (args.length % 2)) )
	{
		_QTComplain(callingFcnName, gArgCountErr);
		return "";
	}
	
	// allocate an array, fill in the required attributes with fixed place params and defaults
	gTagAttrs = new Object();
	gTagAttrs["src"] = args[0];
	gTagAttrs["width"] = args[1];
	gTagAttrs["height"] = args[2];
	gTagAttrs["classid"] = "clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B";
		//Important note: It is recommended that you use this exact classid in order to ensure a seamless experience for all viewers
	gTagAttrs["pluginspage"] = "http://www.apple.com/quicktime/download/";

	// set up codebase attribute with specified or default version before parsing args so
	//  anything passed in will override
	var activexVers = args[3]
	if ( (null == activexVers) || ("" == activexVers) )
		activexVers = "6,0,2,0";
	gTagAttrs["codebase"] = "http://www.apple.com/qtactivex/qtplugin.cab#version=" + activexVers;

	var	attrName,
		attrValue;

	// add all of the optional attributes to the array
	for ( var ndx = 4; ndx < args.length; ndx += 2)
	{
		attrName = args[ndx].toLowerCase();
		attrValue = args[ndx + 1];

		// "name" and "id" should have the same value, the former goes in the embed and the later goes in
		//  the object. use one array slot 
		if ( "name" == attrName || "id" == attrName )
			gTagAttrs["name"] = attrValue;

		else 
			gTagAttrs[attrName] = attrValue;
	}

	// init both tags with the required and "special" attributes
	var objTag =  '<object '
					+ _QTAddObjectAttr("classid")
					+ _QTAddObjectAttr("width")
					+ _QTAddObjectAttr("height")
					+ _QTAddObjectAttr("codebase")
					+ _QTAddObjectAttr("name", "id")
					+ _QTAddObjectAttr("tabindex")
					+ _QTAddObjectAttr("hspace")
					+ _QTAddObjectAttr("vspace")
					+ _QTAddObjectAttr("border")
					+ _QTAddObjectAttr("align")
					+ _QTAddObjectAttr("class")
					+ _QTAddObjectAttr("title")
					+ _QTAddObjectAttr("accesskey")
					+ _QTAddObjectAttr("noexternaldata")
					+ '>'
					+ _QTAddObjectParam("src", generateXHTML);
	var embedTag = '<embed '
					+ _QTAddEmbedAttr("src")
					+ _QTAddEmbedAttr("width")
					+ _QTAddEmbedAttr("height")
					+ _QTAddEmbedAttr("pluginspage")
					+ _QTAddEmbedAttr("name")
					+ _QTAddEmbedAttr("align")
					+ _QTAddEmbedAttr("tabindex");

	// delete the attributes/params we have already added
	_QTDeleteTagAttrs("src","width","height","pluginspage","classid","codebase","name","tabindex",
					"hspace","vspace","border","align","noexternaldata","class","title","accesskey");

	// and finally, add all of the remaining attributes to the embed and object
	for ( var attrName in gTagAttrs )
	{
		attrValue = gTagAttrs[attrName];
		if ( null != attrValue )
		{
			embedTag += _QTAddEmbedAttr(attrName);
			objTag += _QTAddObjectParam(attrName, generateXHTML);
		}
	} 

	// end both tags, we're done
	return objTag + embedTag + '></em' + 'bed></ob' + 'ject' + '>';
}

// return the object/embed as a string
function QT_GenerateOBJECTText()
{
	return _QTGenerate("QT_GenerateOBJECTText", false, arguments);
}

function QT_GenerateOBJECTText_XHTML()
{
	return _QTGenerate("QT_GenerateOBJECTText_XHTML", true, arguments);
}

function QT_WriteOBJECT()
{
	document.writeln(_QTGenerate("QT_WriteOBJECT", false, arguments));
}

function QT_WriteOBJECT_XHTML()
{
	document.writeln(_QTGenerate("QT_WriteOBJECT_XHTML", true, arguments));
}

<!-- H-PI JAVASCRIPT BY AARON ANDREW HUNT-->
	var msgParts = new Array()
	var msgLinks = new Array()
	var recentParts = new Array()
	var recentLinks = new Array()
	var theTime = new Date()
	var theMonth = theTime.getMonth()
	var theDay = theTime.getDate()
	var theYear = theTime.getFullYear()
	var theMonths = new Array("January","February","March","April","May","June","July","August","September","October","November","December")
	var baseurl = "http://www.h-pi.com/"
	
	msgParts[0] = theMonths[theMonth] + " " + theDay + ", " + theYear + " &ndash; "
	
	msgParts.push("H-Chroma at Wright State University, ")
	msgParts.push("H-Pi has moved to Indiana")
	
	msgLinks.push("href='"+baseurl+"webupdates.html'")
	
	msgLinks.push("href='"+baseurl+"press.html'")
	msgLinks.push("href='"+baseurl+"wordpress/'")

	
	var CurrentMsg = ""
	for (var j=0; j< msgParts.length; j++) {
		CurrentMsg += "<a class='topmenu' " + msgLinks[j] + ">" + msgParts[j] + "</a>"
	}
	
	var mdiv = "&equiv;"
	var fhdiv = "&nbsp;&nbsp;"
	var hdiv = "&nbsp;&nbsp;&nbsp;&rarr;&nbsp;&nbsp;"
	var hsdiv = "&nbsp;:"
	var hpre = "<font size=3>&nbsp;</font>"
	var smdiv = "&nbsp;&oplus;&nbsp;"
	var imdiv = "&oplus;"
	var exchangeRate = 1.48600 //Nov 21, 2009
	var URL = location.href
	var linkURL = ""
	var thislink = ""
	var selClass = new Array("class='sel'","","","","","")

	<!-- ALL MAIN VARIABLES -->
	var navCats = new Array()
	var catLinks = new Array()
	var catLengths = new Array()
	var navItems = new Array()
	var navLinks = new Array()

	<!-- ALL SUBMENU VARIABLES -->
	var subLengths = new Array()
	var subItems = new Array()
	var subLinks = new Array()
	
navCats.push("MAIN")
catLinks.push("index.html")
catLengths.push(8)

	navItems.push("Shopping Cart")
	navLinks.push("shoppingcart.html")
	subLengths.push(0)

	navItems.push("About")
	navLinks.push("about.html")
	subLengths.push(4)
	
		subItems.push("Company")
		subItems.push("Ordering & Shipping")
		subItems.push("Lead Time & Discounts")
		subItems.push("Browser Security & Privacy")
	
		subLinks.push("about.html")
		subLinks.push("aboutorder.html")
		subLinks.push("aboutleadtime.html")
		subLinks.push("aboutbrowsers.html")
		
	navItems.push("FAQ")
	navLinks.push("faq.html")
	subLengths.push(3)
		
		subItems.push("General FAQ")
		subItems.push("Tuning Box FAQ")
		subItems.push("Tonal Plexus FAQ")
		
		subLinks.push("faq.html")
		subLinks.push("TBX1faq.html?p=FAQ")
		subLinks.push("TPX28faq.html?p=FAQ")
		
	navItems.push("MIDI Gadgets")
	navLinks.push("MGBintro.html")
	subLengths.push(8)
		
		subItems.push("Introduction")
		subItems.push("Encoders")
		subItems.push("Decoders")
		subItems.push("Processors")
		subItems.push("Interfaces")
		subItems.push("Accessories")
		subItems.push("Bundles")
		subItems.push("Rare Parts")
		
		subLinks.push("MGBintro.html")
		subLinks.push("MGBencoders.html")
		subLinks.push("MGBdecoders.html")
		subLinks.push("MGBprocessors.html")
		subLinks.push("MGBinterfaces.html")
		subLinks.push("MGBaccessories.html")
		subLinks.push("MGBbundles.html")
		subLinks.push("MGBrareParts.html")
	
	navItems.push("Catalog")
	navLinks.push("catalog.html")
	subLengths.push(2)
		
		subItems.push("H&pi; Products")
		subItems.push("MGB Products")
		
		subLinks.push("catalog.html#HPiproducts")
		subLinks.push("catalog.html#MGBencoders")

	navItems.push("Prototypes")
	navLinks.push("prototypes.html")
	subLengths.push(7)
	
		subItems.push("About Prototypes")
		subItems.push("Scale Station")
		subItems.push("MIDI Action Stomp Hub")
		subItems.push("External Plexus Control")
		subItems.push("mini MOD Controllers")
		subItems.push("MegaTuner")
		subItems.push("Tonal Plexus Prototypes")
		
		subLinks.push("prototypes.html")
		subLinks.push("protoSCST.html")
		subLinks.push("protoMASH.html")
		subLinks.push("protoEPC1.html")
		subLinks.push("protoMiniMOD.html")
		subLinks.push("protoMTR1.html")
		subLinks.push("protoTPX.html")	
		
	navItems.push("Search Site")
	navLinks.push("search.html")
	subLengths.push(0)

	navItems.push("Contact")
	navLinks.push("contact.html")
	subLengths.push(0)
	
navCats.push("Tuning Box")
catLinks.push("TBX1buy.html")
catLengths.push(11)
	
		navItems.push("Introduction")
		navLinks.push("TBX1intro.html")
		subLengths.push(0)
		
		navItems.push("Features")
		navLinks.push("TBX1features.html")
		subLengths.push(0)
		
		navItems.push("Setups")
		navLinks.push("TBX1setups.html")
		subLengths.push(0)
		
		navItems.push("Compatibility")
		navLinks.push("gm.html?p=TBX1")
		subLengths.push(0)
		
		navItems.push("Images")
		navLinks.push("TBX1images.html")
		subLengths.push(0)
		
		navItems.push("Videos")
		navLinks.push("TBX1videos.html?p=TBX1")
		subLengths.push(0)
		
		navItems.push("Custom Scale Editor")
		navLinks.push("CSEsoftware.html")
		subLengths.push(0)
		
		navItems.push("Scale Archive")
		navLinks.push("cgi-bin/filearchive.pl?folder=csefiles&extension=.cse")
		subLengths.push(0)
		
		navItems.push("FAQ")
		navLinks.push("TBX1faq.html")
		subLengths.push(0)
		
		navItems.push("Upgrade")
		navLinks.push("TBX1upgrade.html")
		subLengths.push(0)
		
		navItems.push("Buy")
		navLinks.push("TBX1buy.html")
		subLengths.push(0)

navCats.push("Tonal Plexus")
catLinks.push("TPX28buy.html")
catLengths.push(14)
		
	navItems.push("Introduction")
	navLinks.push("TPX28intro.html")
	subLengths.push(0)
	
	navItems.push("Layout")
	navLinks.push("TPX28keyboard.html")
	subLengths.push(0)
	
	navItems.push("Intervals")
	navLinks.push("TPX28intervals.html")
	subLengths.push(0)
	
	navItems.push("Tuning Editor")
	navLinks.push("TPXEsoftware.html")
	subLengths.push(0)
	
	navItems.push("Scale Archive")
	navLinks.push("cgi-bin/filearchive.pl?folder=tpxfiles&extension=.tpx")
	subLengths.push(0)
	
	navItems.push("Synth Editor")
	navLinks.push("PXSCsoftware.html")
	subLengths.push(0)
	
	navItems.push("Images")
	navLinks.push("TPX28images.html")
	subLengths.push(0)
	
	navItems.push("Videos")
	navLinks.push("TPX28videos.html?p=TPX28")
	subLengths.push(0)
	
	navItems.push("Features")
	navLinks.push("TPX28features.html")
	subLengths.push(0)
	
	navItems.push("Compatibility")
	navLinks.push("gm.html?p=TPX28")
	subLengths.push(0)
	
	navItems.push("Comparison Charts")
	navLinks.push("TPX28compare.html")
	subLengths.push(0)
	
	navItems.push("FAQ")
	navLinks.push("TPX28faq.html")
	subLengths.push(0)
	
	navItems.push("Upgrade")
	navLinks.push("TPX28upgrade.html")
	subLengths.push(0)
	
	navItems.push("Buy")
	navLinks.push("TPX28buy.html")
	subLengths.push(0)

navCats.push("SOFTWARE")
catLinks.push("CSEsoftware.html")
catLengths.push(8)
		
	navItems.push("CSE")
	navLinks.push("CSEsoftware.html")
	subLengths.push(3)
		
		subItems.push("Details")
		subItems.push("Download")
		subItems.push("Bug Reports")
		
		subLinks.push("CSEsoftware.html")
		subLinks.push("downloads.html?p=CSE")
		subLinks.push("CSEreports.html?p=CSE")

	navItems.push("TPXE")
	navLinks.push("TPXEsoftware.html")
	subLengths.push(3)
		
		subItems.push("Details")
		subItems.push("Download")
		subItems.push("Bug Reports")
		
		subLinks.push("TPXEsoftware.html")
		subLinks.push("downloads.html?p=TPXE")
		subLinks.push("TPXEreports.html?p=TPXE")

	navItems.push("ScalaVista")
	navLinks.push("ScalaVistasoftware.html")
	subLengths.push(3)
		
		subItems.push("Details")
		subItems.push("Download")
		subItems.push("Bug Reports")
		
		subLinks.push("ScalaVistasoftware.html")
		subLinks.push("downloads.html?p=ScalaVista")
		subLinks.push("ScalaVistareports.html?p=ScalaVista")
		
	navItems.push("HPLF")
	navLinks.push("HPLFsoftware.html")
	subLengths.push(4)
		
		subItems.push("Details")
		subItems.push("Download")
		subItems.push("Bug Reports")
		subItems.push("Buy")
		
		subLinks.push("HPLFsoftware.html")
		subLinks.push("downloads.html?p=HPLF")
		subLinks.push("HPLFreports.html?p=HPLF")
		subLinks.push("HPLFbuy.html")
	
	navItems.push("SCORDATURA")
	navLinks.push("SCRDsoftware.html")
	subLengths.push(4)
		
		subItems.push("Details")
		subItems.push("Download")
		subItems.push("Bug Reports")
		subItems.push("Buy")
		
		subLinks.push("SCRDsoftware.html")
		subLinks.push("downloads.html?p=SCRD")
		subLinks.push("SCRDreports.html?p=SCRD")
		subLinks.push("SCRDbuy.html")
	
	navItems.push("XENTONE")
	navLinks.push("XENTsoftware.html")
	subLengths.push(4)
		
		subItems.push("Details")
		subItems.push("Download")
		subItems.push("Bug Reports")
		subItems.push("Buy")
		
		subLinks.push("XENTsoftware.html")
		subLinks.push("downloads.html?p=XENT")
		subLinks.push("XENTreports.html?p=XENT")
		subLinks.push("XENTbuy.html")
	
	navItems.push("PXSC")
	navLinks.push("PXSCsoftware.html")
	subLengths.push(3)
		
		subItems.push("Details")
		subItems.push("Download")
		subItems.push("Bug Reports")
		
		subLinks.push("PXSCsoftware.html")
		subLinks.push("downloads.html?p=PXSC")
		subLinks.push("PXSCreports.html?p=PXSC")
		
	navItems.push("MEGASCORE")
	navLinks.push("MSCintro.html")
	subLengths.push(13)
		
		subItems.push("Introduction")
		subItems.push("Staff")
		subItems.push("Clefs")
		subItems.push("Naturals")
		subItems.push("Signs")
		subItems.push("Accidentals")
		subItems.push("Shifts")
		subItems.push("Inflections")
		subItems.push("Keys")
		subItems.push("Scales")
		subItems.push("Features")
		subItems.push("Paper")
		subItems.push("Download")
		
		subLinks.push("MSCintro.html")
		subLinks.push("megastaff/staff.html")
		subLinks.push("megastaff/clefs.html")
		subLinks.push("megastaff/naturals.html")
		subLinks.push("megastaff/signs.html")
		subLinks.push("megastaff/accidentals.html")
		subLinks.push("megastaff/shifts.html")
		subLinks.push("megastaff/inflections.html")
		subLinks.push("megastaff/keys.html")
		subLinks.push("megastaff/scales.html")
		subLinks.push("MSCfeatures.html")
		subLinks.push("staffpaper.html")
		subLinks.push("downloads.html")

navCats.push("DOWNLOADS")
catLinks.push("downloads.html")
catLengths.push(7)

	navItems.push("Software & Manuals")
	navLinks.push("downloads.html")
	subLengths.push(0)
	
	navItems.push("Music Files")
	navLinks.push("musicFiles.html")
	subLengths.push(0)
	
	navItems.push("Tuning Box Videos")
	navLinks.push("TBX1videos.html")
	subLengths.push(0)
	
	navItems.push("Tonal Plexus Videos")
	navLinks.push("TPX28videos.html")
	subLengths.push(0)
	
	navItems.push("Soundfonts")
	navLinks.push("soundfonts.html")
	subLengths.push(0)
	
	navItems.push("Megastaff Paper")
	navLinks.push("staffpaper.html")
	subLengths.push(0)
	
	navItems.push("Free Books on Tuning")
	navLinks.push("tuningbooks.html")
	subLengths.push(0)
	
navCats.push("XENTONALITY")
catLinks.push("theory/foreword.html")
catLengths.push(4)

	navItems.push("H-System Music Theory")
	navLinks.push("theory/foreword.html")
	subLengths.push(7)
	
		subItems.push("1 Naturals")
		subItems.push("2 Intervals")
		subItems.push("3 Accidentals")
		subItems.push("4 Measurement")
		subItems.push("5 Triads")
		subItems.push("6 Superscales")
		subItems.push("7 H-System")
	
		subLinks.push("theory/naturals1.html")
		subLinks.push("theory/intervals1.html")
		subLinks.push("theory/accidentals1.html")
		subLinks.push("theory/measurement1.html")
		subLinks.push("theory/triads1.html")
		subLinks.push("theory/superscales1.html")
		subLinks.push("theory/huntsystem1.html")
		
	navItems.push("Microtonal History")
	navLinks.push("eop-quotes.html")
	subLengths.push(6)
	
		subItems.push("Quotes")
		subItems.push("Microtonal Pioneers")
		subItems.push("Schoenberg")
		subItems.push("Bartok")
		subItems.push("Ogolevets")
		subItems.push("Tuning Pitches")
		
		subLinks.push("eop-quotes.html")
		subLinks.push("eop-pioneers.html")
		subLinks.push("eop-schoenberg.html")
		subLinks.push("eop-bartok.html")
		subLinks.push("eop-ogolevets.html")
		subLinks.push("eop-tuning.html")
	
	navItems.push("Instrument Galleries")
	navLinks.push("eop-keyboards.html")
	subLengths.push(2)
	
		subItems.push("Keyboards")
		subItems.push("Guitars")
		
		subLinks.push("eop-keyboards.html")
		subLinks.push("eop-guitars.html")
	
	navItems.push("Free Books on Tuning")
	navLinks.push("tuningbooks.html")
	subLengths.push(0)
		
navCats.push("BUZZ")
catLinks.push("wordpress/")
catLengths.push(4)
		
	navItems.push("Blog")
	navLinks.push("wordpress/")
	subLengths.push(0)
	
	navItems.push("Press Releases")
	navLinks.push("press.html")
	subLengths.push(0)

	navItems.push("In Print")
	navLinks.push("print.html")
	subLengths.push(0)
	
	navItems.push("Contact")
	navLinks.push("contact.html")
	subLengths.push(0)

	
function navHeader(selectedItem, whichSubmenu, selectedSubitem) {
	
	<!-- HEADER -->
	<!-- 800x600 PAGE CONTAINER TABLE-->
	document.write("<center><table border='0' bgcolor='#ffffff' width='800' height='100%' cellpadding='0' cellspacing='0'><tr>")
	<!-- LEFT EDGE -->
	document.write("<td rowspan='3' width='1' bgcolor='#333333'></td><td bgcolor='#000000'>")
	
		<!-- TOP BANNER TABLE-->
		document.write("<table width=100% height=32 cellspacing=0 cellpadding=0 border=0>")
		document.write("<tr><td width=240 height=32 bgcolor='#000000'><a class='home' href='"+baseurl+"index.html'>")
		document.write("<img border=0 width=240 height=33 valign=top src='"+baseurl+"images/newmenuheader.gif'></a></td>")
		<!-- CART ICON -->
		document.write("<th class='hpihead'><a class='plain' href = '"+baseurl+"shoppingcart.html'>")
		document.write("<img border=0 width=16 valign=top src='"+baseurl+"images/ShoppingCart.gif'></a></td>")
		<!-- CURRENT MESSAGE -->
		document.write("<th class='hpihead' >"+CurrentMsg+"</th>")
		document.write("</tr></table>")
	
	<!-- OPEN MENU -->
	document.write("<ul id='nav' class='dropdown dropdown-horizontal'>")
	var t = 0
	var k = 0
	var subStart = 0
	var subEnd = 0
	var navStart = 0
	var navEnd = 0
	linkURL = baseurl
	<!-- ADD EACH HEADER MENU ITEM -->
	for (k=0; k < navCats.length; k++) {
		document.write("<li><a class='topmenu' href='"+linkURL+catLinks[k]+"'>"+navCats[k]+"</a><ul>")
		<!-- DROPDOWN ITEMS START WHERE? -->
		if (k > 0) {
			navStart = navStart + catLengths[k-1]
		}
		navEnd = navStart + catLengths[k]
		<!-- ADD EACH DROPDOWN ITEM -->
		for (t = navStart; t < navEnd; t++) {
			<!-- SUBITEMS START WHERE? -->
			if (t > 0) {
				subStart = subStart + subLengths[t-1]
			}
			if (subLengths[t] == 0) {
				<!-- NO SUBITEMS, CLOSE DROPDOWN LIST -->
				document.write("<li><a href='"+linkURL+navLinks[t]+"'>"+navItems[t]+"</a></li>")
			}
			else {
				document.write("<li><a class='dir' href='"+linkURL+navLinks[t]+"'>"+navItems[t]+"</a>")
				<!-- ADD EACH SUBITEM -->
				subEnd = subStart + subLengths[t]
				document.write("<ul>")
				for (j = subStart; j < subEnd; j++) {
					document.write("<li><a href='"+linkURL+subLinks[j]+"'>"+subItems[j]+"</a></li>")
				}
				<!-- FINISHED SUBITEMS, CLOSE SUBITEMS LIST, CLOSE DROPDOWN ITEM -->
				document.write("</ul></li>")
			}
		}
		<!-- CLOSE DROPDOWN LIST -->
		document.write("</ul></li>")
	}
	<!-- CLOSE MENU -->
	document.write("</ul>")
	
	<!-- BAR ACROSS TOP -->
	document.write("<div class='top'>&nbsp;</div>")
	
	<!-- RIGHT EDGE -->
	document.write("</td><td rowspan='3' width='1' bgcolor='#333333'></td></tr>")

	<!-- OPEN EMPTY PAGE CONTAINER -->
	document.write("<tr><td valign='top' height='597'>")	
}


function introheader(whichIntro) {
	document.write("<div class='intromenu'>")
	var subStart = 0
	var subEnd = 0
	var navStart = 0
	var navEnd = 0
	var navType = "sub"
	for (j = 0; j < navItems.length; j++) {
		if (whichIntro == navItems[j]) {
			for (var k = 1; k <= j; k++) {
				subStart = subStart + subLengths[k-1]
			}
			subEnd = subStart + subLengths[j] - 1
		}
	}
	if (subStart == subEnd) {
		navType = "cat"
		for (j = 0; j < navCats.length; j++) {
			if (whichIntro == navCats[j]) {
				for (var k = 1; k <= j; k++) {
					navStart = navStart + catLengths[k-1]
				}
				navEnd = navStart + catLengths[j] - 1
			}
		}
	}
	linkURL = baseurl
	document.write(whichIntro.toUpperCase()+"&nbsp;&rarr;&nbsp;") 
	if (navType == "sub") {
		for (j = subStart+1; j < subEnd+1; j++) {	
			thislink = subLinks[j]
			document.write("<a class='intromenu' href='"+linkURL+thislink+"'>"+subItems[j].toUpperCase()+"</a>")
			if (j != subEnd) {
				document.write(" "+imdiv+" ")
			}
		}
	}
	else {
		for (j = navStart+1; j < navEnd+1; j++) {	
			thislink = navLinks[j]
			document.write("<a class='intromenu' href='"+linkURL+thislink+"'>"+navItems[j].toUpperCase()+"</a>")
			if (j != navEnd) {
				document.write(" "+imdiv+" ")
			}
		}
	}
	document.write("</div>")
}


function gotoPage(whichCat) {
	document.location = whichCat
}


function RefreshAllImages() {
	var msec = clocktime.getUTCSeconds();
	for (var j = 0; j < document.images.length; j++) {
		document.images[j].src = document.images[j].src+'?'+msec
	}
}

function preventErrors(e) {
	if (e == "earlybird") {
		return true
	}
	else {
		return false
	}
}

function embedQTFile(theQTFileName) {
	var theMediaType = theQTFileName.split(".")[1]
	if (theMediaType == "mov") {
		QT_WriteOBJECT(theQTFileName, '350', '260', '', 'autoplay', 'false', 'loop', 'false', 'align', 'middle');
	}
	if (theMediaType == "mid") {
		QT_WriteOBJECT(theQTFileName, '100', '20', '', 'autoplay', 'false', 'loop', 'false', 'align', 'middle');
	}
}

function theFooter() {
	document.write("</td><tr><td><div class='foot'>&copy;2010 H-Pi Instruments</div></td></tr></table></center>")
}