var menu1 = new Array();
menu1[0] = '<a href="overview.php">Overview</a>';
menu1[1] = '<a href="ecommerce.php">E-commerce</a>';
menu1[2] = '<a href="saas.php">SaaS</a>';
menu1[3] = '<a href="technologies.php">Technology</a>';
menu1[4] = '<a href="customer_cs.php">Customers</a>';

var menu2 = new Array();
menu2[0] = '<a href="services.php">Services</a>';
menu2[1] = '<a href="ordercapture.php">Order Capture</a>';
menu2[2] = '<a href="product.php">Product &amp; Catalog Management</a>';
menu2[3] = '<a href="pricing.php">Pricing Management</a>';
menu2[4] = '<a href="webselfservice.php">Web Self-Service</a>';
menu2[5] = '<a href="upgrades.php">Optimization &amp; Upgrades</a>';

var menu3 = new Array();
menu3[0] = '<a href="expertise.php">Expertise</a>';
menu3[1] = '<a href="communications.php">Telecom</a>';
menu3[2] = '<a href="manufacturing.php">High Tech/Manufacturing</a>';
menu3[3] = '<a href="financial.php">Financial Services</a>';

var menu5 = new Array();
menu5[0] = '<a href="team.php">Management</a>';
menu5[1] = '<a href="partners.php">Partners</a>';
menu5[2] = '<a href="library.php">Library</a>';
menu5[3] = '<a href="careers.php">Careers</a>';
menu5[4] = '<a href="news.php">News</a>';

function activate(menu, item)
{
	var array = eval("menu" + menu);
	
	if (array != null && array.length > item)
	{
		array[item] = array[item].replace("\">", "\" class=\"active\">");
	}
}

var menuwidth = "150px";
var menubgcolor = "#fff";
var disappeardelay = 250;
var hidemenu_onclick = "yes";
var currentMenu = null;

var ie4 = document.all;
var ns6 = document.getElementById && !document.all;

if (ie4 || ns6)
{
	document.write("<div id=\"dropmenudiv\" style=\"visibility: hidden; display: inline; width: " + menuwidth + "; background-color: " + menubgcolor + ";\" onmouseover=\"clearhidemenu();\" onmouseout=\"dynamichide(event);\"></div>");
}

function getposOffset(what, offsettype)
{
	var totaloffset = (offsettype == "left") ? what.offsetLeft : what.offsetTop;
	var parentEl = what.offsetParent;
	
	while (parentEl != null)
	{
		totaloffset = (offsettype == "left") ? totaloffset + parentEl.offsetLeft : totaloffset + parentEl.offsetTop;
		parentEl = parentEl.offsetParent;
	}
	
	return totaloffset;
}

function showhide(obj, e, visible, hidden, menuwidth)
{
	if (ie4 || ns6)
	{
		dropmenuobj.style.left = dropmenuobj.style.top = "-500px";
	}
	
	if (menuwidth != "")
	{
		dropmenuobj.widthobj = dropmenuobj.style;
		dropmenuobj.widthobj.width = menuwidth;
	}
	
	if (e.type == "click" && obj.visibility == hidden || e.type == "mouseover")
	{
		obj.visibility = visible;
	}
	else if (e.type == "click")
	{
		obj.visibility = hidden;
	}
}

function iecompattest()
{
	return (document.compatMode && document.compatMode != "BackCompat") ? document.documentElement : document.body;
}

function clearbrowseredge(obj, whichedge)
{
	var edgeoffset = 0;
	
	if (whichedge == "rightedge")
	{
		var windowedge = ie4 && !window.opera ? iecompattest().scrollLeft + iecompattest().clientWidth - 15 : window.pageXOffset + window.innerWidth - 15;
		
		dropmenuobj.contentmeasure = dropmenuobj.offsetWidth;
		
		if (windowedge - dropmenuobj.x < dropmenuobj.contentmeasure)
		{
			edgeoffset = dropmenuobj.contentmeasure - obj.offsetWidth;
		}
	}
	else
	{
		var topedge = ie4 && !window.opera ? iecompattest().scrollTop : window.pageYOffset;
		var windowedge = ie4 && !window.opera ? iecompattest().scrollTop + iecompattest().clientHeight - 15 : window.pageYOffset + window.innerHeight - 18;
		
		dropmenuobj.contentmeasure = dropmenuobj.offsetHeight;
		
		if (windowedge - dropmenuobj.y < dropmenuobj.contentmeasure)
		{
			edgeoffset = dropmenuobj.contentmeasure + obj.offsetHeight;
			
			if ((dropmenuobj.y - topedge) < dropmenuobj.contentmeasure)
			{
				edgeoffset = dropmenuobj.y + obj.offsetHeight - topedge;
			}
		}
	}
	
	return edgeoffset;
}

function populatemenu(what)
{
	if (ie4 || ns6)
	{
		dropmenuobj.innerHTML = what.join("");
	}
}

function dropdownmenu(obj, e, menucontents, menuwidth, offset)
{
	if (window.event)
	{
		event.cancelBubble = true;
	}
	else if (e.stopPropagation)
	{
		e.stopPropagation();
	}
	
	clearhidemenu();
	
	dropmenuobj = document.getElementById ? document.getElementById("dropmenudiv") : dropmenudiv;
	
	populatemenu(menucontents);
	
	if (ie4 || ns6)
	{
		resetCurrentMenu();
		
		currentMenu = obj;
		currentMenu.className += " hover";
		
		showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth);
		
		var crossbrowseroffset = 0;
		var firefox = navigator.userAgent.indexOf("Firefox");
		var camino = navigator.userAgent.indexOf("Camino");
		
		if ((ie4 && !ns6 && !window.opera) || firefox != -1 || camino != -1)
		{
			crossbrowseroffset = 0;
		}
		
		dropmenuobj.x = getposOffset(obj, "left") + crossbrowseroffset + offset - 1;
		dropmenuobj.y = getposOffset(obj, "top") + crossbrowseroffset;
		dropmenuobj.style.left = dropmenuobj.x - clearbrowseredge(obj, "rightedge") + "px";
		dropmenuobj.style.top = dropmenuobj.y - clearbrowseredge(obj, "bottomedge") + obj.offsetHeight + "px";
	}
	
	return clickreturnvalue()
}

function clickreturnvalue()
{
	if (ie4 || ns6)
	{
		return false;
	}
	else
	{
		return true;
	}
}

function contains_ns6(a, b)
{
	while (b.parentNode)
	{
		if ((b = b.parentNode) == a)
		{
			return true;
		}
	}
	
	return false;
}

function dynamichide(e)
{
	if (ie4 && !dropmenuobj.contains(e.toElement))
	{
		delayhidemenu();
	}
	else if (ns6 && e.currentTarget != e.relatedTarget && !contains_ns6(e.currentTarget, e.relatedTarget))
	{
		delayhidemenu();
	}
}

function hidemenu(e)
{
	if (typeof dropmenuobj != "undefined")
	{
		if (ie4 || ns6)
		{
			resetCurrentMenu();
			
			dropmenuobj.style.visibility = "hidden";
		}
	}
}

function delayhidemenu()
{
	if (ie4 || ns6)
	{
		delayhide = setTimeout("hidemenu()", disappeardelay);
	}
}

function clearhidemenu()
{
	if (typeof delayhide != "undefined")
	{
		clearTimeout(delayhide);
	}
}

if (hidemenu_onclick == "yes")
{
	document.onclick = hidemenu;
}

function resetCurrentMenu()
{
	if (currentMenu != null)
	{
		currentMenu.className = currentMenu.className.replace(" hover", "");
	}
}

/***********************************************
* Pop-it menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
/*function getAbsLeft(el){
var l=el.offsetLeft;
  while((el=el.parentNode) && el!=document)
    l+=el.offsetLeft;
  return l;
}

function getAbsTop(el){
var t=el.offsetTop;
  while((el=el.parentNode) && el!=document)
    t+=el.offsetTop;
  return t;
}


var defaultMenuWidth="150px" //set default menu width.

var linkset=new Array()
//SPECIFY MENU SETS AND THEIR LINKS. FOLLOW SYNTAX LAID OUT

linkset[0]='<a href="services.php">Services</a>'
linkset[0]+='<a href="ordercapture.php">Order Capture</a>'
linkset[0]+='<a href="product.php">Product & Catalog Management</a>'
linkset[0]+='<a href="pricing.php">Pricing Management</a>'
linkset[0]+='<a href="webselfservice.php">Web Self-Service</a>'
linkset[0]+='<a href="upgrades.php">Optimization & Upgrades</a>'


linkset[2]='<a href="expertise.php">Expertise</a>'
linkset[2]+='<a href="communications.php">Telecom</a>'
linkset[2]+='<a href="manufacturing.php">High Tech/Manufacturing</a>'
linkset[2]+='<a href="financial.php">Financial Services</a>'

linkset[1]='<a href="overview.php">Overview</a>'
linkset[1]+='<a href="ecommerce.php">E-commerce</a>'
linkset[1]+='<a href="saas.php">SaaS</a>'
linkset[1]+='<a href="technologies.php">Technology</a>'
linkset[1]+='<a href="customer_cs.php">Customers</a>'

linkset[3] = '<a href="team.php">Management</a>'
linkset[3] += '<a href="partners.php">Partners</a>'
linkset[3] += '<a href="library.php">Library</a>'
linkset[3] += '<a href="careers.php">Careers</a>'
linkset[3] += '<a href="news.php">News</a>'

////No need to edit beyond here

var ie5=document.all && !window.opera
var ns6=document.getElementById

if (ie5||ns6)
document.write('<div id="popitmenu" onMouseover="clearhidemenu();" onMouseout="dynamichide(event)"></div>')

function iecompattest(){
return (document.compatMode && document.compatMode.indexOf("CSS")!=-1)? document.documentElement : document.body
}

function showmenu(e, which, optWidth, elementId){
if (!document.all&&!document.getElementById)
return
clearhidemenu()
menuobj=ie5? document.all.popitmenu : document.getElementById("popitmenu")
menuobj.innerHTML=which
//SWG Commented out and set default
menuobj.style.width=(typeof optWidth!="undefined")? optWidth : defaultMenuWidth
//menuobj.style.width="125px";
menuobj.contentwidth=menuobj.offsetWidth
menuobj.contentheight=menuobj.offsetHeight
eventX=ie5? event.clientX : e.clientX
eventY=ie5? event.clientY : e.clientY
//Find out how close the mouse is to the corner of the window
var rightedge=ie5? iecompattest().clientWidth-eventX : window.innerWidth-eventX
var bottomedge=ie5? iecompattest().clientHeight-eventY : window.innerHeight-eventY
//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<menuobj.contentwidth)
//move the horizontal position of the menu to the left by it's width
menuobj.style.left=ie5? iecompattest().scrollLeft+eventX-menuobj.contentwidth+"px" : window.pageXOffset+eventX-menuobj.contentwidth+"px"
else
//position the horizontal position of the menu where the mouse was clicked
//SWG Commented OUt and Replaced
//menuobj.style.left=ie5? iecompattest().scrollLeft+eventX+"px" : window.pageXOffset+eventX+"px"
menuobj.style.left=getAbsLeft(document.getElementById(elementId))+"px";
//same concept with the vertical position
if (bottomedge<menuobj.contentheight)
menuobj.style.top=ie5? iecompattest().scrollTop+eventY-menuobj.contentheight+"px" : window.pageYOffset+eventY-menuobj.contentheight+"px"
else
//SWG Commented Out and Replaced
//menuobj.style.top=ie5? iecompattest().scrollTop+event.clientY+"px" : window.pageYOffset+eventY+"px"
menuobj.style.top=ie5? getAbsTop(document.getElementById(elementId))+46+"px" : getAbsTop(document.getElementById(elementId))+10+"px";
//alert('Left: ' + getAbsLeft(document.getElementById('technology')));
//alert('Top: ' + getAbsTop(document.getElementById('technology')));
menuobj.style.visibility="visible"
return false
}

function contains_ns6(a, b) {
//Determines if 1 element in contained in another- by Brainjar.com
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function hidemenu(){
if (window.menuobj)
menuobj.style.visibility="hidden"
}

function dynamichide(e){
if (ie5&&!menuobj.contains(e.toElement))
hidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
hidemenu()
}

function delayhidemenu(){
delayhide=setTimeout("hidemenu()",500)
}

function clearhidemenu(){
if (window.delayhide)
clearTimeout(delayhide)
}

if (ie5||ns6)
document.onclick=hidemenu*/
