


































 
 
 
 
 
























	



	



	




	



	



	












	




	




	






	




	




	





	





	






	

 





	






	






	







	



	



	






	






	









// *** CROSS-BROWSER COMPATIBILITY ***

var isDOM = (document.getElementById ? true : false); 
var isIE4 = ((document.all && !isDOM) ? true : false);
var isNS4 = (document.layers ? true : false);
var isDyn = (isDOM || isIE4 || isNS4);


function getRef(id)
{
 if (isDOM) return document.getElementById(id);
 if (isIE4) return document.all[id];
 if (isNS4) return document.layers[id];
}

function getSty(id)
{
 return (isNS4 ? getRef(id) : getRef(id).style);
} 





var popTimer = 0; 


var litNow = new Array();

function popOver(menuNum, itemNum)
{
 clearTimeout(popTimer);

 
 hideAllBut(menuNum);

 
 litNow = getTree(menuNum, itemNum);
 changeCol(true);

 
 targetNum = menu[menuNum][itemNum].target;
 if (targetNum > 0)
 {
  
  thisX = parseInt(menu[menuNum][0].ref.left) + parseInt(menu[menuNum][itemNum].ref.left);
  thisY = parseInt(menu[menuNum][0].ref.top) + parseInt(menu[menuNum][itemNum].ref.top);

  
  with (menu[targetNum][0].ref)
  {
   left = thisX + menu[targetNum][0].x;
   top = thisY + menu[targetNum][0].y;
   visibility = 'visible';
  }
 }
}

function popOut(menuNum, itemNum)
{
 
 if ((menuNum == 0) && !menu[menuNum][itemNum].target) hideAllBut(0);
 else popTimer = setTimeout('hideAllBut(0)', 500);
}

function popClick(menuNum, itemNum)
{
 with (menu[menuNum][itemNum])
 {
  switch (type)
  {
   
   case 'js:': { eval(href); break }
   
   case '': type = 'window';
   default: if (href) eval(type + '.location.href = "' + href + '"');
  }
 }

 
 hideAllBut(0);
}


function getTree(menuNum, itemNum)
{


 itemArray = new Array(menu.length);

 while(1)
 {
  itemArray[menuNum] = itemNum;
  
  if (menuNum == 0) return itemArray;
  itemNum = menu[menuNum][0].parentItem;
  menuNum = menu[menuNum][0].parentMenu;
 }
}


function changeCol(isOver)
{
 
 for (count = 0; count < litNow.length; count++)
 {
  // If item number is present, change its colour.
  if (litNow[count])
  {
   
   with (menu[count][0]) with (menu[count][litNow[count]])
   {
    newCol = isOver ? overCol : backCol;

    
    if (isNS4) ref.bgColor = newCol;
    else ref.backgroundColor = newCol;
   }
  }
 }
}

function hideAllBut(menuNum)
{
 
 var keepMenus = getTree(menuNum, 1);

 
 for (count = 0; count < menu.length; count++)
  if (!keepMenus[count] && menu[count]) menu[count][0].ref.visibility = 'hidden';

 
 changeCol(false);
}





function Menu(isVert, popInd, x, y, width, pad, overCol, backCol, borderClass, textClass)
{
 
 this.isVert = isVert;
 // The popout indicator used (if any) for this menu.
 this.popInd = popInd
 
 this.x = x;
 this.y = y;
 this.width = width;
 this.pad = pad;
 
 this.overCol = overCol;
 this.backCol = backCol;
 
 this.borderClass = borderClass;
 this.textClass = textClass;
 
 this.parentMenu = null;
 this.parentItem = null;
 
 this.ref = null;
}

function Item(text, href, type, length, spacing, target)
{

//Make sure it's not possible to return a null value for a length

 this.text = text;
 this.href = href;
 this.type = type;
 this.length = length;
 this.spacing = spacing;
 this.target = target;
 
 this.ref = null;
}

function createMenus()
{
 if (!isDyn) return;

 
 for (currMenu = 0; currMenu < menu.length; currMenu++)
 if (menu[currMenu]) with (menu[currMenu][0])
 {
  
  var str = '', itemX = 0, itemY = 0; topPad = 2;

  
  if (isNS4) pad++;

  
  for (currItem = 1; currItem < menu[currMenu].length; currItem++) with (menu[currMenu][currItem])
  {
   var itemID = 'menu' + currMenu + 'item' + currItem;

   
   var shrink = (borderClass && isDOM && !document.all ? 2 : 0)
   var w = (isVert ? width : length) - shrink;
   var h = (isVert ? length : width) - shrink;


   
   if (isDOM || isIE4)
   {
    str += '<div id="' + itemID + '" style="position: absolute; left: ' + itemX +
     '; top: ' + itemY + '; width: ' + w + '; height: ' + h + '; visibility: inherit; ';
    if (backCol) str += 'background: ' + backCol;
    str += '" ';
   }
   if (isNS4)
   {
    str += '<layer id="' + itemID + '" left="' + itemX + '" top="' + itemY + '" width="' + 
     w + '" height="' + h + '" visibility="inherit" ';
    if (backCol) str += 'bgcolor="' + backCol + '" ';
   }
   if (borderClass) str += 'class="' + borderClass + '" ';
   
   
   str += 'onMouseOver="popOver(' + currMenu + ',' + currItem + ')" onMouseOut="popOut(' +
     currMenu + ',' + currItem + ')" onClick="popClick(' + currMenu + ',' + currItem + ')">';


   

   if (target > 0)
   {
    
    menu[target][0].parentMenu = currMenu;
    menu[target][0].parentItem = currItem;
    
	   
	
    
    if (popInd)
    {
     if (isNS4) str += '<layer class="' + textClass + '" left="'+ (w - 15) + '" top="' +
      topPad + '">' + popInd + '</layer>';
     else str += '<div class="' + textClass + '" style="position: absolute; left: ' + (w - 15) +
      '; top: ' + topPad + '">' + popInd + '</div>';
    }
   }

   

   if (isNS4) str += (borderClass ? '<spacer type="block" width="' + (w - 8) + '" height="' +
    (h - 8) + '">' : '') +
    '<layer left="' + pad + '" top="' + topPad + '" width="' + (w - (2 * pad)) + '" height="' +
    (h - (2 * pad)) + '"><a class="' + textClass + '" href="#" ' +
    'onClick="popClick(' + currMenu + ',' + currItem + '); return false" ' +
    'onMouseOver="status=\'\'; return true;">' + text  + '</a></layer>';

   

   else str += '<div class="' + textClass + '" style="position: absolute; left: ' + pad +
    '; top: ' +topPad + '; width: ' + (w - (2 * pad)) + '; height: ' + (h - (2 * pad)) +
    '">' +  text + '</div>';



   
   str += (isNS4 ? '</layer>' : '</div>');

   
   if (isVert) itemY += length + spacing - 1;
   else itemX += length + spacing - 1;

  
  }



 
   
  
  if (document.all)
  {
   

   document.body.insertAdjacentHTML('beforeEnd', '<div id="menu' + currMenu + 'div" ' +
    'style="position: absolute; width: 3; height: 3; visibility: hidden; z-index: 1000">' +
     str + '</div>');
   ref = getSty('menu' + currMenu + 'div');
  }
  
  else if (isDOM)
  {
   var newDiv = document.createElement('div');
   document.body.appendChild(newDiv);
   newDiv.innerHTML = str;
   ref = newDiv.style;
    
   ref.position = 'absolute';
   ref.visibility = 'hidden';
  }
  
  else if (isNS4)
  {
   ref = new Layer(0);
   ref.document.write(str);
   ref.document.close();
  }

  
  ref.left = x;
  ref.top = y;
  
  if (!isNS4) ref.cursor = (document.all ? 'hand' : 'pointer');
  
  if (!document.all) ref.zIndex = 1000;

  
  for (currItem = 1; currItem < menu[currMenu].length; currItem++)
  {
   itemName = 'menu' + currMenu + 'item' + currItem;
   if (isDOM || isIE4) menu[currMenu][currItem].ref = getSty(itemName);
   if (isNS4)
   {
    menu[currMenu][currItem].ref = ref.document[itemName];
    
    with (ref.document[itemName])
    {
     document.captureEvents(Event.CLICK);
     document.onclick = new Function('popClick(' + currMenu + ', ' + currItem + ')');
    }
   }
  }

 
 }

 
resizeHandler();

 
 menu[0][0].ref.visibility = 'visible';
}




var menu = new Array();



var defOver = '#336699';
var defBack = '#003366';


var defLen = 200;








  
    
	
menu[0] = new Array();


menu[0][0] = new 
Menu(false, '', 0, 81, 24, 8, '#999999', '', '', 'itemText2'); //#006666

    
	
	  
  

  

  
	
	menu[0][1] = new Item('About EMAC' , '', '', 100, 0, 4);
		

  
  
  
  
  




    
	
	  
  

  

  
	
	menu[0][2] = new Item('Protected Resources' , '', '', 150, 0, 139);
		

  
  
  
  
  




    
	
	  
  

  

  
	
	menu[0][3] = new Item('Mutual Aid Resources' , '', '', 140, 0, 140);
		

  
  
  
  
  




    
	
	  
  

  

  
	
	menu[0][4] = new Item('Training & Education' , '', '', 150, 0, 5);
		

  
  
  
  
  




    
	
	  
  

  

  
	
		menu[0][5] = new Item('Calendar' , 'http://www.emacweb.org/Dynamic/Calendar/index.cfm', '', 100, 0, 0); //Deflen
	
  
  
  
  
  




  
    
	
menu[4] = new Array();







	
	menu[4][0] = new Menu(true, '<img src=../../../../../arrow3.gif vspace=2 width=5  Height=9>', 0, 24,  200, 10, defOver, defBack, 'itemBorder', 'itemText');
	

    
	
	  
  

  

  
	
		menu[4][1] = new Item('What Is EMAC?', 'http://www.emacweb.org?9', '', 20, 0, 0);
	
  
  
  
  
  




    
	
	  
  

  

  
	
		menu[4][2] = new Item('EMAC & Mutual Aid History', 'http://www.emacweb.org?321', '', 20, 0, 0);
	
  
  
  
  
  




    
	
	  
  

  

  
	
		menu[4][3] = new Item('How Does EMAC Work?', 'http://www.emacweb.org/?142', '', 20, 0, 0);
	
  
  
  
  
  




    
	
	  
  

  

  
	
		menu[4][4] = new Item('Who Administers EMAC?', 'http://www.emacweb.org/?143', '', 20, 0, 0);
	
  
  
  
  
  




    
	
	  
  

  

  
	
		menu[4][5] = new Item('EMAC Legislation', 'http://www.emacweb.org?13', '', 20, 0, 0);
	
  
  
  
  
  




    
	
	  
  

  

  
	
		menu[4][6] = new Item('EMAC FAQ', 'http://www.emacweb.org?10', '', 20, 0, 0);
	
  
  
  
  
  




    
	
	  
  

  

  
	
		menu[4][7] = new Item('Intellectual Property Policy', 'http://www.emacweb.org?1853', '', 20, 0, 0);
	
  
  
  
  
  




  
    
	
menu[5] = new Array();







	
	menu[5][0] = new Menu(true, '<img src=../../../../../arrow3.gif vspace=2 width=5  Height=9>', 0, 24,  200, 10, defOver, defBack, 'itemBorder', 'itemText');
	

    
	
	  
  

  

  
	
		menu[5][1] = new Item('Education Materials', 'http://www.emacweb.org?306', '', 20, 0, 0);
	
  
  
  
  
  




    
	
	  
  

  

  
	
		menu[5][2] = new Item('EMAC Training Courses', 'http://www.emacweb.org?304', '', 20, 0, 0);
	
  
  
  
  
  




    
	
	  
  

  

  
	
		menu[5][3] = new Item('Media Kit', 'http://www.emacweb.org?576', '', 20, 0, 0);
	
  
  
  
  
  




  
    
	
menu[139] = new Array();







	
	menu[139][0] = new Menu(true, '<img src=../../../../../arrow3.gif vspace=2 width=5  Height=9>', 0, 24,  200, 10, defOver, defBack, 'itemBorder', 'itemText');
	

    
	
	  
  

  

  
	
		menu[139][1] = new Item('EMAC Advisory Group', 'http://www.emacweb.org/dynamic/sitaware/event_listing.cfm', '', 20, 0, 0);
	
  
  
  
  
  




    
	
	  
  

  

  
	
		menu[139][2] = new Item('EMAC Operations Support', 'http://www.emacweb.org?325', '', 20, 0, 0);
	
  
  
  
  
  




    
	
	  
  

  

  
	
		menu[139][3] = new Item('Notice and Reporting Systems', 'http://www.emacweb.org?325', '', 20, 0, 0);
	
  
  
  
  
  




    
	
	  
  

  

  
	
		menu[139][4] = new Item('State Contacts and Documents', 'http://www.emacweb.org/Dynamic/Member_Resources/index.cfm', '', 20, 0, 0);
	
  
  
  
  
  




    
	
	  
  

  

  
	
		menu[139][5] = new Item('EMAC Emergency Contacts', 'http://www.emacweb.org?777', '', 20, 0, 0);
	
  
  
  
  
  




    
	
	  
  

  

  
	
		menu[139][6] = new Item('EMAC Operations Manual', 'http://www.emacweb.org?308', '', 20, 0, 0);
	
  
  
  
  
  




    
	
	  
  

  

  
	
		menu[139][7] = new Item('Forms and Checklists', 'http://www.emacweb.org?325', '', 20, 0, 0);
	
  
  
  
  
  




    
	
	  
  

  

  
	
		menu[139][8] = new Item('EMAC ETF Protocols', 'http://www.emacweb.org?398', '', 20, 0, 0);
	
  
  
  
  
  




    
	
	  
  

  

  
	
		menu[139][9] = new Item('LSR Duties & Responsibilities', 'http://www.emacweb.org?1488', '', 20, 0, 0);
	
  
  
  
  
  




  
    
	
menu[140] = new Array();







	
	menu[140][0] = new Menu(true, '<img src=../../../../../arrow3.gif vspace=2 width=5  Height=9>', 0, 24,  200, 10, defOver, defBack, 'itemBorder', 'itemText');
	

    
	
	  
  

  

  
	
		menu[140][1] = new Item('EMAC Dictionary', 'http://www.emacweb.org?565', '', 20, 0, 0);
	
  
  
  
  
  




    
	
	  
  

  

  
	
		menu[140][2] = new Item('FEMA and NIMS', 'http://www.emacweb.org?624', '', 20, 0, 0);
	
  
  
  
  
  




    
	
	  
  

  

  
	
		menu[140][3] = new Item('Mission Ready Packages ', 'http://www.emacweb.org?1555', '', 20, 0, 0);
	
  
  
  
  
  




    
	
	  
  

  

  
	
		menu[140][4] = new Item('State Missions', 'http://www.emacweb.org/Dynamic/NonMember_Resources/index.cfm', '', 20, 0, 0);
	
  
  
  
  
  




    
	
	  
  

  

  
	
		menu[140][5] = new Item('Model Intrastate Legislation', 'http://www.emacweb.org?150', '', 20, 0, 0);
	
  
  
  
  
  



window.onload = createMenus;
window.onresize = resizeHandler;




var popOldWidth = window.innerWidth;
function resizeHandler()
{
 
 if (!menu[0][0].ref) return;
 
 if (isNS4 && popOldWidth != window.innerWidth) location.reload()

 

var winWidth = (document.all ? document.body.clientWidth : window.innerWidth)
if (winWidth > 760) {menu[0][0].ref.left = (winWidth / 2) - 340};
 

}




function colItem(text, href, type, length, spacing, overCol, backCol, target)
{
 this.text = text;
 this.href = href;
 this.type = type;
 this.length = length;
 this.spacing = spacing;
 this.overCol = overCol;
 this.backCol = backCol;
 
 this.target = target;
 this.ref = null;
}



moveRoot = new Function('with(menu[0][0].ref) left = ((parseInt(left) < 100) ? 100 : 5);');

		

