// JavaScript Document

var about = new Array();
about[0]=['Overview','brief1.html'];
about[1]=['At The Helm','brief2.html'];
about[2]=['Mission','brief3.html'];

var products = new Array();
products[0]=['Overview','products1.html'];
products[1]=['Barcode Printers','products2.html'];
products[2]=['Barcode Scanners','products3.html'];
products[3]=['Integrated POS','products4.html'];
products[4]=['Allied Products','products5.html'];

/* products[2]=['Touch Terminal','products3.html'];
products[3]=['LCD Terminal','products4.html'];
products[4]=['Cash Drawer','products5.html'];
products[5]=['Customer Pole Display','products6.html'];
products[6]=['Monitor','products7.html'];
products[7]=['POS Printer','products8.html'];
products[8]=['Programmable Keyboard','products9.html'];
products[9]=['Kiosk Systems','products10.html'];
products[10]=['Phaseout Items','products11.html'];
products[11]=['Applications','products12.html'];
*/


var solutions = new Array();
solutions[0]=['Overview','solutions1.html'];
solutions[1]=['Industrial Solutions','#'];
solutions[2]=['Shop Floor Sequencing','solutions3.html'];
solutions[3]=['Work in Progress Automation','solutions4.html'];
solutions[4]=['Logistics and Warehousing','solutions5.html'];
solutions[5]=['Asset Tracking','solutions6.html'];
solutions[6]=['RFID Solutions','solutions7.html'];
solutions[7]=['Retail Solutions','#'];
solutions[8]=['Trolley POS','solutions8.html'];
solutions[9]=['Hand Held Queue Busting','solutions9.html'];
solutions[10]=['KIOSK','solutions10.html'];


document.write('<div id="div0" class="menu">');
for(i=0; i<about.length; i++)
{document.write('<a href="'+about[i][1]+'">'+about[i][0]+'</a>')}
document.write('</div>');
checkit(document.getElementById('div0'))

document.write('<div id="div1" class="menu">');
for(i=0; i<products.length; i++)
{document.write('<a href="'+products[i][1]+'">'+products[i][0]+'</a>')}
document.write('</div>');
checkit(document.getElementById('div1'))

document.write('<div id="div2" class="menu">');
for(i=0; i<solutions.length; i++)
{document.write('<a href="'+solutions[i][1]+'">'+solutions[i][0]+'</a>')}
document.write('</div>');
checkit(document.getElementById('div2'))

// optional function

function checkit(divobj)
{  if(divobj.hasChildNodes())
	{	for(i=0; i<divobj.childNodes.length; i++)
		{ 	if(divobj.childNodes[i].href.indexOf("#")==-1)
			{ }
			else{divobj.childNodes[i].className="current";}
		}
	}
}

var ie4=document.all;
var dom=document.getElementById &&! ie4;
var ns4 = document.layers;
var opera = navigator.userAgent.indexOf('opera') != -1

var menuobj = null;

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

function gety(what)
{ var objtop = what.offsetTop;
  var objp = what.offsetParent;
  
  while(objp)
  { objtop = objtop+objp.offsetTop;
    objp = objp.offsetParent;
  }
  return objtop;

}

function gettoppos(what, offsettype)
{ var topy = gety(what);
  var winheight = (!opera)? iecompat().scrollTop+iecompat().clientHeight : window.pageYOffset+window.innerHeight;
  var maxheight = topy+menuobj.offsetHeight;
  
  if(winheight < maxheight)
  { var objy = topy-(menuobj.offsetHeight);
 }
  else{objy = topy+what.offsetHeight;}
  return objy;
}

function getx(what)
{ var objleft = what.offsetLeft;
  var objp = what.offsetParent;
  while(objp)
  { objleft = objleft+objp.offsetLeft;
    objp = objp.offsetParent;
  }
	return objleft;	
}

function getleftpos(what, offsettype)
{ var leftx = getx(what);
  var winwidth = (!opera)? iecompat().scrollLeft+iecompat().clientWidth : window.pageXOffset+window.innerWidth;
  var maxwidth = leftx+menuobj.offsetWidth;
  
  if(winwidth < maxwidth)
  { var objx = winwidth - menuobj.offsetWidth}
  else
  {objx = leftx;}
  return objx;
  }


function dropmenu(obj,e)
{  if(window.event) window.event.cancelBubble=true;
   else if(e.stopPropagation) e.stopPropagation();
   
   if(menuobj != null)
   {hidemenu();}
   
   menuobj = document.getElementById(obj.rel)
   cleardelay()
   
   if(ie4 || dom)
   {menuobj.style.visibility="visible";
    menuobj.style.top = gettoppos(obj,"top")+"px"; 
	menuobj.style.left = getleftpos(obj,"left")+"px"; 
	}
	
	if(ns4)
   {menuobj.visibility="visible";
    menuobj.clip.top = gettoppos(obj,"top")+"px"; 
	menuobj.clip.left = getleftpos(obj,"left")+"px"; 
	}
	
	if(opera)
   {menuobj.style.visibility="visible";
    menuobj.pixelTop = gettoppos(obj,"top")+"px"; 
	menuobj.pixelLeft = getleftpos(obj,"left")+"px"; 
	}
   
   menuobj.onmouseover=function()
   {cleardelay();
    prev = obj.className;
   	obj.className = "current"; 
	}
	
   menuobj.onmouseout=function()
   {delayhide();
   obj.className = prev ;}


}

function delayhide()
{stopit = setTimeout('hidemenu()',200);}

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

function cleardelay()
{ if(typeof stopit != "undefined")
	clearTimeout(stopit);
}
