\n"); outputFrame.write("\n"); outputFrame.write(prefixHTML + "\n\n"); if (treeData[1].target == "") {var targetFrame = defaultTargetFrame} else {var targetFrame = treeData[1].target} if (treeData[1].icon == "") {var imageString = defaultImageURL + 'img-globe-' + structureStyle + '.gif'} else {imageString = defaultImageURL + treeData[1].icon} outputFrame.write("" + treeData[1].url + " " + treeData[1].name + "
\n"); drawBranch("root",""); outputFrame.write("
\n" + suffixHTML + "\n"); outputFrame.write("
\n\n"); outputFrame.close(); window.status="Thank you for visiting our Thinkquest Entry. Click on any of the icons to load the appropriate page."; } // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // drawBranch() - GENERAL FUNCTION - used by the drawTree() function to recursively draw all // visable nodes in the tree structure. function drawBranch(startNode,structureString) { var children = extractChildrenOf(startNode); var currentIndex = 1; while (currentIndex <= children.length) { outputFrame.write(structureString); if (children[currentIndex].type == 'link') { if (children[currentIndex].icon == "") { var imageString = defaultImageURL + defaultLinkIcon; } else {var imageString = defaultImageURL + children[currentIndex].icon} if (children[currentIndex].target == "") { var targetFrame = defaultTargetFrame; } else {var targetFrame = children[currentIndex].target} if (currentIndex != children.length) { outputFrame.write("") } else { outputFrame.write("") } outputFrame.write("" + children[currentIndex].url + " " + children[currentIndex].name + "
\n") } else { var newStructure = structureString; if (children[currentIndex].iconClosed == "") {var iconClosed = "img-folder-closed-" + structureStyle + ".gif"} else {var iconClosed = children[currentIndex].iconClosed} if (children[currentIndex].iconOpen == "") {var iconOpen = "img-folder-open-" + structureStyle + ".gif"} else {var iconOpen = children[currentIndex].iconOpen} if (currentIndex != children.length) { if (children[currentIndex].open == 0) { outputFrame.write("Click to open this folder") outputFrame.write("Click to open this folder " + children[currentIndex].name + "
\n") } else { outputFrame.write("Click to close this folder"); outputFrame.write("Click to close this folder " + children[currentIndex].name + "
\n"); newStructure = newStructure + ""; drawBranch(children[currentIndex].id,newStructure); } } else { if (children[currentIndex].open == 0) { outputFrame.write("Click to open this folder") outputFrame.write("Click to open this folder " + children[currentIndex].name + "
\n") } else { outputFrame.write("Click to close this folder"); outputFrame.write("Click to close this folder " + children[currentIndex].name + "
\n"); newStructure = newStructure + ""; drawBranch(children[currentIndex].id,newStructure); } } } currentIndex++; } } // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // toggleFolder() - GENERAL FUNCTION - opens/closes folder nodes. function toggleFolder(id,status) { var nodeIndex = indexOfNode(id); treeData[nodeIndex].open = status; timeOutId = setTimeout("drawTree()",100)} // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // indexOfNode() - GENERAL FUNCTION - finds the index in the treeData Collection of the node // with the given id. function indexOfNode(id) { var currentIndex = 1; while (currentIndex <= treeData.length) { if ((treeData[currentIndex].type == 'root') || (treeData[currentIndex].type == 'folder')) { if (treeData[currentIndex].id == id) {return currentIndex}} currentIndex++} return -1} // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // extractChildrenOf() - GENERAL FUNCTION - extracts and returns a Collection containing all // of the node's immediate children nodes. function extractChildrenOf(node) { var children = new Collection(); var currentIndex = 1; while (currentIndex <= treeData.length) { if ((treeData[currentIndex].type == 'folder') || (treeData[currentIndex].type == 'link')) { if (treeData[currentIndex].parent == node) { children.add(treeData[currentIndex])}} currentIndex++} return children} // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Collection() - OBJECT - a dynamic storage structure similar to an Array. function Collection() { this.length = 0; this.add = add; return this} // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // add() - METHOD of Collection - adds an object to a Collection. function add(object) { this.length++; this[this.length] = object} // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // RootNode() - OBJECT - represents the top-most node of the hierarchial tree. function RootNode(id,name,url,target,icon) { this.id = id; this.name = name; this.url = url; this.target = target; this.icon = icon; this.type = 'root'; return this} // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // FolderNode() - OBJECT - represents a node which branches to contain other nodes. function FolderNode(id,parent,name,iconClosed,iconOpen) { this.id = id; this.parent = parent; this.name = name; this.iconClosed = iconClosed; this.iconOpen = iconOpen; this.type = 'folder'; this.open = 0; return this} // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // LinkNode() - OBJECT - a node that represents a link using a URL. function LinkNode(parent,name,url,target,icon) { this.parent = parent; this.name = name; this.url = url; this.target = target; this.icon = icon; this.type = 'link'; return this} // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // loadData() - GENERAL FUNCTION - user defined data and variables exist in this function. function loadData() { // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Tree structure definitions: // Syntax: // ROOT NODE: // treeData.add(new RootNode("","","","","")); // NOTE: There must be only ONE root node, and it MUST be the FIRST node. // and can be left null - defaults will be used. // FOLDER NODE: // treeData.add(new FolderNode("","","","","")); // NOTE: Folder nodes MUST have a valid parent node, and they SHOULD have children nodes. // and can be left null - OmenTree will use the // default images. // LINK NODE: // treeData.add(new LinkNode("","","","","")); // NOTE: and may be left null - defaults specified in the user // defined variables section will be used. // Consult the OmenTree documentation for further assistance. treeData = new Collection(); treeData.add(new RootNode('root','Civil War','blank.html','','image-country.gif')); // Root Node MUST be first! treeData.add(new LinkNode('root','Timeline','html/Timline.htm','','img-time.gif')); treeData.add(new FolderNode('land','root','On Land','image-gun.gif','image-gun.gif')); treeData.add(new FolderNode('gettysburg','land','Gettysburg','image-gun.gif','image-gun.gif')); treeData.add(new LinkNode('gettysburg','Overview','html/gettys.html','','image-gun.gif')); treeData.add(new LinkNode('gettysburg','Day 1','html/gettyday1.html','','image-gun.gif')); treeData.add(new LinkNode('gettysburg','Day 2','html/gettyday2.html','','image-gun.gif')); treeData.add(new LinkNode('gettysburg','Day 3','html/gettyday3.html','','image-gun.gif')); treeData.add(new LinkNode('gettysburg','Gettysburg Address','html/gettysadd.htm','','image-doc.gif')); treeData.add(new LinkNode('land','Antietam','html/Antietam1.htm','','image-gun.gif')); treeData.add(new LinkNode('land','Trivia Game','html/Quizbattles.html','','image-gun.gif')); treeData.add(new FolderNode('sea','root','On Sea','img-boat.gif','img-boat.gif')); treeData.add(new LinkNode('sea','Sultana','html/Sultana.htm','','img-boat.gif')); treeData.add(new FolderNode('people','root','People','img-stick.gif','img-stick.gif')); treeData.add(new FolderNode('north','people','North','image-union.gif','image-union.gif')); treeData.add(new LinkNode('north','Abraham Lincoln','html/Lincoln.html','','image-union.gif')); treeData.add(new LinkNode('north','Emancipation Proclamation','html/Emanproc.htm','','image-doc.gif')); treeData.add(new LinkNode('north','Ulysses Grant','html/Grant1.htm','','image-union.gif')); treeData.add(new FolderNode('south','people','South','smallconfed.gif','smallconfed.gif')); treeData.add(new LinkNode('south','Robert E. Lee','html/Lee1.htm','','smallconfed.gif')); treeData.add(new LinkNode('south','Jefferson Davis','html/Davis.htm','','smallconfed.gif')); treeData.add(new LinkNode('south','Stonewall Jackson','html/Jackson.htm','','smallconfed.gif')); treeData.add(new LinkNode('people','Quiz About People','html/People.html','','img-stick.gif')); treeData.add(new FolderNode('activity','root','Learning Activities','img-search.gif','img-maze.gif')); treeData.add(new LinkNode('activity','Word Search','html/Search.htm','','img-search.gif')); treeData.add(new LinkNode('activity','Maze','html/Maze.html','','img-maze.gif')); treeData.add(new LinkNode('activity','Dot to Dot Game','html/Dottodot.htm','','img-dot.gif')); treeData.add(new LinkNode('activity','Word Scramble','html/Scramble.htm','','img-scramble.gif')); treeData.add(new LinkNode('activity','Board Game','html/Board1.htm','','img-game.gif')); treeData.add(new FolderNode('links','root','Other Civil War Links','','')); treeData.add(new LinkNode('links','Official Sultana Site','http://www.sultana.org/','','img-page-link.gif')); treeData.add(new LinkNode('links','Ulysses Grant','http://www.mscomm.com/~ulysses/ ','','img-page-link.gif')); treeData.add(new LinkNode('links','Lincoln','http://www.historyplace.com/lincoln/index.html ','','img-page-link.gif')); treeData.add(new LinkNode('links','Robert E. Lee Site','http://members.tripod.com/~jrw6/lee.htm ','','img-page-link.gif')); treeData.add(new LinkNode('links','Sultana','http://www.rapidnet.com/~greg/Tom/ ','','img-page-link.gif')); treeData.add(new LinkNode('links','Gettysburg','http://www.rockingham.k12.va.us/EMS/Gettysburg/Gettysburg.html','','img-page-link.gif')); treeData.add(new LinkNode('links','Jefferson Davis','http://www.pointsouth.com/csanet/greatmen/davis/davis.htm','','img-page-link.gif')); treeData.add(new LinkNode('links','Stonewall Jackson','http://www.waysideofva.com/stonewalljackson/ ','','img-page-link.gif')); treeData.add(new LinkNode('links','Antietam','http://www.infinet.com/~lstevens/a/other.html ','','img-page-link.gif')); treeData.add(new LinkNode('links','History Channel','http://www.historychannel.com','','img-page-link.gif')); treeData.add(new LinkNode('links','Awesome Reference','http://www.gcpl.lib.oh.us/services/gcr/gen_resources/cwsources.htm ','','img-page-link.gif')); treeData.add(new LinkNode('root','Give Us Feedback','gather/cgi-bin/gbook.html','','img-env.gif')); treeData.add(new LinkNode('root','Search Our Site','gather/search.html','','img-newsgroup.gif')); treeData.add(new LinkNode('root','Bibliography','html/Bibliography.htm','','img-book.gif')); // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // User defined variables: structureStyle = 0; // 0 for light background, 1 for dark background backgroundColor = '#FFFFFF'; // sets the bgColor of the menu textColor = '#000000'; // sets the color of the text used in the menu linkColor = '#0000AA'; // sets the color of any text links (usually defined in additional HTML sources) aLinkColor = '#FF0000'; // sets the active link color (when you click on the link) vLinkColor = '#880088'; // sets the visited link color backgroundImage = 'html/wortextb.gif'; // give the complete path to a gif or jpeg to use as a background image defaultTargetFrame = 'pageFrame'; // the name of the frame that links will load into by default defaultImageURL = 'images/'; // the URL or path where the OmenTree images are located defaultLinkIcon = 'img-page-globe.gif'; // the default icon image used for links omenTreeFont = 'MS Sans Serif,Arial,Helvetica'; // the font used for the menu omenTreeFontSize = 2; // its size - don't make it too big! // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Additional HTML sources: prefixHTML = ""; suffixHTML = "
Welcome to the Mayfield City Schools ThinkQuest Website. Click on any of the above icons to load the appropriate page."; } // End Hiding --> <body><!-- tql_banner_head --><script type="text/javascript" src="/banner/banner.js"></script></script><script>tql_drawTop();</script> <!-- tql_banner_foot --><script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-174705-4']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga); })(); </script></body>