// JavaScript Document

// add even listener to create page heading outlines/shadows
if (window.addEventListener) {
	window.addEventListener('load', footerSetup, false);
} else if (window.attachEvent) {
	window.attachEvent('onload', footerSetup);
}

function footerSetup() {
	// get content of the bottom_nav
	// replicate
	theContent = document.getElementById('bottom_nav').innerHTML
	// remove comments, links and extra spaces
	theContent = theContent.replace(/<!--.*?-->/g, '');
	theContent = theContent.replace(/(^\s*|\s*$)/g, '');
	theContent = theContent.replace(/>\s*</g, '><');
	document.getElementById('bottom_nav').innerHTML = theContent;
	
	theContent = theContent.replace(/<\/?a [^>]*>/ig, '');
	
	//alert(theContent);
	
	// get footer element
	
	theFooter = document.getElementById('footer');
	//alert(theContent);
	for (i=0; i<4; i++) {
		newDiv = document.createElement('div');
		theId = 'bottom_nav_'+i;
		newDiv.setAttribute('id', theId);
		newDiv.innerHTML = theContent;
		XZ = 999-i;
		var Xtop;
		var Xleft;
		switch (i) {
			case 0:
				Xtop = '-1px';
				Xleft = '-1px';
				break;
			case 1: 
				Xtop = '-1px';
				Xleft = '1px';
				break;
			case 2:
				Xtop = '1px';
				Xleft = '1px';
				break;
			case 3:
				Xtop = '1px';
				Xleft = '-1px';
				break;
		}
		newDiv.style.position = 'relative';
		newDiv.style.width = '100%';
		newDiv.style.top = Xtop;
		newDiv.style.left = Xleft;
		newDiv.style.zIndex = XZ;
		newDiv.style.color = '#000000';
		theFooter.appendChild(newDiv);
	}
	
}

















// end of file