PageSourceSearch

http://www.archercity.org/~navs/CityGov.js

js archercity.org collected 2026-09-24 23:06:22 UTC 17,893 bytes, 462 lines download raw bytes

1var nav_CityGov = new Object();
2
3nav_CityGov.underline="true";
4nav_CityGov.justification="left";
5nav_CityGov.accentStyle="Arrow";
6nav_CityGov.selectedUnderline="false";
7nav_CityGov.textFont="Times New Roman";
8nav_CityGov.funButton="Arts_and_Crafts";
9nav_CityGov.mouseoverBgcolor="";
10nav_CityGov.darkButton="Basic_Black";
11nav_CityGov.buttonCategory="basic";
12nav_CityGov.mouseoverBold="false";
13nav_CityGov.italic="false";
14nav_CityGov.importedImageMouseOver="";
15nav_CityGov.textSize="12";
16nav_CityGov.tabCategory="basic";
17nav_CityGov.style="text";
18nav_CityGov.hasLinks="true";
19nav_CityGov.accentColor="Black";
20nav_CityGov.selectedBgcolor="";
21nav_CityGov.graphicSelected="true";
22nav_CityGov.selectedTextcolor="#B91806";
23nav_CityGov.basicButton="Gray";
24nav_CityGov.accentType="none";
25nav_CityGov.graphicMouseover="true";
26nav_CityGov.horizontalSpacing="10";
27nav_CityGov.lineColor="#000000";
28nav_CityGov.selectedEffect="true";
29nav_CityGov.lineWidth="2";
30nav_CityGov.modernButton="Basic_Black";
31nav_CityGov.border="";
32nav_CityGov.type="Navigation";
33nav_CityGov.simpleButton="Autumn_Leaves";
34nav_CityGov.sophisticatedButton="Antique";
35nav_CityGov.bold="false";
36nav_CityGov.localPreview="false";
37nav_CityGov.verticalSpacing="10";
38nav_CityGov.basicTab="White";
39nav_CityGov.selectedBold="false";
40nav_CityGov.mouseoverEffect="true";
41nav_CityGov.mouseoverTextcolor="#B91806";
42nav_CityGov.navID="nav_CityGov";
43nav_CityGov.mouseoverUnderline="false";
44nav_CityGov.imageHeight="31";
45nav_CityGov.texturedButton="Brick";
46nav_CityGov.selectedItalic="false";
47nav_CityGov.brightButton="Chicky";
48nav_CityGov.importedImageSelected="";
49nav_CityGov.dirty="false";
50nav_CityGov.squareTab="Camel";
51nav_CityGov.horizontalWrap="5";
52nav_CityGov.mouseoverItalic="false";
53nav_CityGov.imageWidth="114";
54nav_CityGov.numLinks="5";
55nav_CityGov.background="";
56nav_CityGov.importedImage="";
57nav_CityGov.version="5";
58nav_CityGov.shinyButton="Shiny_Aqua";
59nav_CityGov.orientation="vertical";
60nav_CityGov.holidayButton="Christmas_Ornaments";
61nav_CityGov.textColor="#000066";
62
63nav_CityGov.navName = "CityGov";
64nav_CityGov.imagePath = "null";
65nav_CityGov.selectedImagePath = "/~media/elements/LayoutClipart/";
66nav_CityGov.mouseOverImagePath = "/~media/elements/LayoutClipart/";
67nav_CityGov.imageWidth = "16";
68nav_CityGov.imageHeight = "16";
69nav_CityGov.fontClass = "size12 TimesRoman12";
70nav_CityGov.fontFace = "'Times New Roman', Times, serif";
71
72
73var baseHref = '';
74// this will only work if getElementsByTagName works
75if (document.getElementsByTagName)
76{
77    // this will only work if we can find a base tag
78    var base = document.getElementsByTagName('base');
79    // Verify that the base object exists
80    if (base && base.length > 0)
81    {
82        // if you don't specify a base href, href comes back as undefined
83        if (base[0].href != undefined)
84        {
85            // get the base href
86            baseHref = base[0].href;
87            // add a trailing slash if base href doesn't already have one
88            if (baseHref != '' && baseHref.charAt(baseHref.length - 1) != '/')
89            {
90                baseHref += '/';
91            }
92        }
93    }
94}
95
96
97nav_CityGov.links=new Array(5);
98var nav_CityGov_Link1 = new Object();
99nav_CityGov_Link1.type = "existing";
100nav_CityGov_Link1.displayName = "Council & Administration";
101nav_CityGov_Link1.linkWindow = "_self";
102nav_CityGov_Link1.linkValue = "citygov\/council.html";
103nav_CityGov_Link1.linkIndex = "1";
104nav_CityGov.links[0] = nav_CityGov_Link1;
105var nav_CityGov_Link2 = new Object();
106nav_CityGov_Link2.type = "existing";
107nav_CityGov_Link2.displayName = "Elections";
108nav_CityGov_Link2.linkWindow = "_self";
109nav_CityGov_Link2.linkValue = "citygov\/elections.html";
110nav_CityGov_Link2.linkIndex = "2";
111nav_CityGov.links[1] = nav_CityGov_Link2;
112var nav_CityGov_Link3 = new Object();
113nav_CityGov_Link3.type = "existing";
114nav_CityGov_Link3.displayName = "Finance";
115nav_CityGov_Link3.linkWindow = "_self";
116nav_CityGov_Link3.linkValue = "citygov\/finance.html";
117nav_CityGov_Link3.linkIndex = "3";
118nav_CityGov.links[2] = nav_CityGov_Link3;
119var nav_CityGov_Link4 = new Object();
120nav_CityGov_Link4.type = "existing";
121nav_CityGov_Link4.displayName = "Meeting Agendas & Minutes";
122nav_CityGov_Link4.linkWindow = "_self";
123nav_CityGov_Link4.linkValue = "citygov\/minutes.html";
124nav_CityGov_Link4.linkIndex = "4";
125nav_CityGov.links[3] = nav_CityGov_Link4;
126var nav_CityGov_Link5 = new Object();
127nav_CityGov_Link5.type = "existing";
128nav_CityGov_Link5.displayName = "Code of Ordinances";
129nav_CityGov_Link5.linkWindow = "_self";
130nav_CityGov_Link5.linkValue = "citygov\/ordinances.html";
131nav_CityGov_Link5.linkIndex = "5";
132nav_CityGov.links[4] = nav_CityGov_Link5;
133function backgroundMouseOn(tdElement, newColor)
134{
135	if(tdElement != null) {
136		tdElement.oldBGColor = tdElement.style.backgroundColor;
137		tdElement.style.backgroundColor = newColor;
138	}
139}
140function backgroundMouseOff(tdElement)
141{
142	if(tdElement != null) {
143		tdElement.style.backgroundColor = tdElement.oldBGColor;
144	}
145} 
146
147function doMouseChange(Navigation,tdElement,linkIndex,bisMouseOver) {
148	if (Navigation.mouseoverEffect != 'true') {
149		return;
150	}	
151	var link = Navigation.links[linkIndex-1];
152	var bIsCurrentPage = isCurrentPage(link);
153	var bShowMouseoverBg = !(bIsCurrentPage
154			&& 'true' == Navigation.selectedEffect && Navigation.selectedBgcolor);
155	var fontElement = getLinkFontElement(tdElement);
156	if(fontElement != null) {
157		doFontChange(Navigation,fontElement,bIsCurrentPage,bisMouseOver);
158	}
159	
160	if (Navigation.mouseoverBgcolor && bShowMouseoverBg) {
161		if(bisMouseOver) {
162			backgroundMouseOn(tdElement,Navigation.mouseoverBgcolor);
163		} else {
164			backgroundMouseOff(tdElement);
165		}
166	}
167}
168function addStyle(Navigation, Link, tdElement,vNavTrElement) {
169	if (tdElement == null) {
170		return;
171	}
172	var strFontColor = Navigation.textColor;
173	if ('true' == Navigation.selectedEffect) {
174		if (Navigation.selectedTextcolor) {
175			strFontColor = Navigation.selectedTextcolor;
176		}
177		if (Navigation.selectedBgcolor) {
178			if (Navigation.orientation == 'horizontal') {
179				tdElement.style.backgroundColor = Navigation.selectedBgcolor;
180			} else {
181				if (vNavTrElement != null) {
182					vNavTrElement.style.backgroundColor = Navigation.selectedBgcolor;
183				}
184			}
185		}
186	}
187	var fontElement = getLinkFontElement(tdElement);
188	if (fontElement != null) {
189		fontElement.style.color = strFontColor;
190	}
191	tdElement.style.color = strFontColor;
192	if ('true' == Navigation.selectedEffect) {
193		if ('true' == Navigation.selectedBold) {
194			tdElement.style.fontWeight = "bold";
195		}
196		if ('true' == Navigation.selectedItalic) {
197			tdElement.style.fontStyle = "italic";
198		}
199		if ('true' == Navigation.selectedUnderline) {
200			tdElement.style.textDecoration = "underline";
201		}
202	}
203}
204
205// Combined escape html and javascript
206function escapeHtmlInlineScript(s, escapeSingleQuotes, escapeDoubleQuotes){
207	return htmlEncode(escapeScript(s, escapeSingleQuotes, escapeDoubleQuotes));
208}
209
210function htmlEncode(s){
211	if (typeof(s) != "string") return "";
212	
213	var result = "";
214	for (var i = 0; i < s.length; i++) {
215		var ch = s.charAt(i);
216		switch (ch) {
217		case '<':
218			result += "&lt;";
219			break;
220		case '>':
221			result += "&gt;";
222			break;
223		case '&':
224			result += "&amp;";
225			break;
226		case '"':
227			result += "&quot;";
228			break;
229		case "'":
230			result += "&#39;";
231			break;
232		default:
233			result += ch;
234		}
235	}
236	return result;
237}
238
239/* escapes slashes and quotes. the default is to escape quotes,
240 * but this can be turned off.
241 * this function is used for javascript and also for escaping urls
242 * within background-image css.	 
243 */
244function escapeScript(s, escapeSingleQuotes, escapeDoubleQuotes){
245	if (typeof(s) != "string") return "";
246	
247	var result = "";
248	for (var i = 0; i < s.length; i++) {
249		var ch = s.charAt(i);
250		switch (ch) {
251		case '\'':
252			if (escapeSingleQuotes == null || escapeSingleQuotes)
253				result += "\\\'";
254			break;
255		case '\"':
256			if (escapeDoubleQuotes == null || escapeDoubleQuotes)
257				result += "\\\"";
258			break;
259		case '\\':
260			result += "\\\\";
261			break;
262		default:
263			result += ch;
264		}
265	}
266	return result;
267}
268
269//
270// This .js file includes utility functions used by both graphical and text navs
271// in their rendering.  User pages including a nav element will import this file, along
272// with TextNavigation.js and GraphicNavigation.js.  The functions within will
273// be called by the [navname].js file generated at publish time.
274
275function fixLinkValue(Link)
276{
277	if(Link.type!='existing')
278	{
279		return Link.linkValue;
280	}
281	else
282	{
283		return baseHref + strRelativePathToRoot + Link.linkValue;
284	}
285}
286
287function isCurrentPage(Link)
288{
289	if(Link.type!='existing')
290	{
291		return false;
292	}
293	var strLinkValue = Link.linkValue.toLowerCase();
294	return (strRelativePagePath == strLinkValue);
295}
296
297function toggleOnMouseChange(fontElement,newColor, bold, underline, italic)
298{
299	if(fontElement == null) {
300		return;
301	}
302	if(newColor)
303	{
304		fontElement.style.color=newColor;
305	}
306	fontElement.style.fontWeight = (bold=='true' ? 'bold' : 'normal');
307	fontElement.style.textDecoration = (underline=='true' ? 'underline' : 'none');
308	fontElement.style.fontStyle = (italic=='true' ? 'italic' : 'normal');
309
310}
311
312function doFontChange(Navigation,fontElement,bIsCurrentPage,bisMouseOver) {
313	if(fontElement == null) {
314		return;
315	}
316	var textColor;
317	var baseTextColor = Navigation.textColor;
318	var bold;
319	var baseBold = Navigation.bold;
320	var underline;
321	var baseUnderline = Navigation.underline;
322	var italic;
323	var baseItalic = Navigation.italic;
324	if (bIsCurrentPage && 'true' == Navigation.selectedEffect) {
325		textColor = Navigation.selectedTextcolor ? Navigation.selectedTextcolor
326				: (Navigation.mouseoverTextColor ? Navigation.mouseoverTextcolor
327						: Navigation.textColor);
328		baseTextColor = Navigation.selectedTextcolor ? Navigation.selectedTextcolor
329				: Navigation.textColor;
330		baseBold = bold = Navigation.selectedBold;
331		baseUnderline = underline = Navigation.selectedUnderline;
332		baseItalic = italic = Navigation.selectedItalic;
333	} else {
334		textColor = Navigation.mouseoverTextcolor ? Navigation.mouseoverTextcolor
335				: Navigation.textColor;
336		bold = Navigation.mouseoverBold;
337		underline = Navigation.mouseoverUnderline;
338		italic = Navigation.mouseoverItalic;
339	}
340	
341	if(bisMouseOver) {
342		toggleOnMouseChange(fontElement,textColor,bold,underline,italic);
343	} else {
344		toggleOnMouseChange(fontElement,baseTextColor,baseBold,baseUnderline,baseItalic);
345	}
346	
347
348}
349
350function addMouseAndStyleSupportCityGov(Navigation,navTbId) {
351	var startNode;
352
353	if(typeof(nav_element_id) != 'undefined' && document.getElementById(nav_element_id) != null) {
354		startNode = document.getElementById(nav_element_id);
355			
356	} else if(navTbId != null) {
357		startNode = document.getElementById(navTbId);
358			
359	}
360	
361	if(startNode != null) {
362	  searchForCurrentPageTd(Navigation,startNode);
363	}
364	
365
366}
367
368function searchForCurrentPageTd(Navigation,startNode) {
369	
370	if(startNode.childNodes != null) {
371		for(var i=0;i<startNode.childNodes.length;i++){
372			if(addStyleForCurrentPageTd(Navigation,startNode.childNodes[i])){
373			   return;	
374			} else {
375			   searchForCurrentPageTd(Navigation,startNode.childNodes[i]);
376			}
377		}
378	}
379
380}
381
382function addStyleForCurrentPageTd(Navigation,currentNode) {
383	if(Navigation.orientation == 'horizontal') {
384		if(currentNode.tagName == 'TD' && currentNode.id != '' && currentNode.id.indexOf(Navigation.navName+navTDLinkPart) != -1){
385			var currentTDIdPrefix = Navigation.navName+navTDLinkPart;
386			var linkId = currentNode.id.substring(currentTDIdPrefix.length,currentNode.id.length);
387			if(isCurrentPage(Navigation.links[linkId-1]) == true) {
388				addStyle(Navigation, Navigation.links[linkId-1],currentNode);
389				return true;
390			}
391		}
392	} else {
393		if(currentNode.tagName == 'TR' && currentNode.id != '' && currentNode.id.indexOf(navTRLinkPrefix) != -1){	
394			var currentTRIdPrefix = navTRLinkPrefix+Navigation.navName;
395			var linkId = currentNode.id.substring(currentTRIdPrefix.length,currentNode.id.length);
396			if(isCurrentPage(Navigation.links[linkId-1]) == true && currentNode.childNodes != null) {
397				var currentPageTd;
398				for(var i=0;currentNode.childNodes.length;i++) {
399					if(typeof(currentNode.childNodes[i].tagName) != 'undefined' && currentNode.childNodes[i].tagName == 'TD' && currentNode.childNodes[i].id.indexOf(Navigation.navName+navTDLinkPart) != -1) {
400						currentPageTd = currentNode.childNodes[i];
401						addStyle(Navigation, Navigation.links[linkId - 1],currentPageTd,currentNode);
402						return true;
403					}
404				}
405			}
406		}
407	}
408	return false;
409}
410
411function getChildElementFromTree(startNode,nodesToTraverse) {
412	var currentChildNode = startNode;
413	
414	for(var n= 0;n<nodesToTraverse.length;n++) {
415		currentChildNode = getMatchingChildByTag(currentChildNode.childNodes,nodesToTraverse[n]);
416	}
417	
418	return currentChildNode;
419}
420
421
422function getMatchingChildByTag(childNodes,tagName) {
423	var child;
424	for(var i=0;childNodes.length;i++) {
425		if(childNodes[i].tagName == tagName) {
426			child = childNodes[i];
427			break;
428		}
429	}
430	return child;
431}
432function getLinkFontElement(tdElement){
433	var fontElement;
434	var aElement = getChildElementFromTree(tdElement,['A']);
435	for(var i=0;i < aElement.childNodes.length;i++) {
436		if(aElement.childNodes[i].tagName == 'DIV') {
437		 	fontElement = getChildElementFromTree(aElement.childNodes[i],['FONT']);
438		 	break;
439		} else if(aElement.childNodes[i].tagName == 'FONT'){
440		 	fontElement = 	aElement.childNodes[i];
441		 	break;
442		}
443	
444	}
445	return fontElement;
446}
447
448
449
450	if(typeof(navTRLinkPrefix) == 'undefined') {
451		navTRLinkPrefix = 'vNavTR_Link_';
452	}
453	if(typeof(navTDLinkPart) == 'undefined') {
454		navTDLinkPart = '_Link';
455	}
456	if(document.getElementById('nav_version') == null) {
457	if (typeof(navTBSuffix) == 'undefined') {
458	navTBSuffix = 0;
459	} else {navTBSuffix++;}
460		document.write('<TABLE ID="ntb'+navTBSuffix+'"  CELLSPACING=\"0\" CELLPADDING=\"0\" BORDER=\"0\" ><TR id=\"vNavTR_Link_CityGov1\"><TD ALIGN=\"left\" VALIGN=\"MIDDLE\" NOWRAP=\"NOWRAP\" id=\"CityGov_Link1\" style=\"cursor: pointer;cursor: hand;color:#000066;font-size: 1px; line-height: 1px;text-decoration: underline;\" onmouseover=\"doMouseChange(nav_CityGov,this,\'1\',true);\" onmouseout=\"doMouseChange(nav_CityGov,this,\'1\',false);\"><A HREF=\"\/citygov\/council.html\" TARGET=\"_self\" STYLE=\"text-decoration:none;\" NAME=\"Council & Administration\"><IMG style=\"display: block;\" SRC=\"\/tp.gif\" WIDTH=\"1\" HEIGHT=\"5.0\" BORDER=\"0\"><FONT ID=\"CityGov_f1\" FACE=\"\'Times New Roman\', Times, serif\" CLASS=\"size12 TimesRoman12\" STYLE=\"color:#000066\">Council&nbsp;&amp;&nbsp;Administration<\/FONT><IMG style=\"display: block;\" SRC=\"\/tp.gif\" WIDTH=\"1\" HEIGHT=\"5.0\" BORDER=\"0\"><\/A><\/TD><\/TR><TR id=\"vNavTR_Link_CityGov2\"><TD ALIGN=\"left\" VALIGN=\"MIDDLE\" NOWRAP=\"NOWRAP\" id=\"CityGov_Link2\" style=\"cursor: pointer;cursor: hand;color:#000066;font-size: 1px; line-height: 1px;text-decoration: underline;\" onmouseover=\"doMouseChange(nav_CityGov,this,\'2\',true);\" onmouseout=\"doMouseChange(nav_CityGov,this,\'2\',false);\"><A HREF=\"\/citygov\/elections.html\" TARGET=\"_self\" STYLE=\"text-decoration:none;\" NAME=\"Elections\"><IMG style=\"display: block;\" SRC=\"\/tp.gif\" WIDTH=\"1\" HEIGHT=\"5.0\" BORDER=\"0\"><FONT ID=\"CityGov_f2\" FACE=\"\'Times New Roman\', Times, serif\" CLASS=\"size12 TimesRoman12\" STYLE=\"color:#000066\">Elections<\/FONT><IMG style=\"display: block;\" SRC=\"\/tp.gif\" WIDTH=\"1\" HEIGHT=\"5.0\" BORDER=\"0\"><\/A><\/TD><\/TR><TR id=\"vNavTR_Link_CityGov3\"><TD ALIGN=\"left\" VALIGN=\"MIDDLE\" NOWRAP=\"NOWRAP\" id=\"CityGov_Link3\" style=\"cursor: pointer;cursor: hand;color:#000066;font-size: 1px; line-height: 1px;text-decoration: underline;\" onmouseover=\"doMouseChange(nav_CityGov,this,\'3\',true);\" onmouseout=\"doMouseChange(nav_CityGov,this,\'3\',false);\"><A HREF=\"\/citygov\/finance.html\" TARGET=\"_self\" STYLE=\"text-decoration:none;\" NAME=\"Finance\"><IMG style=\"display: block;\" SRC=\"\/tp.gif\" WIDTH=\"1\" HEIGHT=\"5.0\" BORDER=\"0\"><FONT ID=\"CityGov_f3\" FACE=\"\'Times New Roman\', Times, serif\" CLASS=\"size12 TimesRoman12\" STYLE=\"color:#000066\">Finance<\/FONT><IMG style=\"display: block;\" SRC=\"\/tp.gif\" WIDTH=\"1\" HEIGHT=\"5.0\" BORDER=\"0\"><\/A><\/TD><\/TR><TR id=\"vNavTR_Link_CityGov4\"><TD ALIGN=\"left\" VALIGN=\"MIDDLE\" NOWRAP=\"NOWRAP\" id=\"CityGov_Link4\" style=\"cursor: pointer;cursor: hand;color:#000066;font-size: 1px; line-height: 1px;text-decoration: underline;\" onmouseover=\"doMouseChange(nav_CityGov,this,\'4\',true);\" onmouseout=\"doMouseChange(nav_CityGov,this,\'4\',false);\"><A HREF=\"\/citygov\/minutes.html\" TARGET=\"_self\" STYLE=\"text-decoration:none;\" NAME=\"Meeting Agendas & Minutes\"><IMG style=\"display: block;\" SRC=\"\/tp.gif\" WIDTH=\"1\" HEIGHT=\"5.0\" BORDER=\"0\"><FONT ID=\"CityGov_f4\" FACE=\"\'Times New Roman\', Times, serif\" CLASS=\"size12 TimesRoman12\" STYLE=\"color:#000066\">Meeting&nbsp;Agendas&nbsp;&amp;&nbsp;Minutes<\/FONT><IMG style=\"display: block;\" SRC=\"\/tp.gif\" WIDTH=\"1\" HEIGHT=\"5.0\" BORDER=\"0\"><\/A><\/TD><\/TR><TR id=\"vNavTR_Link_CityGov5\"><TD ALIGN=\"left\" VALIGN=\"MIDDLE\" NOWRAP=\"NOWRAP\" id=\"CityGov_Link5\" style=\"cursor: pointer;cursor: hand;color:#000066;font-size: 1px; line-height: 1px;text-decoration: underline;\" onmouseover=\"doMouseChange(nav_CityGov,this,\'5\',true);\" onmouseout=\"doMouseChange(nav_CityGov,this,\'5\',false);\"><A HREF=\"\/citygov\/ordinances.html\" TARGET=\"_self\" STYLE=\"text-decoration:none;\" NAME=\"Code of Ordinances\"><IMG style=\"display: block;\" SRC=\"\/tp.gif\" WIDTH=\"1\" HEIGHT=\"5.0\" BORDER=\"0\"><FONT ID=\"CityGov_f5\" FACE=\"\'Times New Roman\', Times, serif\" CLASS=\"size12 TimesRoman12\" STYLE=\"color:#000066\">Code&nbsp;of&nbsp;Ordinances<\/FONT><IMG style=\"display: block;\" SRC=\"\/tp.gif\" WIDTH=\"1\" HEIGHT=\"5.0\" BORDER=\"0\"><\/A><\/TD><\/TR><\/TABLE><script type="text/javascript">addMouseAndStyleSupportCityGov(nav_CityGov,"ntb'+navTBSuffix+'");'+'</scri'+'pt>');
461	}
462

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.