  function Is() {
  var agent = navigator.userAgent.toLowerCase();
  this.major = parseInt(navigator.appVersion);
  this.minor = parseFloat(navigator.appVersion);
  this.ns = ((agent.indexOf('mozilla') != -1) &&
  (agent.indexOf('spoofer') == -1) &&
  (agent.indexOf('compatible') == -1) &&
  (agent.indexOf('opera') == -1) &&
  (agent.indexOf('webtv') == -1));
  this.ns2 = (this.ns && (this.major == 2));
  this.ns3 = (this.ns && (this.major == 3));
  this.ns4 = (this.ns && (this.major == 4));
  this.ns6 = (this.ns && (this.major >= 5));
  this.ie = (agent.indexOf("msie") != -1);
  this.ie3 = (this.ie && (this.major < 4));
  this.ie4 = (this.ie && (this.major >= 4) &&
  (agent.indexOf("msie 5.0") == -1));
  this.ie5 = (this.ie && (this.major == 4) &&
  (agent.indexOf("msie 5.0") != -1));
  this.ieX = (this.ie && !this.ie3 && !this.ie4);
 }

 function _alt_os(){ 
  var agt=navigator.userAgent.toLowerCase(); 
   if((agt.indexOf("winnt")!=-1) || (agt.indexOf("windows nt")!=-1) || (agt.indexOf("win98")!=-1) || (agt.indexOf("windows 98")!=-1))
    return true;
   else
    return false;
 }

 var is = new Is();
 var agt=navigator.userAgent.toLowerCase();
 var mac = (agt.indexOf("mac")!=-1);

var type = (is.ie4) + 2*(is.ie5) +3*(is.ns4) + 4*(is.ns6);
var t1 =  Math.round(Math.floor(((type%2)%2)*type));
var t2 =  Math.round(Math.floor(type/3));
var t3 =  Math.round(Math.floor((t1+t2)/4));

if(is.ie || is.ns6)
 document.write("<link rel='stylesheet' type='text/css' href='../css/iestyle.css'>");
else if(is.ns)
 document.write("<link rel='stylesheet' type='text/css' href='../css/nnstyle.css'>");
  
var menu0 = new Array("Technology Overview","RFID Tags","Active Tags","Active Tag Application","Passive Tags","Passive Tag Application");
var menu0lnk = new Array("tech_overview.html","rfid_tags.html","active_tag.html","activetag_application.html","passive_tag.html","passivetag_application.html");
var menu1 = new Array("ARIES","ASSeTRA","INVeNTRA","PROeTRACK","RFID Pilot Program","TESSeRACT (Releasing Soon)","USB node (Releasing Soon)");

var menu1lnk = new Array("aries.html","assetra.html","inventra.html","proetrack.html","rfid_pilot.html","#","#");

var tabmenu = new Array(menu0,menu1);
var tabmenulnk = new Array(menu0lnk,menu1lnk);


var _rcontent = new Array();
var flecheon = new Image();
var flecheoff= new Image();
flecheon.src = "../images/faq_arrow_off.gif";
flecheoff.src = "../images/faq_arrow_on.gif";

for(j=0;j<tabmenu.length;j++){
	_rcontent[j] = "<table cellpadding=0 cellspacing=0 border=0 width=200><tr height=5><td></td></tr></table>"
	_rcontent[j] += "<table cellpadding=0 cellspacing=0 border=0 width=200 bgcolor=#8394A5><tr height=5><td>"
	_rcontent[j] += "<table cellpadding=2 cellspacing=1 border=0 width=200 id=tbl>"
	for(i=0;i<tabmenu[j].length;i++){
	_rcontent[j] += "<tr bgcolor=#D3E0ED height=15 id=tb><td><img src='../images/p.gif' name='fle"+j+i+"' id=t> <a href='"+tabmenulnk[j][i]+"' class=Menu onmouseover=\"";
	if (is.ns4) _rcontent[j] += "document.layers['r_"+j+"'].";
	_rcontent[j] += "document.images.fle"+j+i+".src='../images/menu_arrow.gif'\" onmouseout=\"";
	if (is.ns4) _rcontent[j] += "document.layers['r_"+j+"'].";
	_rcontent[j] += "document.images.fle"+j+i+".src='../images/p.gif'\">"+tabmenu[j][i]+"</a></td></tr>";
	}
	_rcontent[j] += "</table></td></tr></table>";
	//alert(_rcontent[j]);
}

 var origWidth = 0, origHeight = 0;
 var old_hr = -1;
 var tid = null;

 function effacer(nom) {
if(is.ie)
    document.all[nom].style.visibility="hidden";
  else if(is.ns6)
    document.getElementById(nom).style.visibility="hidden";
  else if(is.ns4)
    document.layers[nom].visibility="hide";
 }

 function show_cont(i){
 for(j=0;j<tabmenu.length;j++){
  if(('r_'+i)!=('r_'+j));
  effacer('r_'+j+'');
 } 
  clearTimeout(tid);
  if (old_hr!=i){
   if(old_hr>-1){
    eval("_sh_"+t3+"(_obj_"+t1+"('r_"+old_hr+"'), 0)");
   }
   eval("_sh_"+t3+"(_obj_"+t1+"('r_"+i+"'), 1)");
  }
  old_hr = i;
  }

 function hide_cont(i){
  if(old_hr>-1){
   eval("tid = setTimeout(\"_sh_"+t3+"(_obj_"+t1+"('r_"+old_hr+"'), 0)\", 1)");
//   eval("_sh_"+t3+"(_obj_"+t1+"('r_"+old_hr+"'), 0)");
  }
  old_hr = -1;
  }

 function _locate_0(_objn){
  var _lobj = document.getElementById(_objn);
  var _lx = _lobj.offsetLeft, _ly = _lobj.offsetTop;
  while(_lobj.offsetParent){
   _lx += _lobj.offsetParent.offsetLeft;
   _ly += _lobj.offsetParent.offsetTop;
   _lobj = _lobj.offsetParent;
  }
  return new Array(_lx+2, _ly+6);
 }

 function _locate_1(_objn){
  var _lobj = document.all[_objn];
  var _lx = _lobj.offsetLeft, _ly = _lobj.offsetTop;
  while(_lobj.offsetParent){
   _lx += _lobj.offsetParent.offsetLeft;
   _ly += _lobj.offsetParent.offsetTop;
   _lobj = _lobj.offsetParent
  }
  return new Array(_lx+2, _ly+6);
 }

 function _locate_3(_objn){
  _p = document.layers[_objn];
  return new Array(_p.pageX+2, _p.pageY+6);
 }

 function _build_0(xy, le){
  res = "";
  for(i=0;i<_rcontent.length;i++){
   l = xy[i][0];
   u = l+157-le;
   if(u>0)
    l -= u;
   res += "<div align=left id=r_"+i+" style='position:absolute;top:"+xy[i][1]+"px;left:"+l+"px;z-index:1;visibility:hidden;width:155px;' onmouseover='show_cont("+i+")' onmouseout='hide_cont("+i+")'>"+_rcontent[i]+"</div>";
  }
  return res;
 }

 function _build_1(xy, le){
  res = "";
  for(i=0;i<_rcontent.length;i++){
   l = xy[i][0];
   u = l+157-le;
   if(u>0)
    l -= u;
   res += "<layer name=r_"+i+" top="+xy[i][1]+" left="+l+" zindex=1 visibility='hide' onmouseover='show_cont("+i+")' onmouseout='hide_cont("+i+")'>"+_rcontent[i]+"</layer>";
  }
  return res;
 }

 function _do_resize_0(){
  onresize = function() { window.location.reload(); }
 }

 function _do_resize_1(){
   onresize = function() { if(innerWidth != origWidth || innerHeight != origHeight) location.reload(); }
 }

 function _obj_0(id){
  return document.getElementById(id).style;
 }

 function _obj_1(id){
 return document.all[id].style;
 }

 function _obj_3(id){
  return document.layers[id];
 }

 function _sh_0(obj, v){
  obj.visibility = (v==1)?'visible':'hidden';
 }

 function _sh_1(obj, v){
  obj.visibility = (v==1)?'show':'hide';
 }

 function init(){
  var coord = new Array();
  for(i=0;i<_rcontent.length;i++){
   coord[i]=eval("_locate_"+t1+"('z"+i+"')");
  }
  ledg = eval("_locate_"+t1+"('ledge')");
  document.write(eval("_build_"+t3+"(coord, ledg[0]+770)"));
  eval("_do_resize_"+t3+"()");
  for(i=0;i<_rcontent.length;i++){
  if(is.ns6) document.getElementById("r_"+i).style.MozOpacity = 80 + '%';
  if(is.ie){
   if(!((is.ie5)&&(_alt_os())))
    document.all("r_"+i).style.filter="alpha(opacity=80)";
  }
  }
 }
