
function drawMenu ()

{

// *******************************************************************************************************
// DATA AND OBJECT SETUP
// *******************************************************************************************************


// Default start place for menu system

currentTabMenu='Home'
currentSubMenu= subMenu
currentContent='main.htm'

// This Array set holds menu and link info for every unique subMenu item (Link info and which Tab it appears under)
// Currently all 'name' entries MUST BE UNIQUE in order to function correctly
// 'tab' entries give the 'home' tab for that submenu item followed by any other tabs this menuSub appears in (seperated by '_')
// Table entries can appear in any order although that does determin the order of the sub menu

subMenuInfo = new Array()

// Set up properties and methods for this array's object

function populateSubMenu (name, tab, pageLink){
	this.name = name
	this.tab = tab
	this.pageLink = pageLink
	this.getHomeTab = function () {
		if (this.tab.indexOf('_') == -1) {return this.tab}
		else {return this.tab.substring(0,this.tab.indexOf('_'))}
		}
	this.inThisTab = function (tabName) {
		if (this.tab.indexOf(tabName) == -1) {return false}
		else {return true}
		}
	}

subMenuInfo[subMenuInfo.length] = new populateSubMenu ( 'Main','Home','main.htm' )
subMenuInfo[subMenuInfo.length] = new populateSubMenu ( 'About Us','About','aboutUs.htm' )
subMenuInfo[subMenuInfo.length] = new populateSubMenu ( 'Overview','Features_Home','overview.htm' )
subMenuInfo[subMenuInfo.length] = new populateSubMenu ( 'Feature List','Features','featureList.htm' )
subMenuInfo[subMenuInfo.length] = new populateSubMenu ( 'Report Cards','Features','reportCards.htm' )
subMenuInfo[subMenuInfo.length] = new populateSubMenu ( 'Screen Shots','Home','screenShots.htm' )
//subMenuInfo[subMenuInfo.length] = new populateSubMenu ( 'Videos','Features_Home','technology.htm' )
subMenuInfo[subMenuInfo.length] = new populateSubMenu ( 'Security','Features','security.htm' )
subMenuInfo[subMenuInfo.length] = new populateSubMenu ( 'Testimonials','Home_About','testimonials.htm' )
subMenuInfo[subMenuInfo.length] = new populateSubMenu ( 'Pricing','Home','pricing.htm' )
subMenuInfo[subMenuInfo.length] = new populateSubMenu ( 'Free Trial','Home','freeTrial.htm' )

//subMenuInfo[subMenuInfo.length] = new populateSubMenu ( 'Network Statistics','Support','networkStatistics.htm' )
subMenuInfo[subMenuInfo.length] = new populateSubMenu ( 'FAQ','Support','faq.htm' )
subMenuInfo[subMenuInfo.length] = new populateSubMenu ( 'Request More Information','Support','requestMoreInfo.htm' )
subMenuInfo[subMenuInfo.length] = new populateSubMenu ( 'Sitemap','Support','sitemap.htm' )
subMenuInfo[subMenuInfo.length] = new populateSubMenu ( 'Contact Us','Support_Home_About','contact.htm' )

// This Array set holds the tabMenu items
// Currently all 'name' entries MUST BE UNIQUE in order to function correctly

tabMenuDrawOffset ='300'		// How far to the right to start drawing tabs menu 

tabMenuInfo = new Array()

// Set up properties and methods for this array's object

function populateTabMenu (name, tabWidth, defaultSubMenu){
	this.name = name
	this.tabWidth = tabWidth
	this.defaultSubMenu = defaultSubMenu
	}

tabMenuInfo[tabMenuInfo.length] = new populateTabMenu ( 'Home','50','Main' )
tabMenuInfo[tabMenuInfo.length] = new populateTabMenu ( 'Features','80','Overview' )
tabMenuInfo[tabMenuInfo.length] = new populateTabMenu ( 'Support','70','FAQ')
tabMenuInfo[tabMenuInfo.length] = new populateTabMenu ( 'About','60','About Us' )

for (j=0;j<tabMenuInfo.length;j++)
	{
	for (i=0;i<subMenuInfo.length;i++)
		{
		if (subMenuInfo[i].name == tabMenuInfo[j].defaultSubMenu) {tabMenuInfo[j].pageLink = subMenuInfo[i].pageLink ; break}
		}
	}



// *******************************************************************************************************
// DRAW THE MENUS
// *******************************************************************************************************

// Calculate text sizes for menu system

tabTextSize = getTabTextSize()
subTextSize = getSubTextSize()

// Figure out the correct tab menu and currentContent HTML

getCurrentContentAndTab()

// Draw the 2 menus

drawTabMenu()
drawSubMenu()
}				// Exit SCRIPT here!!!


// *******************************************************************************************************
// DRAW MENU FUNCTIONS
// *******************************************************************************************************


function changeTabMenuByIndex(j)
	{
	currentSubMenu = tabMenuInfo[j].defaultSubMenu
	getCurrentContentAndTab()
	parent.location.href = currentContent;
	}

	
function getCurrentContentAndTab()
	{
	for (i=0;i<subMenuInfo.length;i++)
		{
		if (subMenuInfo[i].name == currentSubMenu) {currentTabMenu = subMenuInfo[i].getHomeTab() ; currentContent = subMenuInfo[i].pageLink ; break;}
		}
	}


function changeSubMenuByIndex(i)
	{
	currentContent = subMenuInfo[i].pageLink
	parent.location.href = currentContent;
	}


function drawSubMenu ()
	{
	var HTMLString = '<font class="subMenuBreak" style="font-size: '+subTextSize+'px;">'
	var i = 0
	for (i=0;i<subMenuInfo.length;i++)
		{
			if (subMenuInfo[i].tab.indexOf(currentTabMenu) != -1)
			{
			HTMLString = HTMLString + '<font class="subMenuBreak" style="position: relative; left: 0px; top: -4px; font-size: '+subTextSize*1.4+'px;">|</font>'
			if (subMenuInfo[i].name == currentSubMenu) {HTMLString = HTMLString + '<a href="#" class="subMenuSet">&nbsp;&nbsp;' + subMenuInfo[i].name + '&nbsp;&nbsp;</a>'}
			else {HTMLString = HTMLString + '<a href="' + subMenuInfo[i].pageLink + ' " class="subMenu">&nbsp;&nbsp;' + subMenuInfo[i].name + '&nbsp;&nbsp;</a>'}
			}
		}
	HTMLString = HTMLString + '<font class="subMenuBreak" style="position: relative; left: 0px; top: -4px; font-size: '+subTextSize*1.4+'px;">|</font>'
	getObject('subMenuHTML').innerHTML = HTMLString
	}

function drawTabMenu ()
	{
	var HTMLString = ''
	HTMLString = HTMLString + '<table width="760px" height="28" border="0" cellpadding="0" cellspacing="0" style="font-size: '+tabTextSize+'px;"> <tr>'
	HTMLString = HTMLString + '<td width="6" background="../imgs/tab0.gif" style="	background-position: left bottom; background-repeat: no-repeat;">&nbsp;</td>'
	HTMLString = HTMLString + '<td width=" ' + tabMenuDrawOffset + ' " background="../imgs/tab3.gif" style=" background-position: left bottom; background-repeat: repeat-x;">&nbsp;</td>'
	
	var i = 0
	for (i=0;i<tabMenuInfo.length;i++)
		{
			if (i == 0){
				if (currentTabMenu == tabMenuInfo[i].name){HTMLString = HTMLString + '<td width="28" background="../imgs/tabs1.gif" >&nbsp;</td>'}
				else {HTMLString = HTMLString + '<td width="28" background="../imgs/tabs2.gif">&nbsp;</td>'}
				}
			else {
				if (currentTabMenu == tabMenuInfo[i-1].name){HTMLString = HTMLString + '<td width="37" background="../imgs/tabm1.gif" >&nbsp;</td>'}
				if (currentTabMenu == tabMenuInfo[i].name){HTMLString = HTMLString + '<td width="37" background="../imgs/tabm2.gif" >&nbsp;</td>'}
				if (currentTabMenu != tabMenuInfo[i].name && currentTabMenu != tabMenuInfo[i-1].name){HTMLString = HTMLString + '<td width="37" background="../imgs/tabm3.gif" >&nbsp;</td>'}
				}
			if (currentTabMenu == tabMenuInfo[i].name){HTMLString = HTMLString + '<td width=" '+ tabMenuInfo[i].tabWidth +' " class="tabMenuSet"><a href="#" class="tabMenuTextSet">' + tabMenuInfo[i].name + '</a></td>'}
			else {HTMLString = HTMLString + '<td width=" '+ tabMenuInfo[i].tabWidth +' "  class="tabMenu"><a href="' + tabMenuInfo[i].pageLink + ' " class="tabMenuText">' + tabMenuInfo[i].name + '</a></td>'}
		}

	if (currentTabMenu == tabMenuInfo[tabMenuInfo.length-1].name){HTMLString = HTMLString + '<td width="20" background="../imgs/tabe1.gif" >&nbsp;</td>'}
	else {HTMLString = HTMLString + '<td width="20" background="../imgs/tabe2.gif" >&nbsp;</td>'}

	HTMLString = HTMLString + '<td " background="../imgs/tab3.gif" style=" background-position: left bottom; background-repeat: repeat-x;">&nbsp;</td>'
	HTMLString = HTMLString + '<td width="6" background="../imgs/tab4.gif" style="	background-position: left bottom; background-repeat: no-repeat;">&nbsp;</td>'
	HTMLString = HTMLString + '</tr></table>'
	
	getObject('tabMenuHTML').innerHTML = HTMLString
	}

function getTabTextSize ()
{
	v = (findPosX (getObject('textSizeHTML'))-findPosX (getObject('textStartHTML')))
//	alert (Math.round((3520/(v))-.5)+' '+(v))
	return (Math.round((3520/(v))-.5))
}

function getSubTextSize ()
{
	v = (findPosX (getObject('textSizeHTML'))-findPosX (getObject('textStartHTML')))
//	alert (Math.round((3200/(v))-.5)+' '+(v))
	return (Math.round((3200/(v))-.5))
}


