
/* menu Item Objects */
function menuItem(key,label,level,url,desc) {
  this.key = key; 	   /* a set of keywords controlling what appears where, i.e. matching that of the page defined in document.key property */
  this.label = label; /* the hyperlink text */
  this.level = level; /* is 1,2,3, etc; hierarchical level or depth (for sitemap mostly) */
  this.desc = desc;
  if (url.indexOf("://")>0) { this.url = url; }
    else { this.url = document.homepath + url; };
  this.linkOn = hLinkOn; /* function def for this object, see horizontal menu for function def */ 
  this.navigateOn = hNavigateOn;  /* idem */   
  this.topic = document.topic;	 /* inherit the current topic */
    /* register this object into menu list (the list expands automatically) */
    document.menuList[document.menuList.length] = this ;
};			   

/* this sub-function called by menuTopic.placeAnchor() will place anchors into to S-type
documents and allows the Yahoo-style path to point to it from any I-type page */ 
function _placeAnchor() {
  wLabel = new String(this.label);
  document.write(wLabel.anchor(wLabel.replace(/ +/gi, "_"))); /* substitute all white spaces by _ */
};

/* used for providing a title to a set of articles */
function menuTopic(key,label,level) {
  this.key = key;
  this.label = label; /* is also the topic name */
  this.level = level;
  this.topic = "TOPIC";
  this.url = "." ;  
  this.placeAnchor = _placeAnchor ;
  this.moveOn = hMoveOn ;
	/* assign the global topic so that menuItem objects declared after it would inherit its value */
	document.topic = this.label;
	/* register also topics into the document menuList */
	document.menuList[document.menuList.length] = this ;
};

/* TEMPLATE */

/*tTestLab = new menuTopic("Home testLab","Web Dev Test Lab",1); 

	iObject1 = new menuItem("testLab","Standard I-type page template",1,"_page_templates/type_I_template.html","Sample Description.");

	iObject2 = new menuItem("testLab","Menu Object 2 label",1, "_page_templates/undefined.html","Some second description.");

	iGlobalMenuMatrix = new menuItem("Home testLab", "Global Menu Listing", 2 , "_page_templates/GlobalMenuMatrix.html", "Dump of the Document Menu List");

tTopic2 = new menuTopic("Home key1 key2 key3","Topic TWO Label",1); 
    // registering an existing page under a distinct topic as well
	iObject3 = new menuItem("key3", iObject1.label, 2 , "_page_templates/type_I_template.html", "Case of an item under alternate topic");*/


/* CONCEPTS (Theory & concepts) */

tIntDefs = new menuTopic("Cncpts Home","Integration Definitions",1); 

	iIntLvs = new menuItem("Home ","Integration Levels",1,"concepts/_01_IntLvs.html","I distinguish four integration levels, ranging  from Software Components integration to Trading Partners interconnection.");


/* METHODS */

tSOAMethods = new menuTopic("Methods Home","SOA Methodologies",1); 

	iPraxIntro = new menuItem("Home","Introducing PRAXEME",1,"methods/_01_PraxIntro.html","A comprehensive introduction to PRAXEME, the only one method capable of designing Services in SOA by derivation from business modeling activities, in place of the usual best practices and heuristics.");

/* CHECKLISTS */

/* THINK TANK */
tExtInspir = new menuTopic("MyStory ArtExpl Home","External Inspiration", 1); 
	iEWDijkstra = new menuItem("MyStory ArtExpl Home","E.W.Dijkstra didn't know he spoke so well about integration",1, "thinktank/_01_EWDijkstra.html", "E.W. Dijkstra (1932-2002) was a pioneer of the computing sciences. In the seventies he was not talking about Integration itself, but about the developments of Programming as a discipline. Twenty-five years later, the parallelism is compelling.");

/* CONTACT */
tAbAuthor = new menuTopic("Home MyStory MyComputers EdiscWPs ArtExpl","About the author", 1); 
	iMyStory = new menuItem("MyComputers EdiscWPs ArtExpl","A brief history of my career",1, "contact/MyStory.html", "My professional history starts with the first 8 bit microprocessors and continues in the virtual computing environments of today. I have been the father of an original software product line that has been successfully delivered to many Value Added Network operators in the world. My major activities today are about integration projects, consulting on architectures, and auditing.");
		iMyComputers = new menuItem("MyStory","My first computers in pictures",2, "contact/MyComputers.html", "In 1981 if you wanted a personal computer, you could purchase a Commodore or an Amiga, else microchips in electronic component stores and a soldering iron. I did the later.");
		iEdiscWPs = new menuItem("MyStory","Old white papers of an original software product line",2, "contact/EdiscWPs.html","Sample white papers describing the original EDI software product line of which I was the father. It had been used by prestigious companies worldwide. A few sites are still in operation.");
		iLogoExpl = new menuItem("MyStory ArtExpl","Art of e.Biz name and logo explained",2,"contact/LogoExpl.html","My curious company name and logo may be worth an explanation, as it is not by accident.");
	iArtExpl = new menuItem("MyStory Home","Why I called this site the &quot;Art&quot; of...",1,"contact/ArtExpl.html","I have no conceit in calling this site the &quot;Art&quot; of Integration. Just the reverse: it lacks the strength of a science. Moreover, it's only about &quot;art&quot;ifacts, isn't it?");

		
/* ************************************************************************************************* */
/* Display topics and menu items */	
	
/* write the labels as quick link menu into H and I type pages that bear a matching key */

if (document.type != "S") {

	document.write("<i>Shortcuts</i><BR>");
		
	for (i=0; i<document.menuList.length; i++ ) { 
		itemTopic = document.menuList[i].topic;
	    /* skip horizontal menu items also in document menu list */
		if ((itemTopic == "SECTION")||(itemTopic == "EXTERNAL")) continue;
		
		itemURL = document.menuList[i].url;
		itemKey = document.menuList[i].key;
		itemLabel = document.menuList[i].label;
		
		if ( (document.type != "S")&&( itemKey.indexOf(document.key) >= 0 ) ) {
		   if (itemTopic == "TOPIC") {
			/* Topics */
			/* find the relevant section URL and anchor */
			/* defaults: */ sectionPath = "."; targetAnchor = itemLabel.replace(/ +/gi, "_");
			for (j=i+1; j<document.menuList.length; j++ ) { 
				if (document.menuList[j].topic == itemLabel) {
					workURL = document.menuList[j].url;
					sectionPath = workURL.substring(0,workURL.lastIndexOf("/"));
					sectionPath = sectionPath.concat("/_00_section.html");
					break;
				};
			};
			document.write("<br><a class=\"topicmenu\" href=\"" 
			+ sectionPath + "#" + targetAnchor + "\" >" + itemLabel + "</a><BR>");
			}
			else {
			/* menu Items */
			document.write("<a class=\"smallmenu\" href=\"" + itemURL + "\">" + itemLabel + "</a><BR>");
			};
		}; /* end if */
	}; /* end for */
};

if (document.type == "I") {		
	document.write("<br><a class=\"smallmenu\" href=\"../copyright.html\"><i>Copyright &amp; Disclaimer</i></a>");
};

/* end of vertical menu */

