// ------------------- Menu User Set Variables (Global) ----------------//

var MenuWidth = 165;

var TimeOut = 250;

var linkClass = 'jumpLink';



// ------------------- Menu Wrapper ----------------//

var menuHead = '<table border="0" cellspacing="0" cellpadding="2" bgcolor="#424256"><tr><td>' +

'<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#BABAD0"><tr><td nowrap>';



var menuBreak = '<br><img src="' + ImageDir + '/whitespace.gif" width="' + MenuWidth + '" height="1" alt="" border="0"><br>';



var menuIndent = '&nbsp;&nbsp;&nbsp;&nbsp;';



var menuFoot = '</td></tr></table></td></tr></table>';



// ------------------- Menu Text ----------------//

var OverviewMenuText = '';


var HistoryMenuText = '';


var FAQsMenuText = '';


var WorkshopsMenuText = menuHead +
menuIndent + '<a href="/chemkin/montreal.html" class="' + linkClass + '"><span class="' + linkClass  +'">Montreal - 2008</span></a>' + menuBreak +

menuIndent + '<a href="/chemkin/heidelberg.html" class="' + linkClass + '"><span class="' + linkClass  +'">Heidelberg - 2006</span></a>' + menuBreak +

menuIndent + '<a href="/chemkin/chicago.html" class="' + linkClass + '"><span class="' + linkClass  +'">Chicago - 2004</span></a>' + menuBreak +

menuIndent + '<a href="/chemkin/sapporo.html" class="' + linkClass + '"><span class="' + linkClass  +'">Sapporo - 2002</span></a>' + menuBreak +

menuIndent + '<a href="/chemkin/edinburgh.html" class="' + linkClass + '"><span class="' + linkClass  +'">Edinburgh - 2000</span></a>' + menuBreak +

menuFoot;



var DocsMenuText = menuHead + 

menuIndent + '<a href="/chemkin/docs/AURORAabs.html" class="' + linkClass + '"><span class="' + linkClass  +'">AURORA</span></a>' + menuBreak +

menuIndent + '<a href="/chemkin/docs/CHEMKINabs.html" class="' + linkClass + '"><span class="' + linkClass  +'">CHEMKIN</span></a>' + menuBreak +

menuIndent + '<a href="/chemkin/docs/EQUILabs.html" class="' + linkClass + '"><span class="' + linkClass  +'">EQUIL</span></a>' + menuBreak +

menuIndent + '<a href="/chemkin/docs/OPPDIFabs.html" class="' + linkClass + '"><span class="' + linkClass  +'">OPPDIF</span></a>' + menuBreak +

menuIndent + '<a href="/chemkin/docs/PLUGabs.html" class="' + linkClass + '"><span class="' + linkClass  +'">PLUG</span></a>' + menuBreak +

menuIndent + '<a href="/chemkin/docs/SENKINabs.html" class="' + linkClass + '"><span class="' + linkClass  +'">SENKIN</span></a>' + menuBreak +

menuIndent + '<a href="/chemkin/docs/SHOCKabs.html" class="' + linkClass + '"><span class="' + linkClass  +'">SHOCK</span></a>' + menuBreak +

menuIndent + '<a href="/chemkin/docs/SURFACEabs.html" class="' + linkClass + '"><span class="' + linkClass  +'">Surface CHEMKIN</span></a>' + menuBreak +

menuFoot;




// ------------------- No Modifications Needed Beyond This Point ----------------//

// ------------------- Menu Script Set Variables ----------------//

Gecko = (document.getElementById);

NS4 = (document.layers);

IE4 = (document.all);

NS6=document.getElementById&&!document.all

V4 =  (Gecko || NS4 || IE4 || NS6);

GlobalLayer = "xx";

GlobalPointer = "xx";

TimerID = 0;

LoadDone = "No";



// ------------------- Active Image Function ----------------//

function img_active(imgName) {

  document[imgName].src = ImageDir + "/" + imgName + "-over.gif";

}



// ------------------- Inactive Image Function ----------------//

function img_inactive(imgName) {

  document[imgName].src = ImageDir + "/" + imgName + ".gif";

}



// ------------------- Menu Init function ----------//

function invokeMenu1(MenuID,ImgID,MenuText,leftPos,topPos) {

  if (V4) {

    if (NS4) {

      temp = '<layer onMouseOut="popOut(\'' + MenuID +'\',\'' + ImgID +'\');" onMouseOver="clearTimeout(TimerID); popUp(\'' + MenuID +'\',\'' + ImgID +'\');" id="' + MenuID +'" left="'+ leftPos +'" top="'+ topPos +'" width="152" visibility="hide" border="0">';

      if (MenuText != '') 

        temp = temp + MenuText;

      temp = temp +  '</layer>';

    } else { 

      temp = '<DIV onMouseOut="popOut(\'' + MenuID +'\',\'' + ImgID +'\');" onMouseOver="clearTimeout(TimerID); popUp(\'' + MenuID +'\',\'' + ImgID +'\');" ID="' + MenuID +'" STYLE="position:absolute; width:152px; border:0; z-index:10; left: '+leftPos+'px; top: '+topPos+'px; visibility: hidden">';

      if (MenuText != '') 

        temp = temp + MenuText;

      temp = temp +  '</DIV>';

    }

    document.write(temp);

  }

  return true;

}



// ------------------- Menu Display (pop-up) function -----------//

function popUp(LayerID, PointerID) {

  if (LoadDone == true) {

    clearTimeout(TimerID);

    if (GlobalLayer != "xx")

      popDown(GlobalLayer,GlobalPointer);



    if (V4) {

      if (NS4) {

        document.layers[LayerID].visibility = "show";

      } else if (Gecko) {

        document.getElementById(LayerID).style.visibility = 'visible';		

      } else {

        document.all[LayerID].style.visibility = "visible";

      }

    }



    if (PointerID != "xx")

      img_active(PointerID);



    GlobalLayer = LayerID;

    GlobalPointer = PointerID;

  }

}



// ------------------- Menu hide (pop-down) function -----------//

function popDown(LayerID, PointerID) {

  if (LoadDone == true){

    if (V4) {

      if (LayerID == "stub")

        LayerID = GlobalLayer;



      if (PointerID == "stub2")

        PointerID = GlobalPointer;



      if (PointerID == "")

        PointerID = GlobalPointer;



      if (PointerID != "xx")

        img_inactive(PointerID);



      if (NS4) {

        document.layers[LayerID].visibility = "hide";

      } else if (Gecko) {

        document.getElementById(LayerID).style.visibility = 'hidden';

      } else {

        document.all[LayerID].style.visibility = "hidden";

      }

    }

    GlobalLayer = "xx";  

    GlobalPointer = "xx";  

  }

}



// ------------------ Set Timeout on Menu ---------------------//

function popOut(LayerID,PointerID) {

  if (LoadDone == true){

    GlobalLayer = LayerID;

    GlobalPointer = PointerID;

    if (V4)

      TimerID = setTimeout("popDown('stub','stub2')",TimeOut);

  }	

}



if (V4) {

  invokeMenu1('OverviewMenu','Overview',OverviewMenuText,XOffset,YOffset);

  invokeMenu1('HistoryMenu','History',HistoryMenuText,XOffset,YOffset);
  
  invokeMenu1('FAQsMenu','FAQs',FAQsMenuText,XOffset,YOffset);
  
  invokeMenu1('WorkshopsMenu','Workshops',WorkshopsMenuText,XOffset,YOffset+MenuStep);

  invokeMenu1('DocsMenu','Documents',DocsMenuText,XOffset,YOffset+(MenuStep*2));

}



LoadDone=true;