
// if (navigator.appName == 'Microsoft Internet Explorer') {
//   var nav= false; 
// }
// else {
//   var nav= true;
// }

//what browser have we got?

var browser='';

if (browser == ''){
  if (navigator.appName.indexOf('Microsoft') != -1){
       browser = 'IE'
  }
  else{
   browser = 'Netscape';
  }
}
//else if (navigator.appName.indexOf('Netscape') != -1){
  //browser = 'Netscape'
 //}
//}

function CursorPointer(){
  if (browser=='IE'){
     return "hand";
  }
  else{
    return "pointer";
  }
}

function File(name,href,bgcolor,fontcolor) {
  this.name = name;   // the name of the file to appear in the site map
  //this.type = "";   // image/binary/movie/text/sound/telnet/unknown/index
  this.href = href;          // initial path, built when adding nested objects
  this.bgcolor = bgcolor;
  this.fontcolor = fontcolor;
}

function Menu(name,ref,href,bgcolor,fontcolor,open,link,master) {
  this.name = name;   // the name of the file/menu to appear in the site map
  this.type = 'menu';
  //this.path = path; // initial path, built up when adding nested objects
  this.href=href;
  this.ref  = ref;    // reference to the object being constructed 
  this.link=link;
  this.master=master;
  if (!open){          // optional value indicating if object is open or closed
    this.open = false;
  }
  else{
    this.open = true;
  }
  this.index = 0;            // initial number of items in Contents
  this.Add = Add;            // Add is a Menu method e.g. Menu.Add()
  this.bgcolor = bgcolor;
  this.fontcolor = fontcolor;
  this.Contents = new Object();  // adds an empty built-in JavaScript Object
}

function Add(obj) {
  this.Contents[this.index++] = obj;
  //obj.path = this.path + '/' + obj.name;
}

function Show(obj) {
  if (obj.type == 'menu'){
    //var anchor = '<a href="' + obj.path + '" target="home" onclick="javascript:parent.OpenMenu(parent.' + obj.ref + ')"';
    //var anchor = '&nbsp;&nbsp;<a style="font-family:Arial;color:'+obj.fontcolor+';text-decoration:none" target="home" href="'+ obj.href + '" onclick="javascript:parent.OpenMenu(parent.' + obj.ref + ')"';
   if (obj.link=='no'){
    var anchor = '<b onmouseover=this.style.cursor="'+CursorPointer()+'" style="font-family:Arial;color:'+obj.fontcolor+';" onclick="javascript:parent.OpenMenu(parent.' + obj.ref + ')"';
    var terminator = '</b>';
   }
   else{
    var anchor = '<a style="font-family:Arial;color:'+obj.fontcolor+';text-decoration:none" target="home" href="'+ obj.href + '" onclick="javascript:parent.OpenMenu(parent.' + obj.ref + ','+obj.master+')"';
    var terminator = '</a>';
   }
  }
  else{
    var anchor = '&nbsp;&nbsp;<a style="font-family:Arial;color:'+obj.fontcolor+';text-decoration:none" href="' + 
                  obj.href + '" target="home"';
    var terminator = '</a>';
  }
    
  //anchor += ' onMouseover="window.status=\'' + obj.path + '\'; return true"';
  //anchor += ' onMouseout="window.status=\'\'; return true"
  anchor += '>';

  var output = '<table bgcolor="#DFDFDF" border="0" width="184" cellpadding="0" cellspacing="0" style="font-size:9pt;font-weight:700;font-family:Times New Roman;">' +
               '<tr bgcolor="'+obj.bgcolor+'" >' +
               '<td><font face="arial">' + anchor + obj.name + terminator;
               //'<td><font face="arial">' + anchor + obj.name + '</a>';
    
  if (obj.open){
    for (var i=0; i<obj.index; i++){
      output += Show(obj.Contents[i]);
    }
  }
  output += '</td></tr></table>';

  return output;
}

function ShowSiteMap() {
  var WholeMenu='<br style="font-size:4pt">' +
                Show(LabRootMenu) ; 
  return WholeMenu;
}

function OpenMenu(obj, master) {
 if (master != true){
  obj.open = !obj.open;
  window.left.location.href = window.left.location.href;
 }
}

LabRootMenu = new Menu('THE LABORATORY:','LabRootMenu','home.html','black','white',true,'yes',true);
AnalMenu = new Menu('&nbsp;&bull; Laboratory Services','AnalMenu','home.html','aqua','black',false,'no');
LabRootMenu.Add(AnalMenu);
SIRAMenu = new Menu('&nbsp;&nbsp;&nbsp;&nbsp;&bull; Stable Isotope Ratio Analysis','SIRAMenu','home.html','#DFDFDF','#033365',closed,'no');
AnalMenu.Add(SIRAMenu);
SIRAMenu.Add(new File('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; Carbon & Oxygen','analysis/SIRA/co.html','#DFDFDF','#444444'));
SIRAMenu.Add(new File('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; Hydrogen & Oxygen','analysis/SIRA/ho.html','#DFDFDF','#444444'));
SIRAMenu.Add(new File('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; Sulfur','analysis/SIRA/sulfur.html','#DFDFDF','#444444'));
KARMenu = new Menu('&nbsp;&nbsp;&nbsp;&nbsp;&bull; K-Ar Age Dating','KARMenu','analysis/kar.html','#DFDFDF','#033365',false,'yes');
AnalMenu.Add(KARMenu);
KARMenu.Add(new File('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; Sample Selection','analysis/kar.html#what','#DFDFDF','#444444'));
KARMenu.Add(new File('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; Methodology','analysis/kar.html#methodology','#DFDFDF','#444444'));
KARMenu.Add(new File('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; Recent Standards','analysis/kar.html#standard','#DFDFDF','#444444'));
KARMenu.Add(new File('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; References','analysis/kar.html#publications','#DFDFDF','#444444'));
//AnalMenu.Add(new File('&nbsp;&nbsp;&bull; Research Expertise','analysis/expertise.html','#DFDFDF','#033365'));
AnalMenu.Add(new File('&nbsp;&nbsp;&bull; Complete Price Guide','analysis/prices.html','#DFDFDF','#033365'));
AnalMenu.Add(new File('&nbsp;&nbsp;&bull; Publications','analysis/publications.html','#DFDFDF','#033365'));

ProMenu = new Menu('&nbsp;&bull; Research Projects','ProMenu','projects/index.html','#00D8EC','black',false,'yes');
LabRootMenu.Add(ProMenu);
//ProMenu.Add(new File('&nbsp;&nbsp;&bull; Available Projects','analysis/SIRA/index.html','#DFDFDF','#033365'));
//ProMenu.Add(new File('&nbsp;&nbsp;&bull; Ongoing Projects','analysis/SIRA/index.html','#DFDFDF','#033365'));
//ProMenu.Add(new File('&nbsp;&nbsp;&bull; Past Projects','analysis/SIRA/index.html','#DFDFDF','#033365'));
//ProMenu.Add(new File('&nbsp;&nbsp;&bull; Publications','analysis/SIRA/index.html','#DFDFDF','#033365'));

EquMenu = new Menu('&nbsp;&bull; Equipment','EquMenu','home.html','#00B4DA','black',false,'no');
LabRootMenu.Add(EquMenu);

MSMenu = new Menu('&nbsp;&nbsp;&bull; Mass Spectrometers','MSMenu','home.html','#DFDFDF','#033365',false,'no');
EquMenu.Add(MSMenu);
MSMenu.Add(new File('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; Laser CF-Isoprime','equipment/isoprime.html','#DFDFDF','#444444'));
MSMenu.Add(new File('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; Micromass 602E IRMS','equipment/602e.html','#DFDFDF','#444444'));
MSMenu.Add(new File('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; VG Gas Analysis 8-80 IRMS','equipment/880.html','#DFDFDF','#444444'));
EquMenu.Add(new File('&bull; Shared Facilities','equipment/shared.html','#DFDFDF','#033365'));
//SamMenu = new Menu('&nbsp;&nbsp;&bull; Shared Facilities','SamMenu','equipment/shared.html','#DFDFDF','#033365',false,'yes');
//EquMenu.Add(SamMenu);
//SamMenu.Add(new File('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; Rock Prep. Lab','equipment/rocklab.html','#DFDFDF','#444444'));
//SamMenu.Add(new File('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; Geochemistry Lab','equipment/geochem.html','#DFDFDF','#444444'));

PeoMenu = new Menu('&nbsp;&bull; People','PeoMenu','home.html','#0090C8','black',false,'no');
LabRootMenu.Add(PeoMenu);
PeoMenu.Add(new File('&nbsp;&nbsp;&bull; Assoc. Prof. Sue Golding','people/sue.html','#DFDFDF','#033365'));
PeoMenu.Add(new File('&nbsp;&nbsp;&bull; Dr. Miryam Glikson','people/miryam.html','#DFDFDF','#033365'));
PeoMenu.Add(new File('&nbsp;&nbsp;&bull; Dr. Tonguc Uysal','people/tonguc.html','#DFDFDF','#033365'));
PeoMenu.Add(new File('&nbsp;&nbsp;&bull; Kim Baublys','people/kim.html','#DFDFDF','#033365'));
PeoStuMenu = new Menu('&nbsp;&nbsp;&nbsp;&nbsp;&bull; Students','PeoStuMenu','people/students.html','#DFDFDF','#033365',false,'yes');
PeoMenu.Add(PeoStuMenu);

HisMenu = new Menu('&nbsp;&bull; History','HisMenu','home.html','#006CB6','white',false,'no');
LabRootMenu.Add(HisMenu);
HisMenu.Add(new File('&nbsp;&nbsp;&bull; 1960s','history/1960.html','#DFDFDF','#033365'));
HisMenu.Add(new File('&nbsp;&nbsp;&bull; 1970s','history/1970.html','#DFDFDF','#033365'));
HisMenu.Add(new File('&nbsp;&nbsp;&bull; 1980s','history/1980.html','#DFDFDF','#033365'));
HisMenu.Add(new File('&nbsp;&nbsp;&bull; 1990s','history/1990.html','#DFDFDF','#033365'));
HisMenu.Add(new File('&nbsp;&nbsp;&bull; 2000s','history/2000.html','#DFDFDF','#033365'));

LocMenu = new Menu('&nbsp;&bull; Location','LocMenu','location/index.html','#0048A4','white',false,'yes');
LabRootMenu.Add(LocMenu);

LinMenu = new Menu('&nbsp;&bull; Links','LinMenu','links/index.html','#002492','white',false,'yes');
LabRootMenu.Add(LinMenu);

ConMenu = new Menu('&nbsp;&bull; Contact Us','ConMenu','contact/index.html','#000080','white',false,'yes');
LabRootMenu.Add(ConMenu);

//IntRootMenu = new Menu('INTRANET:','IntRootMenu','intranet.html','black','white',open);
//NatMenu = new Menu('&nbsp;&bull; NATA ACCREDITATION','NatMenu','nata/index.html','#033365','white');
//IntRootMenu.Add(NatMenu);
//NatMenu.Add(new File('&nbsp;&nbsp;&bull; Goals','analysis/SIRA/index.html','#DFDFDF','#033365'));
//NatMenu.Add(new File('&nbsp;&nbsp;&bull; Guidelines','analysis/SIRA/index.html','#DFDFDF','#033365'));

//OHSMenu = new Menu('&nbsp;&bull; OH&S','OHSMenu','ohs/index.html','#033365','white');
//IntRootMenu.Add(OHSMenu);
//OHSMenu.Add(new File('&nbsp;&nbsp;&bull; Safety Procedures','analysis/SIRA/index.html','#DFDFDF','#033365'));
//OHSMenu.Add(new File('&nbsp;&nbsp;&bull; Emergency Procedures','analysis/SIRA/index.html','#DFDFDF','#033365'));
//OHSMenu.Add(new File('&nbsp;&nbsp;&bull; Emergency Equipment','analysis/SIRA/index.html','#DFDFDF','#033365'));
//OHSMenu.Add(new File('&nbsp;&nbsp;&bull; Risk Assessments','analysis/SIRA/index.html','#DFDFDF','#033365'));
//WPMenu = new Menu('&nbsp;&nbsp;&bull; Workplace Assessments','WPMenu','ohs/workplace/index.html','#DFDFDF','#033365');
//OHSMenu.Add(WPMenu);
//WPMenu.Add(new File('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; Management','analysis/KAR/methodology/index.html','#DFDFDF','#444444'));
//WPMenu.Add(new File('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; Training','analysis/KAR/methodology/index.html','#DFDFDF','#444444'));
//WPMenu.Add(new File('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; Work Environment','analysis/KAR/methodology/index.html','#DFDFDF','#444444'));
//WPMenu.Add(new File('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; Ergonomics','analysis/KAR/methodology/index.html','#DFDFDF','#444444'));
//WPMenu.Add(new File('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; Hygiene','analysis/KAR/methodology/index.html','#DFDFDF','#444444'));
//WPMenu.Add(new File('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; Protective Equipment','analysis/KAR/methodology/index.html','#DFDFDF','#444444'));
//WPMenu.Add(new File('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; Waste management','analysis/KAR/methodology/index.html','#DFDFDF','#444444'));
//WPMenu.Add(new File('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; Floors/Aisles','analysis/KAR/methodology/index.html','#DFDFDF','#444444'));
//WPMenu.Add(new File('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; Special Procedures','analysis/KAR/methodology/index.html','#DFDFDF','#444444'));
//WPMenu.Add(new File('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; Heat/Equip Hazards','analysis/KAR/methodology/index.html','#DFDFDF','#444444'));
//WPMenu.Add(new File('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; Electrical','analysis/KAR/methodology/index.html','#DFDFDF','#444444'));
//WPMenu.Add(new File('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; Procedures','analysis/KAR/methodology/index.html','#DFDFDF','#444444'));
//WPMenu.Add(new File('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; Chemicals','analysis/KAR/methodology/index.html','#DFDFDF','#444444'));
//WPMenu.Add(new File('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; Flammable Liquids','analysis/KAR/methodology/index.html','#DFDFDF','#444444'));
//WPMenu.Add(new File('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; Compressed Gases','analysis/KAR/methodology/index.html','#DFDFDF','#444444'));
//WPMenu.Add(new File('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; Corrosives','analysis/KAR/methodology/index.html','#DFDFDF','#444444'));
//WPMenu.Add(new File('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; Poisons','analysis/KAR/methodology/index.html','#DFDFDF','#444444'));
//WPMenu.Add(new File('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; BioHazards','analysis/KAR/methodology/index.html','#DFDFDF','#444444'));
//WPMenu.Add(new File('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; Radiation Hazards','analysis/KAR/methodology/index.html','#DFDFDF','#444444'));
//WPMenu.Add(new File('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; Teaching Areas','analysis/KAR/methodology/index.html','#DFDFDF','#444444'));
//WPMenu.Add(new File('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; Evacuation','analysis/KAR/methodology/index.html','#DFDFDF','#444444'));
//WPMenu.Add(new File('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; Fire Protection','analysis/KAR/methodology/index.html','#DFDFDF','#444444'));




//rootMenu.Add(new File('email.html','text','red','white'));
//rootMenu.Add(new File('index.html','index','red','white'));


