

	// SITE INITIALIZATION GOES HERE.
		function setSite() {
		// begin inserting swf objects into dom
			handleDomReplace();
		// add menu support
			addMenuSupport()
		// initialize tables, if any
			if (typeof(setTables) == 'function') { setTables(); }
		// add support for sifr
			sifrSupport();
		}


		var allSwaps = [];

	// add in swf movies
		function handleDomReplace() {
		// get some divs
			var allDivs = document.getElementsByTagName('div');
		// loop through all divs
			for (var loop = 0; loop < allDivs.length; loop++) {
				var thisDiv = allDivs[loop];
			// isolate isSwfMovie divs
				if (thisDiv.getAttribute('domreplace') && thisDiv.getAttribute('domreplace') != '') {
				// get all attributes
					var attbrs     = thisDiv.attributes;
					var writeAttbrs = []
				// save custom attributes in a useful format
					for (var loop2 = 0; loop2 < attbrs.length; loop2++) {
						var name  = attbrs[loop2].name;
						var value = attbrs[loop2].value;
						if (value != '' && name != 'id' && name != 'class' && name != 'style') { writeAttbrs.push([name, value]) }
					}
					var thisElement = false;
					switch(thisDiv.getAttribute('domreplace')) {
					// handle swf movie replacement
						case 'swfMovie':
									// get some attributes
										var swfUrl    = thisDiv.getAttribute('url');
										var swfWidth  = thisDiv.getAttribute('width');
										var swfHeight = thisDiv.getAttribute('height');
									// make movie
											thisElement = swf.movie(swfUrl, swfWidth, swfHeight, 8);
									// write params
										for (var loop3=0; loop3 < writeAttbrs.length; loop3++) { 
										    thisElement.setParam(writeAttbrs[loop3][0], writeAttbrs[loop3][1]); 
										}
						break;
					// handle image swapper replacement
						case 'imageSwap':
									// get some attributes
										var thisUrl     = thisDiv.getAttribute('url');
										var swfWidth    = thisDiv.getAttribute('width');
										var swfHeight   = thisDiv.getAttribute('height');
										var swfRate     = thisDiv.getAttribute('rate');
										var swfInterval = thisDiv.getAttribute('interval') || false;
									// create new swapper
										allSwaps[allSwaps.length] = new swapImg(thisUrl, swfWidth, swfHeight, swfRate, thisDiv, swfInterval);
						break;
					}
				// insert DOM structure
					if (thisElement) { thisDiv.appendChild(thisElement); }
				}
			}
		}


	// add in main navigation
		function addMenuSupport() {
		//first, we must set flags for the midNav Array by the page-specific inline var
			if (typeof(midNav) != 'undefined' && typeof(activeNode) != 'undefined') { activeNode.push(true); }
		// create, and post process menus
			if (document.getElementById('topNav-bucket') && topNav) { createMajorNav(document.getElementById('topNav-bucket'), topNav, 'topNav', false, iePseudoClassSupport); }
			if (document.getElementById('midNav-bucket') && midNav) { createMajorNav(document.getElementById('midNav-bucket'), midNav, false,    false, setBehaviour); }
			if (document.getElementById('botNav-bucket') && botNav) { createMajorNav(document.getElementById('botNav-bucket'), botNav, false,    false, iePseudoClassSupport); }
		}


	// set sifr headers
		function sifrSupport() {
		// get some headers
			var allH1s = document.getElementsByTagName('H1');
			var allSifrText = []
		// get just the relevant elements
			for (var loop = 0; loop < allH1s.length; loop++) { if (allH1s[loop].className == 'sifrText') { allSifrText.push(allH1s[loop]); } }
		// transform relevant elements
			for (var loop = 0; loop < allSifrText.length; loop++) {
			// get the header info
				var headObj    = allSifrText[loop]
				var headCpy    = headObj.innerHTML
				var headWidth  = headObj.offsetWidth;
				var headHeight = headObj.offsetHeight;
			// create .swf object, demand version 6
				var swfMovie = swf.movie('/multimedia/sixflags-fiestatexas/futura_bold.swf', headWidth, headHeight, 6);
				if (swfMovie) {
				// if version adequate, add params
					swfMovie.setParam('quality', 'best');
					swfMovie.setParam('flashVars', 'txt=' + headCpy + '&textcolor=#9A9A9A&w=' + headWidth + '&h=' + headHeight);
					swfMovie.setParam('bgcolor', '#FFFFFF');
					swfMovie.setParam('wmode', 'opaque');
				// clear header and append swf
					headObj.innerHTML ='';
					swfMovie = headObj.appendChild(swfMovie);
					headObj.style.visibility = 'visible';
				}
			}
		}


