/*
 * Name:	Dynamic Image Menu
 * Author:	Matthew Lesko (mlesko@pavstudios.com)
 * Date:	April 2, 2003
 */

// Resolve the document name  
var sLoc=String(this.location); 
sLoc=sLoc.split("/"); 
sLoc=sLoc[sLoc.length-1].split("."); 
sLoc=sLoc[sLoc.length-2];
		  
// Menu building function 
function DynamicImgMenu() {
  // Loop throught the link array on the calling document
  for(var i=0; i<aLinkItems.length; i++) {
			  
	// If the current link item is for the currently loaded document
	if(sLoc == aLinkItems[i].split(":")[0]) {
	  // Write the current document link image with no anchor tag and the proper buton image
	  // If the link item is of the type 'link'
	  if (aLinkItems[i].split(":")[4] == 'link') {
		// Write the link to the document
		document.write('<img name="' +aLinkItems[i].split(":")[1]+ '" src="/img/BTN_S.jpg" width=17 height=15><img src="/img/Nav_' +aLinkItems[i].split(":")[1]+ '.jpg" width=165 height=15>');
	  }
	  // If the link type is anything else assume its type 'sub'
	  else {
		// Write the sub link to the document 
		document.write('<img scr="/img/Spacer.gif" width=17 height=1><img name="' +aLinkItems[i].split(":")[1]+ '" src="/img/BTN_S.jpg" width=17 height=15><img src="/img/Nav_' +aLinkItems[i].split(":")[1]+ '.jpg" width=165 height=15');
	  }
	  
	}
	// Otherwise the link item is for a different document
	else {
	  // If the link item is of the type 'link'
	  if (aLinkItems[i].split(":")[4] == 'link') {
		// Write the link to the document
		document.write('<img name="' +aLinkItems[i].split(":")[1]+ '" src="/img/BTN_N.jpg" width=17 height=15><a href="' +aLinkItems[i].split(":")[3]+ '" onMouseOver="MM_swapImage(&quot;' +aLinkItems[i].split(":")[1]+ '&quot;,&quot;&quot;,&quot;/img/BTN_H.gif&quot;,1)" onMouseOut="MM_swapImgRestore()"><img src="/img/Nav_' +aLinkItems[i].split(":")[1]+ '.jpg" width=165 height=15 border=0 alt="' +aLinkItems[i].split(":")[2]+ '"></a>');
	  }
	  // If the link item is of the type 'area'
	  else if (aLinkItems[i].split(":")[4] == 'area') {
		// Write the area lable to the document
		document.write('<img name="' +aLinkItems[i].split(":")[1]+ '" src="/img/BTN_D.jpg" width=17 height=15><img src="/img/Nav_' +aLinkItems[i].split(":")[1]+ '.jpg" width=165 height=15">');
	  }
	  // If the link type is anything else assume its type 'sub'
	  else {
		// Write the sub link to the document 
		document.write('<img scr="/img/Spacer.gif" width=17 height=1><img name="' +aLinkItems[i].split(":")[1]+ '" src="/img/BTN_N.jpg" width=17 height=15><a href="' +aLinkItems[i].split(":")[3]+ '" onMouseOver="MM_swapImage(&quot;' +aLinkItems[i].split(":")[1]+ '&quot;,&quot;&quot;,&quot;/img/BTN_H.gif&quot;,1)" onMouseOut="MM_swapImgRestore()"><img src="/img/Nav_' +aLinkItems[i].split(":")[1]+ '.jpg" width=165 height=15 border=0 alt="' +aLinkItems[i].split(":")[2]+ '"></a>');
	  }
	}
	// Write seperator line
	document.write('<br><br><br><img src="/img/Nav_Seperator.jpg" width=185 height=3><br><br><br><br><br>');
  }
}
		  
// Call the menu building function 
DynamicImgMenu();
