function init() { 			
	var divStuff = "";
	
	for (i=1; i<=navNum; i++) {
				
		var layerInfo = eval("nav" + i);
		
		// if top level nav contains 2nd level links, build <div>'s for layers
		if (layerInfo.length > 1) { 
		
			if (IE && !IE6) {
				// start the div container
				divStuff = 	'<div id="navLay' + i + '">';				
				
				// start the table
				divStuff += '<table border="0" cellpadding="3" cellspacing="1" class="dkBlue">';
				
				// each link
				var k=0;
				for (j=0; j<(layerInfo.length-2)/2; j++) { 
				
                    divStuff += '<tr><td class="ltBlue"><a href="' + layerInfo[2+k] + '" class="lnav' + i + '">' + layerInfo[3+k] + '</a></td></tr>';
					k = k+2;
				}
				
				// end the table
				divStuff += '</table>';
				// end the div container
                divStuff += '</div>';
							
				document.write(divStuff);

				var layerObj = eval("navLay" + i);
				
				layerObj.style.position = "absolute";
				layerObj.style.visibility = "hidden";
				layerObj.style.pixelLeft = layerInfo[0];
				layerObj.style.pixelTop  = layerInfo[1];
				
			}
			
			if (N6 || IE6) {
				
				divID = document.createElement("DIV");
				divID.id = "navLay" + i;

				// main table
				tableEl = 	document.createElement("TABLE");
							tableEl.border = 0;
							tableEl.cellPadding = 3;
							tableEl.cellSpacing = 1;
							tableEl.className = "dkBlue";
				tbodyEl = document.createElement("TBODY");
				
				// generate the table rows with links
				
    			var k=0;
				for (j=0; j<(layerInfo.length-2)/2; j++) { 				
				
					trEl = 	document.createElement("TR");
					
					// TD with hypertext link with rollover
					tdEl = 	document.createElement("TD");
							tdEl.className = "ltBlue";
					aEl = 	document.createElement("A");
							aEl.href = layerInfo[2+k];
							aEl.className = "lnav";
							aEl.setAttribute ("class","lnav");
					aTxt =	document.createTextNode(layerInfo[3+k]);
					aEl.appendChild(aTxt);
					tdEl.appendChild(aEl);
					trEl.appendChild(tdEl);
					// -----------------------------

					k = k+2;
					tbodyEl.appendChild(trEl);
				}

              	// add TBODY collection of TRs to TABLE
				tableEl.appendChild(tbodyEl);
				// add TABLE to layer
				divID.appendChild(tableEl);
				// add layer to document
				document.body.appendChild(divID);
				
				// turn layer off and position it...
				divID.style.position = "absolute"; 
				divID.style.visibility = "hidden";
				divID.style.left = N6 ? layerInfo[0] + "px" : layerInfo[0];
				divID.style.top  = N6 ? layerInfo[1] + "px" : layerInfo[1];
				
			}

			if (NS4) {
				divStuff = '<layer name="navLay' + i + '" ' +
								'position="absolute" ' +
								'visibility="hide" ' +
								'top="' + layerInfo[1] + '" ' +
								'left="' + layerInfo[0] + '">';				
				
				// start the table
				divStuff += '<table border="0" cellpadding="3" cellspacing="1" class="dkBlue">';
				
				// each link
				var k=0;
				for (j=0; j<(layerInfo.length-2)/2; j++) { 

                    divStuff += '<tr><td class="ltBlue"><a href="' + layerInfo[2+k] + '" class="lnav' + i + '">' + layerInfo[3+k] + '</a></td></tr>';
					
					k = k+2;
				}

				// end the table
				divStuff += '</table>';
				// end the div
                divStuff += '</layer>';							   

				document.write(divStuff);
			}			

		}

	}
	loaded = true;
}

init();
