// Two level Menu Manager
thisPage='Navigator.html';
lev1img='yes';					// insert yes or no
lev1OpName='open.gif';			// open image name
lev1OpHeight='10';				// image height
lev1OpWidth='10';				// image width
lev1ClosName='closed.gif';		// closed image name
lev1ClosHeight='10';			// image height
lev1ClosWidth='10';				// image width
lev2img='yes';		// insert yes or no
lev2Name='bullet.gif';			// image name
lev2Height='10';				// image height
lev2Width='16';					// image width
lev2Char='no';		// insert yes or no
bullet = '&#8250; ';
base = 'Working';		// Target Frame
var OptCnt = 0;

var x = 0;
page = location.search.substr(1).split("?");
for (x=0;x<=page.length;x++) {
  eval(page);
}
page = escape(page);
page = page.slice(7);
//alert('Nav.js, page="'+page+'"');
Subs = '';
if (page != null) {
  temp = page.split("%253A");
  page = temp[0];
  SubS = temp[1];
}
document.write('<BASE target="' + base + '">');

function subMenu(name,linkb) {
  this.name = name;
  this.linkb = linkb;
}

function OpenMenu(cat) {
  this.cat = cat;
  document.write('<tr><td ALIGN="left" VALIGN="middle">');
  document.write('<span class = "level1">');
  document.write('<a name="'+cat+'" ');
  if (thisMenu.length == 1) {
    document.write('id="TgtLink" ');
		document.write('href="' + thisMenu[0].linkb + '" ');
	}else{
    document.write('href = "' + thisPage + '?page=null" target="_self" ');
	}
  document.write('onMouseOver="HilightLink(this);" onClick="ActiveLink(this);" onMouseOut="LolightLink(this);"');
	document.write('>');
  if (lev1img=='yes') {
    document.write('<IMG ALT=" " src="' + lev1OpName +'" width="' + lev1OpWidth + '" height="' + lev1OpHeight + '"border="0">');
  }
  document.write(cat + '</a><span><br>');
  var tgt = 0;
  var GrpS = ' ';
  if (thisMenu.length>1) {
    for (x=0;x<thisMenu.length;x++) {
      if (thisMenu[x].name == 'Grp') {
        GrpS = thisMenu[x].linkb;
        if (x==0) tgt=1;
      }else{
        if (lev2img=='yes') {
          document.write('<IMG ALT=" " src="' + lev2Name +'" width="' + lev2Width + '" height="' + lev2Height + '">');
        }
        if (lev2Char=='yes') {
          document.write(bullet);
        }
        document.write('<a name="'+thisMenu[x].name+'" ');
        if (SubS != null) {
          if (thisMenu[x].name == SubS) {
            document.write('id="TgtLink" ');
            tgt = x;
          }
        }else{
          if (x == tgt) document.write('id="TgtLink" ');
        }
        document.write('href="' + thisMenu[x].linkb + '" ' +
                       'style="text-decoration:none"' +
                       'onMouseOver="HilightLink(this);" ' +
                       'onClick="ActiveLink(this);" ' +
                       'onMouseOut="LolightLink(this);">' +
                       thisMenu[x].name);
        if (GrpS != ' ') {
          document.write(' <FONT SIZE="-1">('+GrpS+')</FONT>');
        }
        document.write('</a><span>\n<BR>');
      }
    }
  }
  document.write('</td></tr>');
  ActiveLink(document.getElementById('TgtLink'));
  if (this.name != "Navigate") {
    top.location.href = "index.html?page="+page;
  }else{
    parent.frames['Working'].location.href=thisMenu[tgt].linkb;
  }
}

// closes menu section - do not alter
function CloseMenu(cat,pass) {
  this.cat = cat;
  this.pass = pass;
  document.write('<tr><td ALIGN="left" VALIGN="middle">');
  document.write('<span class = "level1">');
  document.write('<a name="'+cat+'" href = "' + thisPage + '?page='+pass+'" target="_self" ' +
                       'style="text-decoration:none"');
  document.write(' onMouseOver="HilightLink(this);" onClick="ActiveLink(this);" onMouseOut="LolightLink(this);"');
  document.write('>');
  if (lev1img=='yes') {
    document.write('<IMG ALT=" " src="' + lev1ClosName +'" width="' + lev1ClosWidth + '" height="' + lev1ClosHeight + '"border="0">');
  }
  document.write(cat + '</a><span>');
  document.write('</td></tr>');
}

// Grey menu section - do not alter
function GreyMenu(cat) {
  this.cat = cat;
  document.write('<tr><td ALIGN="left" VALIGN="middle">');
  document.write('<span class="level1" style="color:Gray">');  // Changed from Grey to accomodate uSoft
  if (lev1img=='yes') {
    document.write('<IMG ALT=" " src="' + lev1ClosName +'" width="' + lev1ClosWidth + '" height="' + lev1ClosHeight + '"border="0">');
  }
  document.write(cat + '<span>');
  document.write('</td></tr>');
}

// Profile
if (page=='Profile') {
  OptCnt = 0;
  thisMenu = new Array();
  thisMenu[OptCnt++] = new subMenu('Profile','Profile.html');
}

// Affiliations
if (page=='Affiliations') {
  OptCnt = 0;
  thisMenu = new Array();
  thisMenu[OptCnt++] = new subMenu('Grp','Canada');
  thisMenu[OptCnt++] = new subMenu('I.S.P.','CIPS.html');
  thisMenu[OptCnt++] = new subMenu('ITCP','CIPS.html');
  thisMenu[OptCnt++] = new subMenu('Grp','USA');
  thisMenu[OptCnt++] = new subMenu('CNP','CNP.html');
  thisMenu[OptCnt++] = new subMenu('Grp','UK');
  thisMenu[OptCnt++] = new subMenu('IEng','IEng.html');
  thisMenu[OptCnt++] = new subMenu('MIED','MIED.html');
  thisMenu[OptCnt++] = new subMenu('Grp',"Int'l");
  thisMenu[OptCnt++] = new subMenu('MIEEE','IEEE.html');
  thisMenu[OptCnt++] = new subMenu('Grp','USA');
  thisMenu[OptCnt++] = new subMenu('MNPA','MNPA.html');
  thisMenu[OptCnt++] = new subMenu('Grp','UK');
  thisMenu[OptCnt++] = new subMenu('MBCS','MBCS.html');
  thisMenu[OptCnt++] = new subMenu('CITP','CITP.html');
  thisMenu[OptCnt++] = new subMenu('Grp',' ');
  thisMenu[OptCnt++] = new subMenu('more...','MiscAff.html');
}

// Clients
if (page=='Clients') {
  OptCnt = 0;
  thisMenu = new Array();
  thisMenu[OptCnt++] = new subMenu('CAE','CAE.html');
  thisMenu[OptCnt++] = new subMenu('Dataradio','Dataradio.html');
  thisMenu[OptCnt++] = new subMenu('GEC-Marconi','GEC.html');
  //thisMenu[OptCnt++] = new subMenu('Instrument<BR>Concepts','InstrCncpts.html');
  //thisMenu[OptCnt++] = new subMenu('Mannarino','MSS.html');
  thisMenu[OptCnt++] = new subMenu('MirCom','MirCom.html');
  //thisMenu[OptCnt++] = new subMenu('Optimal','Optimal.html');
  thisMenu[OptCnt++] = new subMenu('Plessey','Plessey.html');
  thisMenu[OptCnt++] = new subMenu('Securiplex','Securiplex.html');
  thisMenu[OptCnt++] = new subMenu('Vapor','Vapor.html');
  thisMenu[OptCnt++] = new subMenu('more...','MiscClnts.html');
}

// Services
if (page=='Services') {
  OptCnt = 0;
  thisMenu = new Array();
  thisMenu[OptCnt++] = new subMenu('Services','Services.html');
}

// News
if (page=='News') {
  OptCnt = 0;
  thisMenu = new Array();
  thisMenu[OptCnt++] = new subMenu('News','News.html');
}

// Academe
if (page=='Credentials') {
  OptCnt = 0;
  thisMenu = new Array();
  thisMenu[OptCnt++] = new subMenu('Academic','Education.html');
  thisMenu[OptCnt++] = new subMenu('Licensing','Licenses.html');
  thisMenu[OptCnt++] = new subMenu('more...','MiscEd.html');
}

// CV
if (page=='CV') {
  OptCnt = 0;
  thisMenu = new Array();
  thisMenu[OptCnt++] = new subMenu('CV','CV.html');
}

// Career Highlights
if (page=='HiLites') {
  OptCnt = 0;
  thisMenu = new Array();
  thisMenu[OptCnt++] = new subMenu('HiLites','HiLights.html');
}

// Testimonials
if (page=='Tstmnls') {
  OptCnt = 0;
  thisMenu = new Array();
  thisMenu[OptCnt++] = new subMenu('Tstmnls','Tstmnls.html');
}

// Clearances
if (page=='Clearances') {
  OptCnt = 0;
  thisMenu = new Array();
  thisMenu[OptCnt++] = new subMenu('Clearances','Security.html');
}

// Rates
if (page=='Rates') {
  OptCnt = 0;
  thisMenu = new Array();
  thisMenu[OptCnt++] = new subMenu('Rates','http://www.spottek.ca/Rates.html');
}

// Contact
if (page=='Contact') {
  OptCnt = 0;
  thisMenu = new Array();
  thisMenu[OptCnt++] = new subMenu('Contact','Contact.html');
}

// Tutorials
if (page=='Tutrls') {
  OptCnt = 0;
  thisMenu = new Array();
  thisMenu[OptCnt++] = new subMenu('Tutrls','Tutrls.html');
}

// Links
if (page=='Links') {
  OptCnt = 0;
  thisMenu = new Array();
  thisMenu[OptCnt++] = new subMenu('Links','Links.html');
}

q_loaded=true;

