var nav_CD101 = new Object();

nav_CD101.mouseoverBold="false";
nav_CD101.selectedBgcolor="";
nav_CD101.importedImageMouseOver="";
nav_CD101.numLinks="5";
nav_CD101.textColor="#FFFFFF";
nav_CD101.mouseoverBgcolor="";
nav_CD101.tabCategory="basic";
nav_CD101.border="";
nav_CD101.selectedItalic="false";
nav_CD101.graphicMouseover="true";
nav_CD101.type="Navigation";
nav_CD101.basicTab="White";
nav_CD101.horizontalSpacing="10";
nav_CD101.horizontalWrap="5";
nav_CD101.shinyButton="Shiny_Aqua";
nav_CD101.mouseoverEffect="true";
nav_CD101.modernButton="Basic_Black";
nav_CD101.orientation="vertical";
nav_CD101.funButton="Arts_and_Crafts";
nav_CD101.darkButton="Basic_Black";
nav_CD101.selectedTextcolor="#FFFFFF";
nav_CD101.lineWidth="2";
nav_CD101.mouseoverTextcolor="#633100";
nav_CD101.bold="true";
nav_CD101.texturedButton="Brick";
nav_CD101.accentStyle="Arrow";
nav_CD101.style="text";
nav_CD101.holidayButton="Christmas_Ornaments";
nav_CD101.textSize="11";
nav_CD101.lineColor="#000000";
nav_CD101.brightButton="Chicky";
nav_CD101.mouseoverUnderline="false";
nav_CD101.accentColor="Royal_Blue";
nav_CD101.imageHeight="";
nav_CD101.background="";
nav_CD101.textFont="Arial";
nav_CD101.hasLinks="true";
nav_CD101.sophisticatedButton="Antique";
nav_CD101.underline="false";
nav_CD101.simpleButton="Autumn_Leaves";
nav_CD101.italic="false";
nav_CD101.importedImageSelected="";
nav_CD101.basicButton="Gray";
nav_CD101.navID="nav_CD101";
nav_CD101.buttonCategory="basic";
nav_CD101.dirty="false";
nav_CD101.selectedBold="false";
nav_CD101.selectedEffect="true";
nav_CD101.graphicSelected="true";
nav_CD101.version="5";
nav_CD101.verticalSpacing="2";
nav_CD101.squareTab="Camel";
nav_CD101.mouseoverItalic="false";
nav_CD101.justification="left";
nav_CD101.imageWidth="";
nav_CD101.selectedUnderline="false";
nav_CD101.accentType="left";
nav_CD101.importedImage="";
nav_CD101.width="200";
nav_CD101.height="90";

nav_CD101.navName = "CD101";
nav_CD101.imagePath = "/~media/elements/LayoutClipart/../LayoutClipart/AccentGraphics/Accent_Arrow_Royal_Blue.gif";
nav_CD101.selectedImagePath = "/~media/elements/LayoutClipart/";
nav_CD101.mouseOverImagePath = "/~media/elements/LayoutClipart/";
nav_CD101.imageWidth = "16";
nav_CD101.imageHeight = "16";
nav_CD101.fontClass = "size11 Arial11";
nav_CD101.fontFace = "Arial, Helvetica, sans-serif";


var baseHref = '';
// this will only work if getElementsByTagName works
if (document.getElementsByTagName)
{
    // this will only work if we can find a base tag
    var base = document.getElementsByTagName('base');
    // Verify that the base object exists
    if (base && base.length > 0)
    {
        // if you don't specify a base href, href comes back as undefined
        if (base[0].href != undefined)
        {
            // get the base href
            baseHref = base[0].href;
            // add a trailing slash if base href doesn't already have one
            if (baseHref != '' && baseHref.charAt(baseHref.length - 1) != '/')
            {
                baseHref += '/';
            }
        }
    }
}


nav_CD101.links=new Array(5);
var nav_CD101_Link1 = new Object();
nav_CD101_Link1.type = "existing";
nav_CD101_Link1.displayName = "Why Go Cloth?";
nav_CD101_Link1.linkWindow = "_self";
nav_CD101_Link1.linkValue = "Why-Go-Cloth.html";
nav_CD101_Link1.linkIndex = "1";
nav_CD101.links[0] = nav_CD101_Link1;
var nav_CD101_Link2 = new Object();
nav_CD101_Link2.type = "existing";
nav_CD101_Link2.displayName = "How much? How many?";
nav_CD101_Link2.linkWindow = "_self";
nav_CD101_Link2.linkValue = "How-Much---How-Many-.html";
nav_CD101_Link2.linkIndex = "2";
nav_CD101.links[1] = nav_CD101_Link2;
var nav_CD101_Link3 = new Object();
nav_CD101_Link3.type = "existing";
nav_CD101_Link3.displayName = "What about daycare?";
nav_CD101_Link3.linkWindow = "_self";
nav_CD101_Link3.linkValue = "Local-Resources.html";
nav_CD101_Link3.linkIndex = "3";
nav_CD101.links[2] = nav_CD101_Link3;
var nav_CD101_Link4 = new Object();
nav_CD101_Link4.type = "existing";
nav_CD101_Link4.displayName = "Help Me Choose";
nav_CD101_Link4.linkWindow = "_self";
nav_CD101_Link4.linkValue = "Diaper-Styles---Types.html";
nav_CD101_Link4.linkIndex = "4";
nav_CD101.links[3] = nav_CD101_Link4;
var nav_CD101_Link5 = new Object();
nav_CD101_Link5.type = "existing";
nav_CD101_Link5.displayName = "Care Instructions";
nav_CD101_Link5.linkWindow = "_self";
nav_CD101_Link5.linkValue = "Caring-For-Cloth-Diapers.html";
nav_CD101_Link5.linkIndex = "5";
nav_CD101.links[4] = nav_CD101_Link5;
function backgroundMouseOn(tdElement, newColor)
{
	if(tdElement != null) {
		tdElement.oldBGColor = tdElement.style.backgroundColor;
		tdElement.style.backgroundColor = newColor;
	}
}
function backgroundMouseOff(tdElement)
{
	if(tdElement != null) {
		tdElement.style.backgroundColor = tdElement.oldBGColor;
	}
} 

function doMouseChange(Navigation,tdElement,linkIndex,bisMouseOver) {
	if (Navigation.mouseoverEffect != 'true') {
		return;
	}	
	var link = Navigation.links[linkIndex-1];
	var bIsCurrentPage = isCurrentPage(link);
	var bShowMouseoverBg = !(bIsCurrentPage
			&& 'true' == Navigation.selectedEffect && Navigation.selectedBgcolor);
	var fontElement = getLinkFontElement(tdElement);
	if(fontElement != null) {
		doFontChange(Navigation,fontElement,bIsCurrentPage,bisMouseOver);
	}
	
	if (Navigation.mouseoverBgcolor && bShowMouseoverBg) {
		if(bisMouseOver) {
			backgroundMouseOn(tdElement,Navigation.mouseoverBgcolor);
		} else {
			backgroundMouseOff(tdElement);
		}
	}
}
function addStyle(Navigation, Link, tdElement,vNavTrElement) {
	if (tdElement == null) {
		return;
	}
	var strFontColor = Navigation.textColor;
	if ('true' == Navigation.selectedEffect) {
		if (Navigation.selectedTextcolor) {
			strFontColor = Navigation.selectedTextcolor;
		}
		if (Navigation.selectedBgcolor) {
			if (Navigation.orientation == 'horizontal') {
				tdElement.style.backgroundColor = Navigation.selectedBgcolor;
			} else {
				if (vNavTrElement != null) {
					vNavTrElement.style.backgroundColor = Navigation.selectedBgcolor;
				}
			}
		}
	}
	var fontElement = getLinkFontElement(tdElement);
	if (fontElement != null) {
		fontElement.style.color = strFontColor;
	}
	tdElement.style.color = strFontColor;
	if ('true' == Navigation.selectedEffect) {
		if ('true' == Navigation.selectedBold) {
			tdElement.style.fontWeight = "bold";
		}
		if ('true' == Navigation.selectedItalic) {
			tdElement.style.fontStyle = "italic";
		}
		if ('true' == Navigation.selectedUnderline) {
			tdElement.style.textDecoration = "underline";
		}
	}
}

// Combined escape html and javascript
function escapeHtmlInlineScript(s, escapeSingleQuotes, escapeDoubleQuotes){
	return htmlEncode(escapeScript(s, escapeSingleQuotes, escapeDoubleQuotes));
}

function htmlEncode(s){
	if (typeof(s) != "string") return "";
	
	var result = "";
	for (var i = 0; i < s.length; i++) {
		var ch = s.charAt(i);
		switch (ch) {
		case '<':
			result += "&lt;";
			break;
		case '>':
			result += "&gt;";
			break;
		case '&':
			result += "&amp;";
			break;
		case '"':
			result += "&quot;";
			break;
		case "'":
			result += "&#39;";
			break;
		default:
			result += ch;
		}
	}
	return result;
}

/* escapes slashes and quotes. the default is to escape quotes,
 * but this can be turned off.
 * this function is used for javascript and also for escaping urls
 * within background-image css.	 
 */
function escapeScript(s, escapeSingleQuotes, escapeDoubleQuotes){
	if (typeof(s) != "string") return "";
	
	var result = "";
	for (var i = 0; i < s.length; i++) {
		var ch = s.charAt(i);
		switch (ch) {
		case '\'':
			if (escapeSingleQuotes == null || escapeSingleQuotes)
				result += "\\\'";
			break;
		case '\"':
			if (escapeDoubleQuotes == null || escapeDoubleQuotes)
				result += "\\\"";
			break;
		case '\\':
			result += "\\\\";
			break;
		default:
			result += ch;
		}
	}
	return result;
}

//
// This .js file includes utility functions used by both graphical and text navs
// in their rendering.  User pages including a nav element will import this file, along
// with TextNavigation.js and GraphicNavigation.js.  The functions within will
// be called by the [navname].js file generated at publish time.

function fixLinkValue(Link)
{
	if(Link.type!='existing')
	{
		return Link.linkValue;
	}
	else
	{
		return baseHref + strRelativePathToRoot + Link.linkValue;
	}
}

function isCurrentPage(Link)
{
	if(Link.type!='existing')
	{
		return false;
	}
	var strLinkValue = Link.linkValue.toLowerCase();
	return (strRelativePagePath == strLinkValue);
}

function toggleOnMouseChange(fontElement,newColor, bold, underline, italic)
{
	if(fontElement == null) {
		return;
	}
	if(newColor)
	{
		fontElement.style.color=newColor;
	}
	fontElement.style.fontWeight = (bold=='true' ? 'bold' : 'normal');
	fontElement.style.textDecoration = (underline=='true' ? 'underline' : 'none');
	fontElement.style.fontStyle = (italic=='true' ? 'italic' : 'normal');

}

function doFontChange(Navigation,fontElement,bIsCurrentPage,bisMouseOver) {
	if(fontElement == null) {
		return;
	}
	var textColor;
	var baseTextColor = Navigation.textColor;
	var bold;
	var baseBold = Navigation.bold;
	var underline;
	var baseUnderline = Navigation.underline;
	var italic;
	var baseItalic = Navigation.italic;
	if (bIsCurrentPage && 'true' == Navigation.selectedEffect) {
		textColor = Navigation.selectedTextcolor ? Navigation.selectedTextcolor
				: (Navigation.mouseoverTextColor ? Navigation.mouseoverTextcolor
						: Navigation.textColor);
		baseTextColor = Navigation.selectedTextcolor ? Navigation.selectedTextcolor
				: Navigation.textColor;
		baseBold = bold = Navigation.selectedBold;
		baseUnderline = underline = Navigation.selectedUnderline;
		baseItalic = italic = Navigation.selectedItalic;
	} else {
		textColor = Navigation.mouseoverTextcolor ? Navigation.mouseoverTextcolor
				: Navigation.textColor;
		bold = Navigation.mouseoverBold;
		underline = Navigation.mouseoverUnderline;
		italic = Navigation.mouseoverItalic;
	}
	
	if(bisMouseOver) {
		toggleOnMouseChange(fontElement,textColor,bold,underline,italic);
	} else {
		toggleOnMouseChange(fontElement,baseTextColor,baseBold,baseUnderline,baseItalic);
	}
	

}

function addMouseAndStyleSupportCD101(Navigation,navTbId) {
	var startNode;

	if(typeof(nav_element_id) != 'undefined' && document.getElementById(nav_element_id) != null) {
		startNode = document.getElementById(nav_element_id);
			
	} else if(navTbId != null) {
		startNode = document.getElementById(navTbId);
			
	}
	
	if(startNode != null) {
	  searchForCurrentPageTd(Navigation,startNode);
	}
	

}

function searchForCurrentPageTd(Navigation,startNode) {
	
	if(startNode.childNodes != null) {
		for(var i=0;i<startNode.childNodes.length;i++){
			if(addStyleForCurrentPageTd(Navigation,startNode.childNodes[i])){
			   return;	
			} else {
			   searchForCurrentPageTd(Navigation,startNode.childNodes[i]);
			}
		}
	}

}

function addStyleForCurrentPageTd(Navigation,currentNode) {
	if(Navigation.orientation == 'horizontal') {
		if(currentNode.tagName == 'TD' && currentNode.id != '' && currentNode.id.indexOf(Navigation.navName+navTDLinkPart) != -1){
			var currentTDIdPrefix = Navigation.navName+navTDLinkPart;
			var linkId = currentNode.id.substring(currentTDIdPrefix.length,currentNode.id.length);
			if(isCurrentPage(Navigation.links[linkId-1]) == true) {
				addStyle(Navigation, Navigation.links[linkId-1],currentNode);
				return true;
			}
		}
	} else {
		if(currentNode.tagName == 'TR' && currentNode.id != '' && currentNode.id.indexOf(navTRLinkPrefix) != -1){	
			var currentTRIdPrefix = navTRLinkPrefix+Navigation.navName;
			var linkId = currentNode.id.substring(currentTRIdPrefix.length,currentNode.id.length);
			if(isCurrentPage(Navigation.links[linkId-1]) == true && currentNode.childNodes != null) {
				var currentPageTd;
				for(var i=0;currentNode.childNodes.length;i++) {
					if(typeof(currentNode.childNodes[i].tagName) != 'undefined' && currentNode.childNodes[i].tagName == 'TD' && currentNode.childNodes[i].id.indexOf(Navigation.navName+navTDLinkPart) != -1) {
						currentPageTd = currentNode.childNodes[i];
						addStyle(Navigation, Navigation.links[linkId - 1],currentPageTd,currentNode);
						return true;
					}
				}
			}
		}
	}
	return false;
}

function getChildElementFromTree(startNode,nodesToTraverse) {
	var currentChildNode = startNode;
	
	for(var n= 0;n<nodesToTraverse.length;n++) {
		currentChildNode = getMatchingChildByTag(currentChildNode.childNodes,nodesToTraverse[n]);
	}
	
	return currentChildNode;
}


function getMatchingChildByTag(childNodes,tagName) {
	var child;
	for(var i=0;childNodes.length;i++) {
		if(childNodes[i].tagName == tagName) {
			child = childNodes[i];
			break;
		}
	}
	return child;
}
function getLinkFontElement(tdElement){
	var fontElement;
	var aElement = getChildElementFromTree(tdElement,['A']);
	for(var i=0;i < aElement.childNodes.length;i++) {
		if(aElement.childNodes[i].tagName == 'DIV') {
		 	fontElement = getChildElementFromTree(aElement.childNodes[i],['FONT']);
		 	break;
		} else if(aElement.childNodes[i].tagName == 'FONT'){
		 	fontElement = 	aElement.childNodes[i];
		 	break;
		}
	
	}
	return fontElement;
}



	if(typeof(navTRLinkPrefix) == 'undefined') {
		navTRLinkPrefix = 'vNavTR_Link_';
	}
	if(typeof(navTDLinkPart) == 'undefined') {
		navTDLinkPart = '_Link';
	}
	if(document.getElementById('nav_version') == null) {
	if (typeof(navTBSuffix) == 'undefined') {
	navTBSuffix = 0;
	} else {navTBSuffix++;}
		document.write('<TABLE ID="ntb'+navTBSuffix+'"  CELLSPACING=\"0\" CELLPADDING=\"0\" BORDER=\"0\" ><TR id=\"vNavTR_Link_CD1011\"><TD ALIGN=\"CENTER\"><IMG NAME=\"IDCD1011\" SRC=\"\/~media\/elements\/LayoutClipart\/..\/LayoutClipart\/AccentGraphics\/Accent_Arrow_Royal_Blue.gif\" HEIGHT=\"16\" WIDTH=\"16\" BORDER=\"0\"><IMG SRC=\"\/tp.gif\" WIDTH=\"10\" HEIGHT=\"16\" BORDER=\"0\"><\/TD><TD ALIGN=\"left\" VALIGN=\"MIDDLE\" NOWRAP=\"NOWRAP\" id=\"CD101_Link1\" style=\"cursor: pointer;cursor: hand;color:#FFFFFF;font-weight: bold;\" onmouseover=\"doMouseChange(nav_CD101,this,\'1\',true);\" onmouseout=\"doMouseChange(nav_CD101,this,\'1\',false);\"><A HREF=\"\/Why-Go-Cloth.html\" TARGET=\"_self\" STYLE=\"text-decoration:none;\" NAME=\"Why Go Cloth?\"><IMG SRC=\"\/tp.gif\" WIDTH=\"1\" HEIGHT=\"1.0\" BORDER=\"0\"><BR><FONT ID=\"CD101_f1\" FACE=\"Arial, Helvetica, sans-serif\" CLASS=\"size11 Arial11\" STYLE=\"color:#FFFFFF\">Why&nbsp;Go&nbsp;Cloth?<\/FONT><BR><IMG SRC=\"\/tp.gif\" WIDTH=\"1\" HEIGHT=\"1.0\" BORDER=\"0\"><\/A><\/TD><\/TR><TR id=\"vNavTR_Link_CD1012\"><TD ALIGN=\"CENTER\"><IMG NAME=\"IDCD1012\" SRC=\"\/~media\/elements\/LayoutClipart\/..\/LayoutClipart\/AccentGraphics\/Accent_Arrow_Royal_Blue.gif\" HEIGHT=\"16\" WIDTH=\"16\" BORDER=\"0\"><IMG SRC=\"\/tp.gif\" WIDTH=\"10\" HEIGHT=\"16\" BORDER=\"0\"><\/TD><TD ALIGN=\"left\" VALIGN=\"MIDDLE\" NOWRAP=\"NOWRAP\" id=\"CD101_Link2\" style=\"cursor: pointer;cursor: hand;color:#FFFFFF;font-weight: bold;\" onmouseover=\"doMouseChange(nav_CD101,this,\'2\',true);\" onmouseout=\"doMouseChange(nav_CD101,this,\'2\',false);\"><A HREF=\"\/How-Much---How-Many-.html\" TARGET=\"_self\" STYLE=\"text-decoration:none;\" NAME=\"How much? How many?\"><IMG SRC=\"\/tp.gif\" WIDTH=\"1\" HEIGHT=\"1.0\" BORDER=\"0\"><BR><FONT ID=\"CD101_f2\" FACE=\"Arial, Helvetica, sans-serif\" CLASS=\"size11 Arial11\" STYLE=\"color:#FFFFFF\">How&nbsp;much?&nbsp;How&nbsp;many?<\/FONT><BR><IMG SRC=\"\/tp.gif\" WIDTH=\"1\" HEIGHT=\"1.0\" BORDER=\"0\"><\/A><\/TD><\/TR><TR id=\"vNavTR_Link_CD1013\"><TD ALIGN=\"CENTER\"><IMG NAME=\"IDCD1013\" SRC=\"\/~media\/elements\/LayoutClipart\/..\/LayoutClipart\/AccentGraphics\/Accent_Arrow_Royal_Blue.gif\" HEIGHT=\"16\" WIDTH=\"16\" BORDER=\"0\"><IMG SRC=\"\/tp.gif\" WIDTH=\"10\" HEIGHT=\"16\" BORDER=\"0\"><\/TD><TD ALIGN=\"left\" VALIGN=\"MIDDLE\" NOWRAP=\"NOWRAP\" id=\"CD101_Link3\" style=\"cursor: pointer;cursor: hand;color:#FFFFFF;font-weight: bold;\" onmouseover=\"doMouseChange(nav_CD101,this,\'3\',true);\" onmouseout=\"doMouseChange(nav_CD101,this,\'3\',false);\"><A HREF=\"\/Local-Resources.html\" TARGET=\"_self\" STYLE=\"text-decoration:none;\" NAME=\"What about daycare?\"><IMG SRC=\"\/tp.gif\" WIDTH=\"1\" HEIGHT=\"1.0\" BORDER=\"0\"><BR><FONT ID=\"CD101_f3\" FACE=\"Arial, Helvetica, sans-serif\" CLASS=\"size11 Arial11\" STYLE=\"color:#FFFFFF\">What&nbsp;about&nbsp;daycare?<\/FONT><BR><IMG SRC=\"\/tp.gif\" WIDTH=\"1\" HEIGHT=\"1.0\" BORDER=\"0\"><\/A><\/TD><\/TR><TR id=\"vNavTR_Link_CD1014\"><TD ALIGN=\"CENTER\"><IMG NAME=\"IDCD1014\" SRC=\"\/~media\/elements\/LayoutClipart\/..\/LayoutClipart\/AccentGraphics\/Accent_Arrow_Royal_Blue.gif\" HEIGHT=\"16\" WIDTH=\"16\" BORDER=\"0\"><IMG SRC=\"\/tp.gif\" WIDTH=\"10\" HEIGHT=\"16\" BORDER=\"0\"><\/TD><TD ALIGN=\"left\" VALIGN=\"MIDDLE\" NOWRAP=\"NOWRAP\" id=\"CD101_Link4\" style=\"cursor: pointer;cursor: hand;color:#FFFFFF;font-weight: bold;\" onmouseover=\"doMouseChange(nav_CD101,this,\'4\',true);\" onmouseout=\"doMouseChange(nav_CD101,this,\'4\',false);\"><A HREF=\"\/Diaper-Styles---Types.html\" TARGET=\"_self\" STYLE=\"text-decoration:none;\" NAME=\"Help Me Choose\"><IMG SRC=\"\/tp.gif\" WIDTH=\"1\" HEIGHT=\"1.0\" BORDER=\"0\"><BR><FONT ID=\"CD101_f4\" FACE=\"Arial, Helvetica, sans-serif\" CLASS=\"size11 Arial11\" STYLE=\"color:#FFFFFF\">Help&nbsp;Me&nbsp;Choose<\/FONT><BR><IMG SRC=\"\/tp.gif\" WIDTH=\"1\" HEIGHT=\"1.0\" BORDER=\"0\"><\/A><\/TD><\/TR><TR id=\"vNavTR_Link_CD1015\"><TD ALIGN=\"CENTER\"><IMG NAME=\"IDCD1015\" SRC=\"\/~media\/elements\/LayoutClipart\/..\/LayoutClipart\/AccentGraphics\/Accent_Arrow_Royal_Blue.gif\" HEIGHT=\"16\" WIDTH=\"16\" BORDER=\"0\"><IMG SRC=\"\/tp.gif\" WIDTH=\"10\" HEIGHT=\"16\" BORDER=\"0\"><\/TD><TD ALIGN=\"left\" VALIGN=\"MIDDLE\" NOWRAP=\"NOWRAP\" id=\"CD101_Link5\" style=\"cursor: pointer;cursor: hand;color:#FFFFFF;font-weight: bold;\" onmouseover=\"doMouseChange(nav_CD101,this,\'5\',true);\" onmouseout=\"doMouseChange(nav_CD101,this,\'5\',false);\"><A HREF=\"\/Caring-For-Cloth-Diapers.html\" TARGET=\"_self\" STYLE=\"text-decoration:none;\" NAME=\"Care Instructions\"><IMG SRC=\"\/tp.gif\" WIDTH=\"1\" HEIGHT=\"1.0\" BORDER=\"0\"><BR><FONT ID=\"CD101_f5\" FACE=\"Arial, Helvetica, sans-serif\" CLASS=\"size11 Arial11\" STYLE=\"color:#FFFFFF\">Care&nbsp;Instructions<\/FONT><BR><IMG SRC=\"\/tp.gif\" WIDTH=\"1\" HEIGHT=\"1.0\" BORDER=\"0\"><\/A><\/TD><\/TR><\/TABLE><script type="text/javascript">addMouseAndStyleSupportCD101(nav_CD101,"ntb'+navTBSuffix+'");'+'</scri'+'pt>');
	}


