// JavaScript Document

/********************************************************
- Script is a modified version of that found in 
  the O'Reilly _JavaScript and DHTML Cookbook_ by Danny Goodman.
- Script modifications by Josef Cook are (c) Assembly Studio, 2004.
- This script may be used in whole or in part so long as 
  this notice is left intact.
********************************************************/

var trailMenu = new Object( );
	trailMenu["About"] = "About Our Company";
		trailMenu["Employ"] = "Employment";
		trailMenu["Policies"] = "Company Policies";
	trailMenu["Contact"] = "Contact Information";
	trailMenu["Cabling"] = "Cabling Home";
		trailMenu["Cbl-Gallery"] = "Cabling Images";
	trailMenu["Business"] = "Business Home";
		trailMenu["CreditUnions"] = "Credit Union Services";
		trailMenu["Busn-Gallery"] = "Business Images";
	trailMenu["Satellite"] = "Satellite Home";
	trailMenu["GSA"] = "GSA Home";
	trailMenu["CISV"] = "CISV Home";
	trailMenu["Secure"] = "Login Page";
	trailMenu["www.automated-tech.com"] = "TestServer";
	trailMenu["ADTTest"] = "Local Folder";

function makeTrailMenu( ) {
	var parseStart, volDelim, parseEnd;
	var output = "<div class='Breadcrumbs'>";
	var path = location.pathname;
	var separator = "&nbsp;&sect;&nbsp;";
	var re = /\\/g;
	path = path.replace(re, "/");
	var trail = location.protocol + "//" + location.hostname;
	var leaves = path.split("/");
	if (location.protocol.indexOf("file") != -1) {
		parseStart = 1;
		volDelim = "/";
	} else {
		parseStart = 0;
		volDelim = "";
	}
	if (leaves[leaves.length - 1] == ""){
		parseEnd = leaves.length - 1;
	} else {
		parseEnd = leaves.length - 1;
	}
	for (var i = parseStart; i <= parseEnd; i++) {
		if (i == parseStart) {
			trail += "/" + leaves[i] + volDelim;
			output += "<a href='" + trail + "' onMouseOver='window.status=\"Automated Digital Technologies Home\"; return true' onMouseOut='window.status=\"Automated Digital Technologies: Taming Technology for the Business World.\"; return true'>";
			output += "Home";
		} else if (i == parseEnd) {
			output += document.title;
			separator = "";
		} else {
			separator = "&nbsp;&sect;&nbsp;";
			trail += leaves[i] + "/";
			if (leaves[i] == "index.htm" || leaves[i] == "Sections" || leaves[i] == "default.htm" || leaves[i] == "default.asp") {
				separator = "";
				output += "<a name='blank'>";
			} else {
				output += "<a href='" + trail + "' onMouseOver='window.status=this.name; return true' onMouseOut='window.status=\"Automated Digital Technologies: Taming Technology for the Business World.\"; return true' name='" + trailMenu[leaves[i]] + "'>";
				output += trailMenu[leaves[i]];
			}
		}
		output += "</a>" + separator;
	}
	output += "</div>";
	return output;
}