//-- Urchin Tracking Module 6.1 (UTM 6.1)
//-- Copyright 2004 Urchin Software Corporation, All Rights Reserved.

//-- Urchin On Demand Settings ONLY
var _uacct="";			// set up the Urchin Account
var _userv=0;			// service mode (0=local,1=remote,2=both)

//-- UTM User Settings
var _ufsc=1;			// set client info flag (1=on|0=off)
var _udn="auroragov.org";	// (auto|none|domain) set the domain name for cookies
var _uhash="on";		// (on|off) unique domain hash for cookies
var _utimeout="1800";   	// set the inactive session timeout in seconds
var _ugifpath="/__utm.gif";	// set the web path to the __utm.gif file
var _utsp="|";			// transaction field separator
var _uflash=1;			// set flash version detect option (1=on|0=off)
var _utitle=1;			// set the document title detect option (1=on|0=off)

//-- UTM Campaign Tracking Settings
var _uctm=1;			// set campaign tracking module (1=on|0=off)
var _ucto="15768000";		// set timeout in seconds (6 month default)
var _uccn="utm_campaign";	// name
var _ucmd="utm_medium";		// medium (cpc|cpm|link|email|organic)
var _ucsr="utm_source";		// source
var _uctr="utm_term";		// term/keyword
var _ucct="utm_content";	// content
var _ucid="utm_id";		// id number
var _ucno="utm_nooverride";	// don't override

//-- Auto/Organic Sources and Keywords
var _uOsr=new Array();
var _uOkw=new Array();
_uOsr[0]="google";	_uOkw[0]="q";
_uOsr[1]="yahoo";	_uOkw[1]="p";
_uOsr[2]="msn";		_uOkw[2]="q";
_uOsr[3]="aol";		_uOkw[3]="query";
_uOsr[4]="lycos";	_uOkw[4]="query";
_uOsr[5]="ask";		_uOkw[5]="q";
_uOsr[6]="altavista";	_uOkw[6]="q";
_uOsr[7]="search";	_uOkw[7]="q";
_uOsr[8]="netscape";	_uOkw[8]="query";
_uOsr[9]="earthlink";	_uOkw[9]="q";
_uOsr[10]="cnn";	_uOkw[10]="query";
_uOsr[11]="looksmart";	_uOkw[11]="key";
_uOsr[12]="about";	_uOkw[12]="terms";
_uOsr[13]="excite";	_uOkw[13]="qkw";
_uOsr[14]="mamma";	_uOkw[14]="query";
_uOsr[15]="alltheweb";	_uOkw[15]="q";
_uOsr[16]="gigablast";	_uOkw[16]="q";
_uOsr[17]="voila";	_uOkw[17]="kw";
_uOsr[18]="virgilio";	_uOkw[18]="qs";
_uOsr[19]="teoma";	_uOkw[19]="q";

//-- Auto/Organic Keywords to Ignore
var _uOno=new Array();
//_uOno[0]="urchin";
//_uOno[1]="urchin.com";
//_uOno[2]="www.urchin.com";

//-- Referral domains to Ignore
var _uRno=new Array();
//_uRno[0]=".urchin.com";

//-- **** Don't modify below this point ***
var _uff,_udh,_udt,_udo="",_uu,_ufns=0,_uns=0,_ur="-",_ufno=0,_ust=0,_ujv="-",_ubd=document,_udl=_ubd.location,_uwv="6.1";
var _ugifpath2="http://service.urchin.com/__utm.gif";
if (_udl.protocol=="https:") _ugifpath2="https://service.urchin.com/__utm.gif";
function urchinTracker(page) {
 if (_udl.protocol=="file:") return;
 if (_uff && (!page || page=="")) return;
 var a,b,c,v,x="",s="",f=0;
 var nx=" expires=Sun, 18 Jan 2038 00:00:00 GMT;";
 var dc=_ubd.cookie;
 _udh=_uDomain();
 _uu=Math.round(Math.random()*2147483647);
 _udt=new Date();
 _ust=Math.round(_udt.getTime()/1000);
 a=dc.indexOf("__utma="+_udh);
 b=dc.indexOf("__utmb="+_udh);
 c=dc.indexOf("__utmc="+_udh);
 if (_udn && _udn!="") { _udo=" domain="+_udn+";"; }
 if (_utimeout && _utimeout!="") {
  x=new Date(_udt.getTime()+(_utimeout*1000));
  x=" expires="+x.toGMTString()+";";
 }
 s=_udl.search;
 if(s && s!="" && s.indexOf("__utma=")>=0) {
  a=_uGC(s,"__utma=","&");
  b=_uGC(s,"__utmb=","&");
  c=_uGC(s,"__utmc=","&");
  if (a!="-" && b!="-" && c!="-") f=1;
  else if(a!="-") f=2;
 }
 if(f==1) {
  _ubd.cookie="__utma="+a+"; path=/;"+nx;
  _ubd.cookie="__utmb="+b+"; path=/;"+x;
  _ubd.cookie="__utmc="+c+"; path=/;";
 } else if (f==2) {
  a=_uFixA(s,"&",_ust);
  _ubd.cookie="__utma="+a+"; path=/;"+nx;
  _ubd.cookie="__utmb="+_udh+"; path=/;"+x;
  _ubd.cookie="__utmc="+_udh+"; path=/;";
  _ufns=1;
 } else if (a>=0 && b>=0 && c>=0) {
  _ubd.cookie="__utmb="+_udh+"; path=/;"+x+_udo;
 } else {
  if (a>=0) a=_uFixA(_ubd.cookie,";",_ust);
  else a=_udh+"."+_uu+"."+_ust+"."+_ust+"."+_ust+".1";
  _ubd.cookie="__utma="+a+"; path=/;"+nx+_udo;
  _ubd.cookie="__utmb="+_udh+"; path=/;"+x+_udo;
  _ubd.cookie="__utmc="+_udh+"; path=/;"+_udo;
  _ufns=1;
 }
 if (s && s!="" && s.indexOf("__utmv=")>=0) {
  if ((v=_uGC(s,"__utmv=","&"))!="-") {
   _ubd.cookie="__utmv="+unescape(v)+"; path=/;"+nx+_udo;
  }
 }
 _uInfo(page);
 _ufns=0;
 _ufno=0;
 _uff=1;
}
urchinTracker();
function _uInfo(page) {
 var p,s="",pg=_udl.pathname+_udl.search;
 if (page && page!="") pg=escape(page);
 _ur=_ubd.referrer;
 if (!_ur || _ur=="") { _ur="-"; }
 else {
  p=_ur.indexOf(_ubd.domain);
  if ((p>=0) && (p<=8)) { _ur="0"; }
  if (_ur.indexOf("[")==0 && _ur.lastIndexOf("]")==(_ur.length-1)) { _ur="-"; }
 }
 s+="&utmn="+_uu;
 if (_ufsc) s+=_uBInfo(page);
 if (_uctm && (!page || page=="")) s+=_uCInfo();
 if (_utitle && _ubd.title && _ubd.title!="") s+="&utmdt="+escape(_ubd.title);
 if (_udl.hostname && _udl.hostname!="") s+="&utmhn="+escape(_udl.hostname);
 if (!page || page=="") s+="&utmr="+_ur;
 s+="&utmp="+pg;
 if (_userv==0 || _userv==2) {
  var i=new Image(1,1);
  i.src=_ugifpath+"?"+"utmwv="+_uwv+s;
  i.onload=function() {_uVoid();}
 }
 if (_userv==1 || _userv==2) {
  var i2=new Image(1,1);
  i2.src=_ugifpath2+"?"+"utmwv="+_uwv+s+"&utmac="+_uacct+"&utmcc="+_uGCS();
  i2.onload=function() { _uVoid(); }
 }
 return;
}
function _uVoid() { return; }
function _uCInfo() {
 if (!_ucto || _ucto=="") { _ucto="15768000"; }
 var c="",t="-",t2="-",o=0,cs=0,cn=0;i=0;
 var s=_udl.search;
 var z=_uGC(s,"__utmz=","&");
 var x=new Date(_udt.getTime()+(_ucto*1000));
 var dc=_ubd.cookie;
 x=" expires="+x.toGMTString()+";";
 if (z!="-") { _ubd.cookie="__utmz="+unescape(z)+"; path=/;"+x+_udo; return ""; }
 z=dc.indexOf("__utmz="+_udh);
 if (z>-1) { z=_uGC(dc,"__utmz="+_udh,";"); }
 else { z="-"; }
 t=_uGC(s,_ucid+"=","&");
 t2=_uGC(s,_ucsr+"=","&");
 if ((t!="-" && t!="") || (t2!="-" && t2!="")) {
  if (t!="-" && t!="") { c+="utmcid="+_uEC(t); if (t2!="-" && t2!="") c+="|utmcsr="+_uEC(t2);
  } else { if (t2!="-" && t2!="") c+="utmcsr="+_uEC(t2); }
  t=_uGC(s,_uccn+"=","&");
  if (t!="-" && t!="") c+="|utmccn="+_uEC(t);
  else c+="|utmccn=(not+set)";
  t=_uGC(s,_ucmd+"=","&");
  if (t!="-" && t!="") c+="|utmcmd="+_uEC(t);
  else  c+="|utmcmd=(not+set)";
  t=_uGC(s,_uctr+"=","&");
  if (t!="-" && t!="") c+="|utmctr="+_uEC(t);
  else { t=_uOrg(1); if (t!="-" && t!="") c+="|utmctr="+_uEC(t); }
  t=_uGC(s,_ucct+"=","&");
  if (t!="-" && t!="") c+="|utmcct="+_uEC(t);
  t=_uGC(s,_ucno+"=","&");
  if (t=="1") o=1;
  if (z!="-" && o==1) return "";
 }
 if (c=="-" || c=="") { c=_uOrg(); if (z!="-" && _ufno==1)  return ""; }
 if (c=="-" || c=="") { if (_ufns==1)  c=_uRef(); if (z!="-" && _ufno==1)  return ""; }
 if (c=="-" || c=="") {
  if (z=="-" && _ufns==1) { c="utmccn=(direct)|utmcsr=(direct)|utmcmd=(none)"; }
  if (c=="-" || c=="") return "";
 }
 if (z!="-") {
  i=z.indexOf(".");
  if (i>-1) i=z.indexOf(".",i+1);
  if (i>-1) i=z.indexOf(".",i+1);
  if (i>-1) i=z.indexOf(".",i+1);
  t=z.substring(i+1,z.length);
  if (t.toLowerCase()==c.toLowerCase()) cs=1;
  t=z.substring(0,i);
  if ((i=t.lastIndexOf(".")) > -1) {
   t=t.substring(i+1,t.length);
   cn=(t*1);
  }
 }
 if (cs==0 || _ufns==1) {
  t=_uGC(dc,"__utma="+_udh,";");
  if ((i=t.lastIndexOf(".")) > 9) {
   _uns=t.substring(i+1,t.length);
   _uns=(_uns*1);
  }
  cn++;
  if (_uns==0) _uns=1;
  _ubd.cookie="__utmz="+_udh+"."+_ust+"."+_uns+"."+cn+"."+c+"; path=/; "+x+_udo;
 }
 if (cs==0 || _ufns==1) return "&utmcn=1";
 else return "&utmcr=1";
}
function _uRef() {
 if (_ur=="0" || _ur=="" || _ur=="-") return "";
 var i=0,h,k,n;
 if ((i=_ur.indexOf("://"))<0) return "";
 h=_ur.substring(i+3,_ur.length);
 if (h.indexOf("/") > -1) {
  k=h.substring(h.indexOf("/"),h.length);
  if (k.indexOf("?") > -1) k=k.substring(0,k.indexOf("?"));
  h=h.substring(0,h.indexOf("/"));
 }
 h=h.toLowerCase();
 n=h;
 if ((i=n.indexOf(":")) > -1) n=n.substring(0,i);
 for (var ii=0;ii<_uRno.length;ii++) {
  if ((i=n.indexOf(_uRno[ii].toLowerCase())) > -1 && n.length==(i+_uRno[ii].length)) { _ufno=1; break; }
 }
 if (h.indexOf("www.")==0) h=h.substring(4,h.length);
 return "utmccn=(referral)|utmcsr="+_uEC(h)+"|"+"utmcct="+_uEC(k)+"|utmcmd=referral";
}
function _uOrg(t) {
 if (_ur=="0" || _ur=="" || _ur=="-") return "";
 var i=0,h,k;
 if ((i=_ur.indexOf("://")) < 0) return "";
 h=_ur.substring(i+3,_ur.length);
 if (h.indexOf("/") > -1) {
  h=h.substring(0,h.indexOf("/"));
 }
 for (var ii=0;ii<_uOsr.length;ii++) {
  if (h.indexOf(_uOsr[ii]) > -1) {
   if ((i=_ur.indexOf("?"+_uOkw[ii]+"=")) > -1 || (i=_ur.indexOf("&"+_uOkw[ii]+"=")) > -1) {
    k=_ur.substring(i+_uOkw[ii].length+2,_ur.length);
    if ((i=k.indexOf("&")) > -1) k=k.substring(0,i);
    for (var yy=0;yy<_uOno.length;yy++) {
     if (_uOno[yy].toLowerCase()==k.toLowerCase()) { _ufno=1; break; }
    }
    if (t) return _uEC(k);
    else return "utmccn=(organic)|utmcsr="+_uEC(_uOsr[ii])+"|"+"utmctr="+_uEC(k)+"|utmcmd=organic";
   }
  }
 }
 return "";
}
function _uBInfo(page) {
 var sr="-",sc="-",ul="-",fl="-",je=1;
 var n=navigator;
 if (self.screen) {
  sr=screen.width+"x"+screen.height;
  sc=screen.colorDepth+"-bit";
 } else if (self.java) {
  var j=java.awt.Toolkit.getDefaultToolkit();
  var s=j.getScreenSize();
  sr=s.width+"x"+s.height;
 }
 if (_ujv=="-" && (!page || page=="")) {
  for (var i=5;i>=0;i--) {
   var t="<script language='JavaScript1."+i+"'>_ujv='1."+i+"';</script>";
   _ubd.write(t);
   if (_ujv!="-") break;
  }
 }
 if (n.language) { ul=n.language.toLowerCase(); }
 else if (n.browserLanguage) { ul=n.browserLanguage.toLowerCase(); }
 je=n.javaEnabled()?1:0;
 if (_uflash) fl=_uFlash();
 return "&utmsr="+sr+"&utmsc="+sc+"&utmul="+ul+"&utmje="+je+"&utmjv="+_ujv+"&utmfl="+fl;
}
function __utmSetTrans() {
 var e;
 if (_ubd.getElementById) e=_ubd.getElementById("utmtrans");
 else if (_ubd.utmform && _ubd.utmform.utmtrans) e=_ubd.utmform.utmtrans;
 if (!e) return;
 var l=e.value.split("UTM:");
 var i,i2,c;
 if (_userv==0 || _userv==2) i=new Array();
 if (_userv==1 || _userv==2) { i2=new Array(); c=_uGCS(); }

 for (var ii=0;ii<l.length;ii++) {
  l[ii]=_uTrim(l[ii]);
  if (l[ii].charAt(0)!='T' && l[ii].charAt(0)!='I') continue;
  var r=Math.round(Math.random()*2147483647);
  if (!_utsp || _utsp=="") _utsp="|";
  var f=l[ii].split(_utsp),s="";
  if (f[0].charAt(0)=='T') {
   s="&utmt=tran"+"&utmn="+r;
   f[1]=_uTrim(f[1]); if(f[1]&&f[1]!="") s+="&utmtid="+escape(f[1]);
   f[2]=_uTrim(f[2]); if(f[2]&&f[2]!="") s+="&utmtst="+escape(f[2]);
   f[3]=_uTrim(f[3]); if(f[3]&&f[3]!="") s+="&utmtto="+escape(f[3]);
   f[4]=_uTrim(f[4]); if(f[4]&&f[4]!="") s+="&utmttx="+escape(f[4]);
   f[5]=_uTrim(f[5]); if(f[5]&&f[5]!="") s+="&utmtsp="+escape(f[5]);
   f[6]=_uTrim(f[6]); if(f[6]&&f[6]!="") s+="&utmtci="+escape(f[6]);
   f[7]=_uTrim(f[7]); if(f[7]&&f[7]!="") s+="&utmtrg="+escape(f[7]);
   f[8]=_uTrim(f[8]); if(f[8]&&f[8]!="") s+="&utmtco="+escape(f[8]);
  } else {
   s="&utmt=item"+"&utmn="+r;
   f[1]=_uTrim(f[1]); if(f[1]&&f[1]!="") s+="&utmtid="+escape(f[1]);
   f[2]=_uTrim(f[2]); if(f[2]&&f[2]!="") s+="&utmipc="+escape(f[2]);
   f[3]=_uTrim(f[3]); if(f[3]&&f[3]!="") s+="&utmipn="+escape(f[3]);
   f[4]=_uTrim(f[4]); if(f[4]&&f[4]!="") s+="&utmiva="+escape(f[4]);
   f[5]=_uTrim(f[5]); if(f[5]&&f[5]!="") s+="&utmipr="+escape(f[5]);
   f[6]=_uTrim(f[6]); if(f[6]&&f[6]!="") s+="&utmiqt="+escape(f[6]);
  }
  if (_userv==0 || _userv==2) {
   i[ii]=new Image(1,1);
   i[ii].src=_ugifpath+"?"+"utmwv="+_uwv+s;
   i[ii].onload=function() { _uVoid(); }
  }
  if (_userv==1 || _userv==2) {
   i2[ii]=new Image(1,1);
   i2[ii].src=_ugifpath2+"?"+"utmwv="+_uwv+s+"&utmac="+_uacct+"&utmcc="+c;
   i2[ii].onload=function() { _uVoid(); }
  }
 }
 return;
}
function _uFlash() {
 var f="-",n=navigator;
 if (n.plugins && n.plugins.length) {
  for (var ii=0;ii<n.plugins.length;ii++) {
   if (n.plugins[ii].name.indexOf('Shockwave Flash')!=-1) {
    f=n.plugins[ii].description.split('Shockwave Flash ')[1];
    break;
   }
  }
 } else if (window.ActiveXObject) {
  for (var ii=10;ii>=2;ii--) {
   try {
    var fl=eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash."+ii+"');");
    if (fl) { f=ii + '.0'; break; }
   }
   catch(e) {}
  }
 }
 return f;
}
function __utmLinker(l) {
 var p,a="-",b="-",c="-",z="-",v="-";
 var dc=_ubd.cookie;
 if (l && l!="") {
  if (dc) {
   a=_uGC(dc,"__utma="+_udh,";");
   b=_uGC(dc,"__utmb="+_udh,";");
   c=_uGC(dc,"__utmc="+_udh,";");
   z=_uGC(dc,"__utmz="+_udh,";");
   v=_uGC(dc,"__utmv="+_udh,";");
   p="__utma="+a+"&__utmb="+b+"&__utmc="+c+"&__utmz="+escape(z)+"&__utmv="+escape(v);
  }
  if (p) {
   if (l.indexOf("?")<=-1) { document.location=l+"?"+p; }
   else { document.location=l+"&"+p; }
  } else { document.location=l; }
 }
}
function __utmLinkPost(f) {
 var p,a="-",b="-",c="-",z="-",v="-";
 var dc=_ubd.cookie;
 if (!f || !f.action) return;
 if (dc) {
  a=_uGC(dc,"__utma="+_udh,";");
  b=_uGC(dc,"__utmb="+_udh,";");
  c=_uGC(dc,"__utmc="+_udh,";");
  z=_uGC(dc,"__utmz="+_udh,";");
  v=_uGC(dc,"__utmv="+_udh,";");
  p="__utma="+a+"&__utmb="+b+"&__utmc="+c+"&__utmz="+escape(z)+"&__utmv="+escape(v);
 }
 if (p) {
  if (f.action.indexOf("?")<=-1) f.action+="?"+p;
  else f.action+="&"+p;
 }
 return;
}
function __utmSetVar(v) {
 if (!v || v=="") return;
 var r=Math.round(Math.random() * 2147483647);
 _ubd.cookie="__utmv="+_udh+"."+escape(v)+"; path=/; expires=Sun, 18 Jan 2038 00:00:00 GMT;"+_udo;
 var s="&utmt=var&utmn="+r;
 if (_userv==0 || _userv==2) {
  var i=new Image(1,1);
  i.src=_ugifpath+"?"+"utmwv="+_uwv+s;
  i.onload=function() { _uVoid(); }
 }
 if (_userv==1 || _userv==2) {
  var i2=new Image(1,1);
  i2.src=_ugifpath2+"?"+"utmwv="+_uwv+s+"&utmac="+_uacct+"&utmcc="+_uGCS();
  i2.onload=function() { _uVoid(); }
 }
}
function _uGCS() {
 var t,c="",dc=_ubd.cookie;
 if ((t=_uGC(dc,"__utma="+_udh,";"))!="-") c+=escape("__utma="+t+";+");
 if ((t=_uGC(dc,"__utmb="+_udh,";"))!="-") c+=escape("__utmb="+t+";+");
 if ((t=_uGC(dc,"__utmc="+_udh,";"))!="-") c+=escape("__utmc="+t+";+");
 if ((t=_uGC(dc,"__utmz="+_udh,";"))!="-") c+=escape("__utmz="+t+";+");
 if ((t=_uGC(dc,"__utmv="+_udh,";"))!="-") c+=escape("__utmv="+t+";");
 if (c.charAt(c.length-1)=="+") c=c.substring(0,c.length-1);
 return c;
}
function _uGC(l,n,s) {
 if (!l || l=="" || !n || n=="" || !s || s=="") return "-";
 var i,i2,i3,c="-";
 i=l.indexOf(n);
 i3=n.indexOf("=")+1;
 if (i > -1) {
  i2=l.indexOf(s,i); if (i2 < 0) { i2=l.length; }
  c=l.substring((i+i3),i2);
 }
 return c;
}
function _uDomain() {
 if (!_udn || _udn=="" || _udn=="none") { _udn=""; return 1; }
 if (_udn=="auto") {
  var d=_ubd.domain;
  if (d.substring(0,4)=="www.") {
   d=d.substring(4,d.length);
  }
  _udn=d;
 }
 if (_uhash=="off") return 1;
 return _uHash(_udn);
}
function _uHash(d) {
 if (!d || d=="") return 1;
 var h=0,g=0;
 for (var i=d.length-1;i>=0;i--) {
  var c=parseInt(d.charCodeAt(i));
  h=((h << 6) & 0xfffffff) + c + (c << 14);
  if ((g=h & 0xfe00000)!=0) h=(h ^ (g >> 21));
 }
 return h;
}
function _uFixA(c,s,t) {
 if (!c || c=="" || !s || s=="" || !t || t=="") return "-";
 var a=_uGC(c,"__utma="+_udh,s);
 var lt=0,i=0;
 if ((i=a.lastIndexOf(".")) > 9) {
  _uns=a.substring(i+1,a.length);
  _uns=(_uns*1)+1;
  a=a.substring(0,i);
  if ((i=a.lastIndexOf(".")) > 7) {
   lt=a.substring(i+1,a.length);
   a=a.substring(0,i);
  }
  if ((i=a.lastIndexOf(".")) > 5) {
   a=a.substring(0,i);
  }
  a+="."+lt+"."+t+"."+_uns;
 }
 return a;
}
function _uTrim(s) {
  if (!s || s=="") return "";
  while ((s.charAt(0)==' ') || (s.charAt(0)=='\n') || (s.charAt(0,1)=='\r')) s=s.substring(1,s.length);
  while ((s.charAt(s.length-1)==' ') || (s.charAt(s.length-1)=='\n') || (s.charAt(s.length-1)=='\r')) s=s.substring(0,s.length-1);
  return s;
}

function _uEC(s) {
  var n="";
  if (!s || s=="") return "";
  for (var i=0;i<s.length;i++) {if (s.charAt(i)==" ") n+="+"; else n+=s.charAt(i);}
  return n;
}

function __utmVisitorCode() {
 var r=0,t=0,i=0,i2=0,m=31;
 var a=_uGC(_ubd.cookie,"__utma="+_udh,";");
 if ((i=a.indexOf(".",0))<0) return;
 if ((i2=a.indexOf(".",i+1))>0) r=a.substring(i+1,i2); else return "";  
 if ((i=a.indexOf(".",i2+1))>0) t=a.substring(i2+1,i); else return "";  
 var c=new Array('A','B','C','D','E','F','G','H','J','K','L','M','N','P','R','S','T','U','V','W','X','Y','Z','1','2','3','4','5','6','7','8','9');
 return c[r>>28&m]+c[r>>23&m]+c[r>>18&m]+c[r>>13&m]+"-"+c[r>>8&m]+c[r>>3&m]+c[((r&7)<<2)+(t>>30&3)]+c[t>>25&m]+c[t>>20&m]+"-"+c[t>>15&m]+c[t>>10&m]+c[t>>5&m]+c[t&m];
}


// ===================== AuroraExplorerMenuBar Class ======================================

function AuroraExplorerMenuBar (strInstanceName, strCgiPath, strAssetsPath, strShowHome, strContactUrl)
{
	this.m_InstanceName = strInstanceName;
	this.m_CgiPath		= strCgiPath;
	this.m_AssetsPath	= strAssetsPath;
	this.m_Separator  = '|';
	this.m_ShowHome	    = false;

	if (strContactUrl != '')
	{
		this.m_ContactUrl = strContactUrl;
		this.m_contactExists = true;
	}
	else
	{
		this.m_ContactUrl = "http://www.auroragov.org/auroragov/Departments/Access_Aurora/index.htm"
		this.m_contactExists = true;
	}
			
	if (strShowHome != null && strShowHome == 'true')
		this.m_ShowHome = true;

	this.m_src_Space = strAssetsPath + 'space.gif';				
	this.m_arrowDownImage = strAssetsPath + 'ArrowDown.gif';
	this.m_arrowDownOverImage = strAssetsPath + 'ArrowDown_over.gif';
	this.m_arrowRightImage = strAssetsPath + 'ArrowRight.gif';
	this.m_arrowRightOverImage = strAssetsPath + 'ArrowRight_over.gif';	
		
	this.m_arrowRightImageWidth = "11";
	this.m_arrowRightImageHeight = "11";
	this.m_arrowDownImageWidth = "11";
	this.m_arrowDownImageHeight = "11";	

	this.m_HeaderTableId = strInstanceName + '_HeaderTable';
	this.m_HeaderMenuId  = strInstanceName + '_HeaderMenu';
	
	this.m_selectedElements = new Array(0);

	this.m_ds = new Array();
	this.m_di = 0;

	// primary display 
	AuroraExplorerMenuBar.prototype.Display = AuroraExplorerMenuBar_Display;
	AuroraExplorerMenuBar.prototype.DisplayNode = AuroraExplorerMenuBar_DisplayNode;
	
	// content page generation
	AuroraExplorerMenuBar.prototype.OpeningHtml = AuroraExplorerMenuBar_OpeningHtml;
	AuroraExplorerMenuBar.prototype.CoreHtml = AuroraExplorerMenuBar_CoreHtml;
	AuroraExplorerMenuBar.prototype.ClosingHtml = AuroraExplorerMenuBar_ClosingHtml;	
	
	// runtime support
	AuroraExplorerMenuBar.prototype.topCollectionItem_mouseover	= AuroraExplorerMenuBar_topCollectionItem_mouseover;
	AuroraExplorerMenuBar.prototype.topCollectionItem_mouseout	= AuroraExplorerMenuBar_topCollectionItem_mouseout;
		
	AuroraExplorerMenuBar.prototype.childCollectionItem_mouseover = AuroraExplorerMenuBar_childCollectionItem_mouseover;
	AuroraExplorerMenuBar.prototype.childCollectionItem_mouseout	= AuroraExplorerMenuBar_childCollectionItem_mouseout;

	AuroraExplorerMenuBar.prototype.highlightItem					= AuroraExplorerMenuBar_highlightItem;
	AuroraExplorerMenuBar.prototype.unhighlightItem				= AuroraExplorerMenuBar_unhighlightItem;

	AuroraExplorerMenuBar.prototype.linkItem_mouseover			= AuroraExplorerMenuBar_linkItem_mouseover;
	AuroraExplorerMenuBar.prototype.linkItem_mouseout				= AuroraExplorerMenuBar_linkItem_mouseout;

	AuroraExplorerMenuBar.prototype.topCollectionItem_onclick		= AuroraExplorerMenuBar_topCollectionItem_onclick;
	AuroraExplorerMenuBar.prototype.childCollectionItem_onclick	= AuroraExplorerMenuBar_childCollectionItem_onclick;
	AuroraExplorerMenuBar.prototype.linkItem_onclick				= AuroraExplorerMenuBar_linkItem_onclick;

	AuroraExplorerMenuBar.prototype.closeChildMenusOf				= AuroraExplorerMenuBar_closeChildMenusOf;
	AuroraExplorerMenuBar.prototype.closeOpenSiblingsOf			= AuroraExplorerMenuBar_closeOpenSiblingsOf;

	AuroraExplorerMenuBar.prototype.setMenuDisplayStatus			= AuroraExplorerMenuBar_setMenuDisplayStatus;
	AuroraExplorerMenuBar.prototype.resetMenus					= AuroraExplorerMenuBar_resetMenus;
}

function AuroraExplorerMenuBar_Display(node)
{
	this.m_ds[this.m_di++] = 
		'<!-- Header Table -->' + 
		'<table id="' + this.m_HeaderTableId + '" style="width:100%" border="0" cellspacing="0" cellpadding="0">' +
//		'	<tr>' +
//		'		<td colspan="3" class="ddm_HeaderLogoCell">' +
//		'			<table style="width:100%" border="0" cellspacing="0" cellpadding="0">' +
//		'				<tr>' +
//		'					<td style="width:10px;text-align:left; vertical-align:middle; padding-left:6pt; //padding-right:10px">' +
//		'						<img src="images/StellentLogo.gif" width="120" height="20"></td>' +
//		'					<td id="quickSearchCell" style="white-space:nowrap; text-align:right; vertical-align:middle; //padding-left:0pt; padding-right:6pt; padding-top:5px; padding-bottom:7px">' +
//		'						<!-- *** Quick Search container *** --></td>' +
//		'				</tr>' +
//		' 			</table>' +
//		'		</td>' +
//		'	</tr>' +
//		'	<tr>' +
//		'		<td colspan="3" class="ddm_HeaderSpacerCell"><img src="' + this.m_src_Space + '" width="16" height="0"></td>' +
//		'	</tr>' +
		'	<tr>' +
		'		<td id="' + this.m_HeaderMenuId + '" class="ddm_HeaderMenuCell" width="10">' +
		'';

// opening HTML for the Home node... but really binding the whole top level
		this.m_ds[this.m_di++] =
			'<table border="0" cellpadding="0" cellspacing="0">\n' +
			'<tr>\n';
// opening HTML

// core HTML
	this.DisplayNode(node);		// recursive walk...
// core HTML

// closing HTML for the Home node...
		this.m_ds[this.m_di++] =
			'	</tr>\n' +
			'</table>\n';

// closing HTML for the Home node...

	this.m_ds[this.m_di++] = 
		'       </td>' +
//		'		<td class="ddm_TopMenuBarDividerCell" width="10">' +
//		'			<img src="images/tab_corner.gif" width="37" height="19"></td>' +
//		'		<td class="ddm_TopMenuBarRightCell">' +
//		'			<table border="0" cellpadding="0" cellspacing="0">' +
//		'				<tr>' +
//		'					<td class="ddm_TopMenuBarExtraLink" onclick="addBookmark()" onmouseover="this.className='ddm_TopMenuBarExtraLink_over'" onmouseout="this.className='ddm_TopMenuBarExtraLink'">' +
//		'						Add To Favorites</td>' +
//		'				</tr>' +
//		'			</table>' +
//		'		</td>' +
//		'	</tr>' +
		'</table>' +	
		'';

	document.write(this.m_ds.join(''));
}

function AuroraExplorerMenuBar_DisplayNode (parentElement, parentPath)
{
//LHibbs Added if around this function to skip any level below the 2 levels we are currently displaying, for speed 10-21-2004
        if (parentElement.m_level < 2) 
	{
		// Create a variable containing all children of the passed-in element. 
		var childList = parentElement.m_subNodes;

		// Call the function that generates the opening html code for a collection (the generated
		// code will typically be an opening <div> tag that will act as a container for the collection).
		this.OpeningHtml(parentElement);

		if (parentElement.m_level == 0 && this.m_ShowHome)
			this.CoreHtml(parentElement, parentPath);

		// Loop through the children of the passed-in element. For each child, run the core html function,
		// and if that child has children of its own, recursively call the DisplayNode function.
		
		for (var i=0; i<childList.length; i++)
		{		
			var childNode = childList[i];
			var nodepath  = "";
			
			if (parentPath)
			{
				nodePath = parentPath + "." + i;
			}
			else
			{
				nodePath = i.toString();
			}

			this.CoreHtml(childNode, nodePath);

			if (childNode.m_subNodes.length > 0)
			{
				this.DisplayNode(childNode, nodePath);
			}
		}

		/* Call the function that generates the closing html code for a collection (the generated
			code will typically be a closing </div> tag for the collection container).*/
		
		this.ClosingHtml(parentElement);
	}
}

// ============== Page Data Generation functions ========================


function AuroraExplorerMenuBar_OpeningHtml(parentElement)
{
	var level = parentElement.m_level;

//	if (level == 0 && this.m_ShowHome)
//		level = 1;	// fake it...

	if (level == 0) // Home node
	{

	}
	else 
	if (level == 1) // Top-level menu items
	{
		this.m_ds[this.m_di++] =
			'<div class="ddm_TopChildCollectionContainer" style="display:none">\n' +
			'	<table class="ddm_TopChildListTable" border="0" cellpadding="0" cellspacing="0">\n' +
			'		<tr>\n' +
			'			<td>\n' +
			'				<img src="' + this.m_src_Space + '" width="1" height="2"></td>\n' +
			'		</tr>\n';
	}
	else							// Child menu items
	{
//Lhibbs ddm_SubChildCollectionContainer to ddm_TopChildCollectioncontainer
		this.m_ds[this.m_di++] =
			'<div class="ddm_TopChildCollectionContainer" style="display:none">\n' +
			'	<table class="ddm_SubChildListTable" border="0" cellpadding="0" cellspacing="0">\n' +
			'		<tr>\n' +
			'			<td>\n' +
			'				<img src="' + this.m_src_Space + '" width="1" height="2"></td>\n' +
			'		</tr>\n';
	}
}

function AuroraExplorerMenuBar_CoreHtml(childElement, nodeLocation)
{
	var label = childElement.m_label;
	var id = nodeLocation;
	var level = childElement.m_level;

	if (level == 0 && this.m_ShowHome)
		level = 1;	// fake it...
/* Scw */ 	if (label == 'AuroraGov')
/* Scw */			{
/* Scw */				label = 'Home';
/* Scw */			}
	if (level == 0) // Home node
	{

	}
	else
	if (level == 1) // Top-level menu items
	{
		/*scw*/ parentlabel = childElement.m_label;
		var linkTarget = "_self";
//LHibbs added this to allow redirects based on folder property cspRedirect.  10-19-2004
//alert('cp_cspredirectURL:'+childElement.cp_cspRedirectURL);
if (label == 'Contact Us')
{

	var url = this.m_ContactUrl;
//alert('URL:'+this.m_ContactUrl);
}
else
{
	var url = (customSectionPropertyExists(childElement.cp_cspRedirectURL) ? childElement.cp_cspRedirectURL : childElement.m_href.replace(/'/g, "\\'"));
}

//end Lhibbs 10-19-2004
//original source 10-19-2004
//var url = childElement.m_href.replace(/'/g, "\\'");
//end of original source
zlabel = "/" + parentlabel + "/" + label;	
		if (childElement.m_subNodes.length == 0 || childElement.m_level == 0)
		{	// "item"
			this.m_ds[this.m_di++] =
				'<td id="' + id + '" class="ddm_TopLinkItem"' +
				' onclick="' + this.m_InstanceName + '.linkItem_onclick(event, this, \'' + url + '\', \'' + linkTarget + '\', \'' + zlabel + '\')"' +
				' onmouseover="' + this.m_InstanceName + '.linkItem_mouseover(this)"' + 
				' onmouseout="' + this.m_InstanceName + '.linkItem_mouseout(this)">' +
				/* scw */ this.m_Separator + '&nbsp' +
				'	' + label + '\n' +
				'</td>\n';
		}
		else 
		{	// "collection"
			this.m_ds[this.m_di++] =
				'<td id="' + id + '"class="ddm_TopLinkItem"' +
				' onclick="' + this.m_InstanceName + '.linkItem_onclick(event, this, \'' + url + '\', \'' + linkTarget + '\', \'' + zlabel + '\')"' +
				' onmouseover="' + this.m_InstanceName + '.topCollectionItem_mouseover(event, this)"' +
				' onmouseout="' + this.m_InstanceName + '.topCollectionItem_mouseout(event, this)">\n' +
				'	<table class="ddm_TopCollectionItemTable" border="0" cellpadding="0" cellspacing="0">\n' +
				'		<tr>\n' +
				//scw '			<td class="ddm_TopCollectionItemArrowCell">\n' +
				//scw '				<img src="' + this.m_arrowDownImage + '" width="' + this.m_arrowDownImageWidth + '" height="' + this.m_arrowDownImageHeight + '"></td>\n' +
				'			<td class="ddm_TopCollectionItem">\n' +
				/* scw */ this.m_Separator + '&nbsp' +
				'				' + label + '</td>\n' +
				'		</tr>\n' +
				'	</table>\n';
		}
	}
	else // Child menu items
	{
		var linkTarget = "_self";
//LHibbs added this to allow redirects based on folder property cspRedirectURL.  10-19-2004
//alert(label+':'+childElement.m_href+':'+childElement.cp_cspRedirectURL);
//var URL = (customSectionPropertyExists(childElement.cp_cspRedirectURL) ? childElement.cp_cspRedirectURL : childElement.m_href.replace(/'/g, "\\'"));
//alert(label+':'+URL);
if (label == 'Contact Us')
{
//alert('URL:'+this.m_ContactUrl);
	var URL = this.m_ContactUrl;
}
else if (label == 'Aurora Connect' || label == 'Subscriptions')
{
	var URL = (customSectionPropertyExists(childElement.cp_cspRedirectURL) ? childElement.cp_cspRedirectURL + g_ssSourceNodeId: childElement.m_href.replace(/'/g, "\\'"));
//alert('AURORACONNECTURL:'+URL+':');
}
else
{
	var URL = (customSectionPropertyExists(childElement.cp_cspRedirectURL) ? childElement.cp_cspRedirectURL : childElement.m_href.replace(/'/g, "\\'"));
}

//end Lhibbs 10-19-2004
//original source 10-19-2004
//var url = childElement.m_href.replace(/'/g, "\\'");
//end of original source
zlabel = "/" + parentlabel + "/" + label;
		if (childElement.m_subNodes.length == 0)
		{	// "item"
			this.m_ds[this.m_di++] =
				'<tr>\n' +
				'	<td id="' + id + '" class="ddm_ChildLinkItem"' +
				' onclick="' + this.m_InstanceName + '.linkItem_onclick(event, this, \'' + URL + '\', \'' + linkTarget + '\', \'' + zlabel + '\')"' +
				' onmouseover="' + this.m_InstanceName + '.linkItem_mouseover(this)"' +
				' onmouseout="' + this.m_InstanceName + '.linkItem_mouseout(this)">\n' +
				'	' + label + '\n' +
				'	</td>\n' +
				'</tr>\n';
		}
		else 
		{ // "collection"
			this.m_ds[this.m_di++] =			
				'<tr>\n' +
				'	<td id="' + id + '"' +
				' onclick="' + this.m_InstanceName + '.linkItem_onclick(event, this, \'' + URL + '\', \'' + linkTarget + '\', \'' + zlabel + '\')"' + 
				' onmouseover="' + this.m_InstanceName + '.childCollectionItem_mouseover(event, this)"' +
				' onmouseout="' + this.m_InstanceName + '.childCollectionItem_mouseout(event, this)">\n' +
				'		<table class="ddm_ChildCollectionItemTable" style="width:100%" border="0" cellpadding="0" cellspacing="0">\n' +
				'			<tr>\n' +
		// scw		'				<td class="ddm_ChildCollectionItem">\n' +
/* scw */		'				<td class="ddm_ChildCollectionItem">\n' +
				'	' + label + '</td>\n' +
				//scw '				<td class="ddm_ChildCollectionItemArrowCell">\n' +
				// scw '					<img src="' + this.m_arrowRightImage + '" width="' + this.m_arrowRightImageWidth + '" height="' + this.m_arrowRightImageHeight + '"></td>\n' +
				'</tr>\n' +
				'		</table>\n';
		}
	}
}

function AuroraExplorerMenuBar_ClosingHtml(parentElement)
{
	var level = parentElement.m_level;

//	if (level == 0 && this.m_ShowHome)
//		level = 1;	// fake it...

	if (level == 0) // Home node
	{

	}
	else 
	if (level == 1) // Top-level menu items
	{
		this.m_ds[this.m_di++] =
			'			<tr>\n' +
			'				<td>\n' +
			'					<img src="' + this.m_src_Space + '" width="1" height="2"></td>\n' +
			'			</tr>\n' +
			'		</table>\n' +
			'	</div>\n' +
			'</td>\n'; // Closing tag for parent cell
	}
	else							// Child menu items
	{
		this.m_ds[this.m_di++] =
			'			<tr>\n' +
			'				<td>\n' +
			'					<img src="' + this.m_src_Space + '" width="1" height="2"></td>\n' +
			'			</tr>\n' +
			'		</table>\n' +
			'	</div>\n' +
			'	</td>\n' + // Closing tag for parent cell.
			'</tr>\n'; // Closing tag for parent row.
	}
}

// ============= Runtime Support Functions =============================

function AuroraExplorerMenuBar_topCollectionItem_mouseover(e, element)
{
	if (navigator.appName == "Netscape")
	{
		this.highlightItem(element);
	}
	else //IE Branch
	{						
		this.highlightItem(element);

		var headerTable = document.getElementById(this.m_HeaderTableId);
		var headerHeight = parseInt(headerTable.offsetHeight);
		var headerTop = parseInt(headerTable.offsetTop);		
		var headerLeft = parseInt(headerTable.offsetLeft);		

		var trikLeft = 0;
		var trikTop = 0;
		
		var container = headerTable.offsetParent;				
	
		while (container)
		{
			trikLeft += container.offsetLeft;
			trikTop += container.offsetTop;			
			container = container.offsetParent;
		}

		var menuBottomBorder = parseInt(document.getElementById(this.m_HeaderMenuId).currentStyle.borderBottomWidth);
		var menuBottomPadding = parseInt(document.getElementById(this.m_HeaderMenuId).currentStyle.paddingBottom);

		if (isNaN(menuBottomBorder)) { menuBottomBorder = 0 }
		if (isNaN(menuBottomPadding)) { menuBottomPadding = 0 }

		headerHeight = parseInt(headerHeight) - parseInt(menuBottomBorder) - parseInt(menuBottomPadding);

		if (element.getElementsByTagName("div").length > 0)
		{
			var childMenu = element.getElementsByTagName("div")[0];
			childMenu.style.top = trikTop + headerTop + headerHeight;
			childMenu.style.left = trikLeft + headerLeft + element.offsetLeft;
			childMenu.style.display = "block";

			this.setMenuDisplayStatus(childMenu, "on");
		}		
	}
}

function AuroraExplorerMenuBar_topCollectionItem_mouseout(e, element)
{
	if (!e) { e = window.event; }		

	if (navigator.appName == "Netscape") //NN/Mozilla
	{
		if (element.getElementsByTagName("div").length > 0)
		{		
			var childMenu = element.getElementsByTagName("div")[0];
			if (childMenu.style.display == "none")
			{
				this.unhighlightItem(element);
			}
		}
	}
	else // IE
	{
		this.unhighlightItem(element);

		if (element.getElementsByTagName("div").length > 0)
		{			
			var childMenu = element.getElementsByTagName("div")[0];
			childMenu.style.display = "none";

			this.setMenuDisplayStatus(childMenu, "off");
		}
	}
}

function AuroraExplorerMenuBar_childCollectionItem_mouseover(e, element)
{
	if (navigator.appName == "Netscape")
	{
		this.highlightItem(element);
	}
	else
	{
		this.highlightItem(element);
		// scw if (element.getElementsByTagName("div").length > 0)
		// scw {					
			// scw var childMenu = element.getElementsByTagName("div")[0];
			// scw childMenu.style.top = element.offsetTop;
			// scw childMenu.style.display = "block";

			// scw this.setMenuDisplayStatus(childMenu, "on");
		// scw }
	}
}

function AuroraExplorerMenuBar_highlightItem(element)
{
	var itemDisplayTable = element.getElementsByTagName("table")[0];

	// Set style for item's display table element.
	if (itemDisplayTable.className == "ddm_TopCollectionItemTable")
	{
		itemDisplayTable.className = "ddm_TopCollectionItemTable_over";
	}
	else if (itemDisplayTable.className == "ddm_ChildCollectionItemTable")
	{
		itemDisplayTable.className = "ddm_ChildCollectionItemTable_over";
	}

	var tableCells = itemDisplayTable.getElementsByTagName("td")
	for (var i=0; i<tableCells.length; i++)
	{
		// Set style for item's label cell element.
		if (tableCells[i].className == "ddm_TopCollectionItem")
		{
			tableCells[i].className = "ddm_TopCollectionItem_over";
		}
		else if (tableCells[i].className == "ddm_ChildCollectionItem")
		{
			tableCells[i].className = "ddm_ChildCollectionItem_over";
		}

		// Change arrow image to mouseover version.
		if (tableCells[i].className == "ddm_TopCollectionItemArrowCell")
		{
			tableCells[i].getElementsByTagName("img")[0].src = this.m_arrowDownOverImage;
		}
		else if (tableCells[i].className == "ddm_ChildCollectionItemArrowCell")
		{
			tableCells[i].getElementsByTagName("img")[0].src = this.m_arrowRightOverImage;
		}
	}
}

function AuroraExplorerMenuBar_childCollectionItem_mouseout(e, element)
{
	if (!e) { e = window.event; }

	if (navigator.appName == "Netscape") // NN/Mozilla
	{
		if (element.getElementsByTagName("div").length > 0)
		{				
			var childMenu = element.getElementsByTagName("div")[0];
			if (childMenu.style.display == "none")
			{
				this.unhighlightItem(element);
			}
		}				
	}

	else // IE
	{
		this.unhighlightItem(element);

		if (element.getElementsByTagName("div").length > 0)
		{					
			var childMenu = element.getElementsByTagName("div")[0];
			childMenu.style.display = "none";

			this.setMenuDisplayStatus(childMenu, "off");
		}
	}
}

function AuroraExplorerMenuBar_unhighlightItem(element)
{
	var itemDisplayTable = element.getElementsByTagName("table")[0];

	// Set style for item's display table element.
	if (itemDisplayTable.className == "ddm_TopCollectionItemTable_over")
	{
		itemDisplayTable.className = "ddm_TopCollectionItemTable";
	}
	else if (itemDisplayTable.className == "ddm_ChildCollectionItemTable_over")
	{
		itemDisplayTable.className = "ddm_ChildCollectionItemTable";
	}

	var tableCells = itemDisplayTable.getElementsByTagName("td")
	for (var i=0; i<tableCells.length; i++)
	{

		// Set style for item's label cell element.
		if (tableCells[i].className == "ddm_TopCollectionItem_over")
		{
			tableCells[i].className = "ddm_TopCollectionItem";
		}
		else if (tableCells[i].className == "ddm_ChildCollectionItem_over")
		{
			tableCells[i].className = "ddm_ChildCollectionItem";
		}

		// Change arrow image to mouseover version.
		if (tableCells[i].className == "ddm_TopCollectionItemArrowCell")
		{
			tableCells[i].getElementsByTagName("img")[0].src = this.m_arrowDownImage;
		}
		else if (tableCells[i].className == "ddm_ChildCollectionItemArrowCell")
		{
			tableCells[i].getElementsByTagName("img")[0].src = this.m_arrowRightImage;
		}

	}
}

function AuroraExplorerMenuBar_linkItem_mouseover(element)
{		
	if (element.className == "ddm_TopLinkItem")
	{
		element.className = "ddm_TopLinkItem_over";
	}

	else if (element.className == "ddm_ChildLinkItem")
	{
		element.className = "ddm_ChildLinkItem_over";
	}				
}

function AuroraExplorerMenuBar_linkItem_mouseout(element)
{
	if (element.className == "ddm_TopLinkItem_over")
	{
		element.className = "ddm_TopLinkItem";
	}

	else if (element.className == "ddm_ChildLinkItem_over")
	{
		element.className = "ddm_ChildLinkItem";
	}
}

function AuroraExplorerMenuBar_topCollectionItem_onclick(e, element)
{
	var headerTable  = document.getElementById(this.m_HeaderTableId);
	var headerHeight = headerTable.offsetHeight;

	var trikLeft = 0;
	var trikTop = 0;
	
	var container = headerTable.offsetParent;				
	while (container)
	{
		trikLeft += container.offsetLeft;
		trikTop += container.offsetTop;			
		container = container.offsetParent;
	}

	if (navigator.appName == "Netscape")
	{
		if (element.getElementsByTagName("div").length > 0)
		{				
			var childMenu = element.getElementsByTagName("div")[0];

			if (childMenu.style.display == "none")
			{
				this.resetMenus();
				childMenu.style.top = headerHeight + trikTop;
				childMenu.style.left = element.offsetLeft + trikLeft;
				childMenu.style.display = "block";
				this.setMenuDisplayStatus(childMenu, "on");
			}
			else if (childMenu.style.display == "block")
			{
				this.resetMenus();
				this.highlightItem(element);
				/* Note: have to rehighlight the element since the mouse is logically
					still over this element, and the closeChildMenusOf function loop sets parent
					elements of ALL child menus (including the target) back to regular style */
			}
		}

		e.stopPropagation();
	}

	else // IE Branch
	{
		e.cancelBubble = true;
	}
}

function AuroraExplorerMenuBar_childCollectionItem_onclick(e, element)
{
	if (navigator.appName == "Netscape")
	{
		if (element.getElementsByTagName("div").length > 0)
		{				
			var childMenu = element.getElementsByTagName("div")[0];

			if (childMenu.style.display == "none")
			{
				this.closeOpenSiblingsOf(element);
				childMenu.style.top = element.offsetTop;
				childMenu.style.left = element.offsetParent.offsetWidth;
				childMenu.style.display = "block";
				this.setMenuDisplayStatus(childMenu, "on");
			}
			else if (childMenu.style.display == "block")
			{
				this.closeChildMenusOf(element);
				this.highlightItem(element);
				/* Note: have to rehighlight the element since the mouse is logically
					still over this element, and the closeChildMenusOf function loop sets parent
					elements of ALL child menus (including the target) back to regular style */
			}
		}

		e.stopPropagation();
	}
	else // IE Branch
	{
		e.cancelBubble = true;
	}
}

function AuroraExplorerMenuBar_linkItem_onclick(e, element, url, target, label)
{
//*scw - begin 

urchinTracker(label); 

//*scw - end
	if (target == "")
	{
		target = "_self";
	}
	window.open(url, target);
	this.resetMenus();

	if (navigator.appName == "Netscape")
	{
		if (element.className == "ddm_ChildLinkItem_over")
		{
			element.className = "ddm_ChildLinkItem";
		}
		else if (element.className == "ddm_TopLinkItem_over")
		{
			element.className = "ddm_TopLinkItem";
		}			
		e.stopPropagation();
	}
// bjn 	
	else // IE Branch
	{
		e.cancelBubble = true;
	}
}

function AuroraExplorerMenuBar_closeChildMenusOf(element)
// Closes an element's associated child menu as well as all decendents of that menu.
{ 
	var decendentMenus = element.getElementsByTagName("div");

	for (var i=decendentMenus.length-1; i>=0; i--)
	{
		var childMenu = decendentMenus[i];		

		this.unhighlightItem(childMenu.parentNode);
		
		childMenu.style.display = "none";

		this.setMenuDisplayStatus(childMenu, "off");
	}
}

function AuroraExplorerMenuBar_closeOpenSiblingsOf(element)
{
	var hierarchyLevel = element.id.split(".").length;
	
	if (hierarchyLevel == 1) // Top-level items
	{
		var siblingCellElements = element.parentNode.cells;
		
		for (var i=0; i<siblingCellElements.length; i++)
		{
			var siblingCellElement = siblingCellElements[i];
			
			if (siblingCellElement.getElementsByTagName("div").length > 0)
			{
				if (siblingCellElement.getElementsByTagName("div")[0].style.display == "block" && siblingCellElement != element)
				{
					this.closeChildMenusOf(siblingCellElement);
				}
			}				
		}			
	}
	else // Sub-level items
	{
		var siblingRowElements = element.parentNode.parentNode.rows; // Note: had to use parentNode twice to get past the TBODY element to the TABLE element.

		for (var i=0; i<siblingRowElements.length; i++)
		{
			var siblingCellElement = siblingRowElements[i].cells[0];

			if (siblingCellElement.getElementsByTagName("div").length > 0)
			{
				if (siblingCellElement.getElementsByTagName("div")[0].style.display == "block" && siblingCellElement != element)
				{
					this.closeChildMenusOf(siblingCellElement);
				}
			}
		}
	}
}

function AuroraExplorerMenuBar_setMenuDisplayStatus(menuElement, status)
/* This function uses a global array (defined above) to record element references
	to all menu containers that are currently visible. */
{
	if (status == "on")
	{
		/* If setting status to "on", add the element to the selectedElements array. */
		var alreadyOn = false;
		for (var i=0; i<this.m_selectedElements.length; i++)
		{
			if (this.m_selectedElements[i] == menuElement)
			{
				alreadyOn = true;
				break;
			}
		}

		if (!alreadyOn)
		{
			this.m_selectedElements.push(menuElement);
		}
	}
	else if (status == "off")
	{
		/* If setting status to "off", loop through the selectedElements array and
			find the array item that matches the current menu element and remove it
			from the array. */
		for (var i=0; i<this.m_selectedElements.length; i++)
		{
			if (this.m_selectedElements[i] == menuElement)
			{
				this.m_selectedElements.splice(i, 1); //Removes the selected element from the array.
				break;
			}
		}
	}
}

function AuroraExplorerMenuBar_resetMenus(e)
{
	var i = 0;
	var topLevelMenuCell = document.getElementById(i.toString());
	while (topLevelMenuCell != null)
	{			
		if (topLevelMenuCell.getElementsByTagName("div").length > 0 && topLevelMenuCell.getElementsByTagName("div")[0].style.display == "block")
		{
			this.closeChildMenusOf(topLevelMenuCell);
		}
		i++;
		topLevelMenuCell = document.getElementById(i.toString());
	}

	this.m_selectedElements.length = 0; // Clear out the array.
}
function clink(cnode) 
{ 
	strNode = cnode.toString();
	if (cnode <= 9999 && cnode >= 0)
	{
	  link('00' + strNode );
	}
	if (cnode <= 99999 && cnode >= 10000)
	{
	  link('0' + strNode );
	}
	if (cnode > 99999)
	{
	  link(strNode);
	}
}


// ==================== the end ===========================
