var nav_Graphic_Button_Comic = new Object();

nav_Graphic_Button_Comic.type="Navigation";
nav_Graphic_Button_Comic.mouseoverBold="false";
nav_Graphic_Button_Comic.selectedBgcolor="";
nav_Graphic_Button_Comic.importedImageMouseOver="";
nav_Graphic_Button_Comic.numLinks="4";
nav_Graphic_Button_Comic.textColor="#FFFFFF";
nav_Graphic_Button_Comic.mouseoverBgcolor="";
nav_Graphic_Button_Comic.tabCategory="basic";
nav_Graphic_Button_Comic.border="";
nav_Graphic_Button_Comic.selectedItalic="false";
nav_Graphic_Button_Comic.graphicMouseover="true";
nav_Graphic_Button_Comic.basicTab="White";
nav_Graphic_Button_Comic.horizontalSpacing="10";
nav_Graphic_Button_Comic.horizontalWrap="5";
nav_Graphic_Button_Comic.shinyButton="Shiny_Aqua";
nav_Graphic_Button_Comic.mouseoverEffect="true";
nav_Graphic_Button_Comic.modernButton="Basic_Black";
nav_Graphic_Button_Comic.orientation="vertical";
nav_Graphic_Button_Comic.funButton="Arts_and_Crafts";
nav_Graphic_Button_Comic.darkButton="Basic_Black";
nav_Graphic_Button_Comic.selectedTextcolor="#FFFF00";
nav_Graphic_Button_Comic.lineWidth="2";
nav_Graphic_Button_Comic.mouseoverTextcolor="#FFFF00";
nav_Graphic_Button_Comic.bold="false";
nav_Graphic_Button_Comic.texturedButton="Brick";
nav_Graphic_Button_Comic.accentStyle="Arrow";
nav_Graphic_Button_Comic.style="buttons";
nav_Graphic_Button_Comic.holidayButton="Christmas_Ornaments";
nav_Graphic_Button_Comic.textSize="12";
nav_Graphic_Button_Comic.lineColor="#000000";
nav_Graphic_Button_Comic.brightButton="Comic";
nav_Graphic_Button_Comic.mouseoverUnderline="false";
nav_Graphic_Button_Comic.accentColor="Black";
nav_Graphic_Button_Comic.imageHeight="44";
nav_Graphic_Button_Comic.background="";
nav_Graphic_Button_Comic.textFont="Helvetica";
nav_Graphic_Button_Comic.hasLinks="true";
nav_Graphic_Button_Comic.sophisticatedButton="Antique";
nav_Graphic_Button_Comic.underline="false";
nav_Graphic_Button_Comic.simpleButton="Autumn_Leaves";
nav_Graphic_Button_Comic.italic="false";
nav_Graphic_Button_Comic.importedImageSelected="";
nav_Graphic_Button_Comic.basicButton="Gray";
nav_Graphic_Button_Comic.navID="nav_Graphic_Button_Comic";
nav_Graphic_Button_Comic.buttonCategory="bright";
nav_Graphic_Button_Comic.dirty="false";
nav_Graphic_Button_Comic.selectedBold="false";
nav_Graphic_Button_Comic.selectedEffect="true";
nav_Graphic_Button_Comic.graphicSelected="true";
nav_Graphic_Button_Comic.version="5";
nav_Graphic_Button_Comic.verticalSpacing="16";
nav_Graphic_Button_Comic.squareTab="Camel";
nav_Graphic_Button_Comic.mouseoverItalic="false";
nav_Graphic_Button_Comic.justification="center";
nav_Graphic_Button_Comic.imageWidth="160";
nav_Graphic_Button_Comic.selectedUnderline="false";
nav_Graphic_Button_Comic.accentType="";
nav_Graphic_Button_Comic.importedImage="";
nav_Graphic_Button_Comic.expressColorScheme="Comic";
nav_Graphic_Button_Comic.graphicHighlight="true";
nav_Graphic_Button_Comic.expressStyle="Bright_Buttons";

nav_Graphic_Button_Comic.navName = "Graphic_Button_Comic";
nav_Graphic_Button_Comic.imagePath = "/~media/elements/LayoutClipart/../LayoutClipart/Buttons/Comic_Arrow_Button.gif";
nav_Graphic_Button_Comic.selectedImagePath = "/~media/elements/LayoutClipart/../LayoutClipart/Buttons/Comic_Check_Button.gif";
nav_Graphic_Button_Comic.mouseOverImagePath = "/~media/elements/LayoutClipart/../LayoutClipart/Buttons/Comic_Check_Button.gif";
nav_Graphic_Button_Comic.imageWidth = "160";
nav_Graphic_Button_Comic.imageHeight = "44";
nav_Graphic_Button_Comic.fontClass = "size12 Helvetica12";
nav_Graphic_Button_Comic.fontFace = "Helvetica, Arial, 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_Graphic_Button_Comic.links=new Array(4);
var nav_Graphic_Button_Comic_Link1 = new Object();
nav_Graphic_Button_Comic_Link1.type = "existing";
nav_Graphic_Button_Comic_Link1.displayName = "Home";
nav_Graphic_Button_Comic_Link1.linkWindow = "";
nav_Graphic_Button_Comic_Link1.linkValue = "Index.html";
nav_Graphic_Button_Comic_Link1.linkIndex = "1";
nav_Graphic_Button_Comic.links[0] = nav_Graphic_Button_Comic_Link1;
var nav_Graphic_Button_Comic_Link2 = new Object();
nav_Graphic_Button_Comic_Link2.type = "existing";
nav_Graphic_Button_Comic_Link2.displayName = "Contact Us";
nav_Graphic_Button_Comic_Link2.linkWindow = "";
nav_Graphic_Button_Comic_Link2.linkValue = "Contact_Us.html";
nav_Graphic_Button_Comic_Link2.linkIndex = "2";
nav_Graphic_Button_Comic.links[1] = nav_Graphic_Button_Comic_Link2;
var nav_Graphic_Button_Comic_Link3 = new Object();
nav_Graphic_Button_Comic_Link3.type = "existing";
nav_Graphic_Button_Comic_Link3.displayName = "Directions";
nav_Graphic_Button_Comic_Link3.linkWindow = "";
nav_Graphic_Button_Comic_Link3.linkValue = "Directions.html";
nav_Graphic_Button_Comic_Link3.linkIndex = "3";
nav_Graphic_Button_Comic.links[2] = nav_Graphic_Button_Comic_Link3;
var nav_Graphic_Button_Comic_Link4 = new Object();
nav_Graphic_Button_Comic_Link4.type = "existing";
nav_Graphic_Button_Comic_Link4.displayName = "Photo Album";
nav_Graphic_Button_Comic_Link4.linkWindow = "";
nav_Graphic_Button_Comic_Link4.linkValue = "Photo_Album.html";
nav_Graphic_Button_Comic_Link4.linkIndex = "4";
nav_Graphic_Button_Comic.links[3] = nav_Graphic_Button_Comic_Link4;
function mouseOn(tdElement, newBackgroundImage)
{
	if(tdElement != null) {
		tdElement.style.backgroundImage = 'url(' + escapeScript(newBackgroundImage) + ')';
	}
}

function mouseOff(tdElement, newBackgroundImage)
{
	if(tdElement != null) {
		tdElement.style.backgroundImage = 'url(' + escapeScript(newBackgroundImage) + ')';
	}
}

function doMouseChange(Navigation,tdElement,linkIndex,bisMouseOver) {
	if (Navigation.mouseoverEffect != 'true') {
		return;
	}
	var link = Navigation.links[linkIndex-1];
	var bIsCurrentPage = isCurrentPage(link);
	if ((Navigation.graphicSelected == 'true' || Navigation.selectedTextcolor)
			&& bIsCurrentPage && 'true' == Navigation.selectedEffect) {
		return;
	}
	
	var fontElement = getLinkFontElement(tdElement);
	
	if(fontElement != null) {
		doFontChange(Navigation,fontElement,bIsCurrentPage,bisMouseOver);
	}
	
	if (Navigation.graphicMouseover == 'true') {
		if (bisMouseOver) {
			mouseOn(tdElement,escapeHtmlInlineScript(Navigation.mouseOverImagePath));
		} else {
			mouseOff(tdElement, escapeHtmlInlineScript(Navigation.imagePath));
		}
	}
}
function addStyle(Navigation, Link,tdElement) {
	if(tdElement == null) {
		return;
	}
	var strImg = Navigation.imagePath;
	var strFontColor = Navigation.textColor;
	if ('true' == Navigation.selectedEffect) {
		if (Navigation.graphicSelected == 'true') {
			strImg = Navigation.selectedImagePath;
		}
		if (Navigation.selectedTextcolor) {
			strFontColor = Navigation.selectedTextcolor;
		}
	}
	var strImgUrl = "url('"+escapeHtmlInlineScript(strImg)+"')";
	tdElement.style.backgroundImage=strImgUrl;
	var fontElement = getLinkFontElement(tdElement);
	if (fontElement != null) {
		fontElement.style.color = strFontColor;
		if ('true' == Navigation.selectedEffect) {
			if ('true' == Navigation.selectedBold) {
				fontElement.style.fontWeight = "bold";
			}
			if ('true' == Navigation.selectedItalic) {
				fontElement.style.fontStyle = "italic";
			}
			if ('true' == Navigation.selectedUnderline) {
				fontElement.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 addMouseAndStyleSupportGraphic_Button_Comic(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+'"  border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><TR id=\"vNavTR_Link_Graphic_Button_Comic1\"><TD NOWRAP HEIGHT=\"44\" ALIGN=\"center\" VALIGN=\"MIDDLE\" id=\"Graphic_Button_Comic_Link1\" style=\"cursor: pointer;cursor: hand;color:#FFFFFF;background-image:url(\/~media\/elements\/LayoutClipart\/..\/LayoutClipart\/Buttons\/Comic_Arrow_Button.gif);background-repeat:no-repeat;background-position:center;\"  onmouseover=\"doMouseChange(nav_Graphic_Button_Comic,this,\'1\',true);\" onmouseout=\"doMouseChange(nav_Graphic_Button_Comic,this,\'1\',false);\"><A HREF=\"\/Index.html\" TARGET=\"_self\" STYLE=\"text-decoration:none;vertical-align:middle;\" NAME=\"Home\"><DIV  STYLE=\"width:160px;height:44px;cursor: pointer;cursor: hand;\"><FONT ID=\"Graphic_Button_Comic_f1\" FACE=\"Helvetica, Arial, sans-serif\" CLASS=\"size12 Helvetica12\" STYLE=\"vertical-align:middle;color:#FFFFFF;line-height:44px;\">Home<\/FONT><\/DIV><\/A><\/TD><\/TR><TR><TD><IMG SRC=\"\/tp.gif\" HEIGHT=\"16\" WIDTH=\"1\" BORDER=\"0\" ALT=\"\"><\/TD><\/TR><TR id=\"vNavTR_Link_Graphic_Button_Comic2\"><TD NOWRAP HEIGHT=\"44\" ALIGN=\"center\" VALIGN=\"MIDDLE\" id=\"Graphic_Button_Comic_Link2\" style=\"cursor: pointer;cursor: hand;color:#FFFFFF;background-image:url(\/~media\/elements\/LayoutClipart\/..\/LayoutClipart\/Buttons\/Comic_Arrow_Button.gif);background-repeat:no-repeat;background-position:center;\"  onmouseover=\"doMouseChange(nav_Graphic_Button_Comic,this,\'2\',true);\" onmouseout=\"doMouseChange(nav_Graphic_Button_Comic,this,\'2\',false);\"><A HREF=\"\/Contact_Us.html\" TARGET=\"_self\" STYLE=\"text-decoration:none;vertical-align:middle;\" NAME=\"Contact Us\"><DIV  STYLE=\"width:160px;height:44px;cursor: pointer;cursor: hand;\"><FONT ID=\"Graphic_Button_Comic_f2\" FACE=\"Helvetica, Arial, sans-serif\" CLASS=\"size12 Helvetica12\" STYLE=\"vertical-align:middle;color:#FFFFFF;line-height:44px;\">Contact&nbsp;Us<\/FONT><\/DIV><\/A><\/TD><\/TR><TR><TD><IMG SRC=\"\/tp.gif\" HEIGHT=\"16\" WIDTH=\"1\" BORDER=\"0\" ALT=\"\"><\/TD><\/TR><TR id=\"vNavTR_Link_Graphic_Button_Comic3\"><TD NOWRAP HEIGHT=\"44\" ALIGN=\"center\" VALIGN=\"MIDDLE\" id=\"Graphic_Button_Comic_Link3\" style=\"cursor: pointer;cursor: hand;color:#FFFFFF;background-image:url(\/~media\/elements\/LayoutClipart\/..\/LayoutClipart\/Buttons\/Comic_Arrow_Button.gif);background-repeat:no-repeat;background-position:center;\"  onmouseover=\"doMouseChange(nav_Graphic_Button_Comic,this,\'3\',true);\" onmouseout=\"doMouseChange(nav_Graphic_Button_Comic,this,\'3\',false);\"><A HREF=\"\/Directions.html\" TARGET=\"_self\" STYLE=\"text-decoration:none;vertical-align:middle;\" NAME=\"Directions\"><DIV  STYLE=\"width:160px;height:44px;cursor: pointer;cursor: hand;\"><FONT ID=\"Graphic_Button_Comic_f3\" FACE=\"Helvetica, Arial, sans-serif\" CLASS=\"size12 Helvetica12\" STYLE=\"vertical-align:middle;color:#FFFFFF;line-height:44px;\">Directions<\/FONT><\/DIV><\/A><\/TD><\/TR><TR><TD><IMG SRC=\"\/tp.gif\" HEIGHT=\"16\" WIDTH=\"1\" BORDER=\"0\" ALT=\"\"><\/TD><\/TR><TR id=\"vNavTR_Link_Graphic_Button_Comic4\"><TD NOWRAP HEIGHT=\"44\" ALIGN=\"center\" VALIGN=\"MIDDLE\" id=\"Graphic_Button_Comic_Link4\" style=\"cursor: pointer;cursor: hand;color:#FFFFFF;background-image:url(\/~media\/elements\/LayoutClipart\/..\/LayoutClipart\/Buttons\/Comic_Arrow_Button.gif);background-repeat:no-repeat;background-position:center;\"  onmouseover=\"doMouseChange(nav_Graphic_Button_Comic,this,\'4\',true);\" onmouseout=\"doMouseChange(nav_Graphic_Button_Comic,this,\'4\',false);\"><A HREF=\"\/Photo_Album.html\" TARGET=\"_self\" STYLE=\"text-decoration:none;vertical-align:middle;\" NAME=\"Photo Album\"><DIV  STYLE=\"width:160px;height:44px;cursor: pointer;cursor: hand;\"><FONT ID=\"Graphic_Button_Comic_f4\" FACE=\"Helvetica, Arial, sans-serif\" CLASS=\"size12 Helvetica12\" STYLE=\"vertical-align:middle;color:#FFFFFF;line-height:44px;\">Photo&nbsp;Album<\/FONT><\/DIV><\/A><\/TD><\/TR><\/TABLE><script type="text/javascript">addMouseAndStyleSupportGraphic_Button_Comic(nav_Graphic_Button_Comic,"ntb'+navTBSuffix+'");'+'</scri'+'pt>');
	}


