// function changecss() made by Shawn Olson - Copyright 2004 - http://www.shawnolson.net
/* ThinkQuest International 2006/2007
   TQ Toolkit - A web building guide for ThinkQuesters (C)
   Your TQ Guides (R)
   Visit http://library.thinkquest.org/06aug/02048/

*/

var defwords = new Array();
var elmnts = new Array();
var foundDefs = new Array()
var definition = "Definition not found";
var dn = new Array();

defwords[0]="client-side";
defwords[1]="nebulas";
defwords[2]="css";
defwords[3]="javascript";
defwords[4]="parsers";
defwords[5]="xhtml";
defwords[6]="backward compatibility";
defwords[7]="ajax";
defwords[8]="amaya";
defwords[9]="analogous colors";
defwords[10]="applets";
defwords[11]="attributes";
defwords[12]="basic tables module";
defwords[13]="bi-directional text module";
defwords[14]="browser";
defwords[15]="citation";
defwords[16]="client image map module";
defwords[17]="complementary colors";
defwords[18]="cookies";
defwords[19]="disclaimer";
defwords[20]="doctype";
defwords[21]="dreamweaver";
defwords[22]="dtd";
defwords[23]="embedded styles";
defwords[24]="gif";
defwords[25]="gimp";
defwords[26]="glossary";
defwords[27]="html";
defwords[28]="hypertext";
defwords[29]="iframe";
defwords[30]="image map";
defwords[31]="in-line styles";
defwords[32]="ipix";
defwords[33]="jargons";
defwords[34]="javascript";
defwords[35]="jpeg";
defwords[36]="markup";
defwords[37]="mathml";
defwords[38]="nesting";
defwords[39]="nvu";
defwords[40]="png";
defwords[41]="podcast";
defwords[42]="primary colors";
defwords[43]="reference";
defwords[44]="scripting";
defwords[45]="secondary colors";
defwords[46]="simpletext";
defwords[47]="site map";
defwords[48]="splash page";
defwords[49]="split complementary colors";
defwords[50]="svg";
defwords[51]="template";
defwords[52]="transcript";
defwords[53]="typeface";
defwords[54]="typography";
defwords[55]="url";
defwords[56]="utf-8";
defwords[57]="validating";
defwords[58]="webdav";
defwords[59]="wysiwyg";
defwords[60]="w3c";
defwords[61]="xml";
defwords[62]="external styles";
defwords[63]="well-formed";
defwords[64]="sgml";
defwords[65]="leading";
defwords[66]="compression";
defwords[67]="dhtml";
defwords[68]="server";
defwords[69]="dom";
defwords[70]="object oriented programming";

function getElementsByClassName(oElm, strTagName, oClassNames){
    var arrElements = (strTagName == "*" && document.all)? document.all : 
    oElm.getElementsByTagName(strTagName);
    var arrReturnElements = new Array();
    var arrRegExpClassNames = new Array();
    if(typeof oClassNames == "object"){
        for(var i=0; i<oClassNames.length; i++){
            arrRegExpClassNames.push(new RegExp("(^|\\s)" + 
            oClassNames[i].replace(/\-/g, "\\-") + "(\\s|$)"));
        }
    }
    else{
        arrRegExpClassNames.push(new RegExp("(^|\\s)" + 
        oClassNames.replace(/\-/g, "\\-") + "(\\s|$)"));
    }
    var oElement;
    var bMatchesAll;
    for(var j=0; j<arrElements.length; j++){
        oElement = arrElements[j];
        bMatchesAll = true;
        for(var k=0; k<arrRegExpClassNames.length; k++){
            if(!arrRegExpClassNames[k].test(oElement.className)){
                bMatchesAll = false;
                break;                      
            }
        }
        if(bMatchesAll){
            arrReturnElements.push(oElement);
        }
    }
    return (arrReturnElements)
}

function getDef(){
	for(c = 0; c<defwords.length; c++)
	{
		var keyword = elmnts[z].childNodes[0].nodeValue.toLowerCase();
		if(keyword == defwords[c])
		{
			return c;
		}
	}
}

function getDefinitions() {

	elmnts = getElementsByClassName(document, "a", "key");
	
	for(z=0; z<elmnts.length; z++)
	{
		definition = getDef();
		
		switch(definition)
		{
			case 0:
				elmnts[z].onmouseover = function(){overlib("Processing on local computer")};
				break;
			case 1:
				elmnts[z].onmouseover = function(){overlib("Clouds of gases in space")};
				break;
			case 2:
				elmnts[z].onmouseover = function(){overlib("Cascading Style Sheet is made of rules which tell your browser how to present your webpage")};
				break;
			case 3:
				elmnts[z].onmouseover = function(){overlib("A scripting language based on the concept of prototype-based programming")};
				break;
			case 4:
				elmnts[z].onmouseover = function(){overlib("Component of Compiler which analyzes code")};
			case 5:
				elmnts[z].onmouseover = function(){overlib("Extensible HyperText Markup Language is a markup language that has the same depth of expression as HTML, but a stricter syntax.")};
				break;
			case 6:
				elmnts[z].onmouseover = function(){overlib("Remains usable in previous versions")};
				break;
			case 7:
				elmnts[z].onmouseover = function(){overlib("Asynchronous JavaScript and XML")};
				break;
			case 8:
				elmnts[z].onmouseover = function(){overlib("The World Wide Web Consortium's (W3C) web editor cum web browser")};
				break;
			case 9:
				elmnts[z].onmouseover = function(){overlib("Colors that sit beside each other in the color wheel")};
				break;
			case 10:
				elmnts[z].onmouseover = function(){overlib("A small application such as those typically provided with operating systems")};
				break;
			case 11:
				elmnts[z].onmouseover = function(){overlib("Additional information that extend the capabilities of elements, such as to control fonts, border spacing, text alignment")};
				break;
			case 12:
				elmnts[z].onmouseover = function(){overlib("A set of instructions to define the basic table elements")};
				break;
			case 13:
				elmnts[z].onmouseover = function(){overlib("A set of instructions that defines an element that can be used to declare the bi-directional rules for the element’s content")};
				break;
			case 14:
				elmnts[z].onmouseover = function(){overlib("A program to surf the Internet")};
			case 15:
				elmnts[z].onmouseover = function(){overlib("The quoting of an authoritative source for substantiation")};
				break;
			case 16:
				elmnts[z].onmouseover = function(){overlib("A module defining browser side image map elements")};
				break;
			case 17:
				elmnts[z].onmouseover = function(){overlib("Colors opposite each other in the color wheel")};
				break;
			case 18:
				elmnts[z].onmouseover = function(){overlib("Collections of information, usually including a username and the current date and time, stored on the local computer of a person using the World Wide Web")};
				break;
			case 19:
				elmnts[z].onmouseover = function(){overlib("Legal notice of responsibilities not covered by the producer")};
				break;
			case 20:
				elmnts[z].onmouseover = function(){overlib("Document Type")};
				break;
			case 21:
				elmnts[z].onmouseover = function(){overlib("A commercial web building software by Adobe")};
				break;
			case 22:
				elmnts[z].onmouseover = function(){overlib("Document Type Definition is used to define the legal productions of a particular markup language")};
				break;
			case 23:
				elmnts[z].onmouseover = function(){overlib("Style information stored in the HTML enclosed by the style tags")};
				break;
			case 24:
				elmnts[z].onmouseover = function(){overlib("Graphic Interchange Format")};
			case 25:
				elmnts[z].onmouseover = function(){overlib("General Image Manipulation Program is an open source image editing software")};
				break;
			case 26:
				elmnts[z].onmouseover = function(){overlib("A list of terms with accompanying definitions")};
				break;
			case 27:
				elmnts[z].onmouseover = function(){overlib("HyperText Markup Language is the predominant markup language for the creation of web pages")};
				break;
			case 28:
				elmnts[z].onmouseover = function(){overlib("A user interface paradigm for displaying documents and a way of organizing material that attempts to overcome the inherent limitations of traditional text and in particular its linearity")};
				break;
			case 29:
				elmnts[z].onmouseover = function(){overlib("A HTML element that allows other HTML document to be embedded inside the main document")};
				break;
			case 30:
				elmnts[z].onmouseover = function(){overlib("A list of coordinates relating to a specific image created in order to link areas of the image to external locations")};
				break;
			case 31:
				elmnts[z].onmouseover = function(){overlib("Style declared in style attribute of a HTML tag")};
				break;
			case 32:
				elmnts[z].onmouseover = function(){overlib("Interface Processor for Imagery Exchange is a virtual reality program")};
				break;
			case 33:
				elmnts[z].onmouseover = function(){overlib("Technical words used by a group of people, usually a profession")};
				break;
			case 34:
				elmnts[z].onmouseover = function(){overlib("A scripting language based on the concept of prototype-based programming")};
			case 35:
				elmnts[z].onmouseover = function(){overlib("Joint Photographic Experts Group")};
				break;
			case 36:
				elmnts[z].onmouseover = function(){overlib("A method of adding information to the text indicating the logical components of a document")};
				break;
			case 37:
				elmnts[z].onmouseover = function(){overlib("Mathematical Markup Language")};
				break;
			case 38:
				elmnts[z].onmouseover = function(){overlib("Containing elements within other elements")};
				break;
			case 39:
				elmnts[z].onmouseover = function(){overlib("An open-source WYSIWYG HTML editor")};
				break;
			case 40:
				elmnts[z].onmouseover = function(){overlib("Portable Network Graphics")};
				break;
			case 41:
				elmnts[z].onmouseover = function(){overlib("A web-based audio broadcast acquired via an RSS feed, accessed by subscription over the Internet")};
				break;
			case 42:
				elmnts[z].onmouseover = function(){overlib("Red, Green, Blue")};
				break;
			case 43:
				elmnts[z].onmouseover = function(){overlib("A note in a publication referring the reader to another passage or source")};
				break;
			case 44:
				elmnts[z].onmouseover = function(){overlib("A computer programming language that is typically interpreted")};
			case 45:
				elmnts[z].onmouseover = function(){overlib("Colors that are obtained by mixing two adjacent primary colors")};
				break;
			case 46:
				elmnts[z].onmouseover = function(){overlib("The native text editor for the Classic Mac OS which allows for text formatting")};
				break;
			case 47:
				elmnts[z].onmouseover = function(){overlib("A textual or visual index of a Web site’s contents")};
				break;
			case 48:
				elmnts[z].onmouseover = function(){overlib("A page which a viewer would see prior to entering the main page")};
				break;
			case 49:
				elmnts[z].onmouseover = function(){overlib("Sets of colors opposite each other on the color wheel")};
				break;
			case 50:
				elmnts[z].onmouseover = function(){overlib("Scalable Vector Graphics")};
				break;
			case 51:
				elmnts[z].onmouseover = function(){overlib("An electronic file that is pre-designed")};
				break;
			case 52:
				elmnts[z].onmouseover = function(){overlib("Something transcribed in a written, typewritten form")};
				break;
			case 53:
				elmnts[z].onmouseover = function(){overlib("A set comprising of an alphabet of letters, numerals, punctuation marks, ideograms or symbols")};
				break;
			case 54:
				elmnts[z].onmouseover = function(){overlib("Typography is the balance and interplay of letterforms on the page, a verbal and visual equation that helps the reader understand the form and absorb the substance of the page content")};
			case 55:
				elmnts[z].onmouseover = function(){overlib("Uniform Resource Locator, a protocol for specifying addresses on the Internet")};
				break;
			case 56:
				elmnts[z].onmouseover = function(){overlib("UCS transformation format 8")};
				break;
			case 57:
				elmnts[z].onmouseover = function(){overlib("The process of checking if a document fulfills the current standards")};
				break;
			case 58:
				elmnts[z].onmouseover = function(){overlib("Web-based Distributed Authoring and Versioning refers to the set of extensions to the HTTP protocol that the group defined which allows users to collaboratively edit and manage files on remote web servers")};
				break;
			case 59:
				elmnts[z].onmouseover = function(){overlib("What you see is what you get")};
				break;
			case 60:
				elmnts[z].onmouseover = function(){overlib("World Wide Web Consortium")};
				break;
			case 61:
				elmnts[z].onmouseover = function(){overlib("Extensible Markup Language (XML) is a markup language that supports a wide variety of applications")};
				break;
			case 62:
				elmnts[z].onmouseover = function(){overlib("Styles attached to a HTML document in a separate file")};
				break;
			case 63:
				elmnts[z].onmouseover = function(){overlib("A document is well-formed when it is structured according to the rules defined in Section 2.1 of the XML 1.0 Recommendation")};
				break;
			case 64:
				elmnts[z].onmouseover = function(){overlib("Standard Generalized Markup Language (SGML) is a metalanguage in which one can define markup languages for documents")};
				break;
			case 65:
				elmnts[z].onmouseover = function(){overlib("The vertical space in a text block")};
				break;
			case 66:
				elmnts[z].onmouseover = function(){overlib("Process of reducing redundancy of the image data in order to be able to store or transmit data in an efficient form")};
				break;
			case 67:
				elmnts[z].onmouseover = function(){overlib("Dynamic HTML is collection of technologies used together to create interactive and animated web sites")};
				break;
			case 68:
				elmnts[z].onmouseover = function(){overlib("A computer that is responsible for accepting HTTP requests from web browsers, and serving them HTTP responses along with optional data contents")};
				break;
			case 69:
				elmnts[z].onmouseover = function(){overlib("Document Object Model is a platform and language-independent standard object model for representing HTML or XML and related formats")};
				break;
			case 70:
				elmnts[z].onmouseover = function(){overlib("A programming paradigm that uses objects to design applications and computer programs")};
				break;
			default:
				elmnts[z].onmouseover = function(){overlib("Definition Not Found")};
				break;
		}
		elmnts[z].onmouseout = function(){nd();};
	}
}
