

	// calls all the site's custom stuff.
		var startSite = function() {
			if (document.getElementById('homepage')) { setHome(); }
			if (client.engine == 'msie' && client.engRev < 7) { fixBoxes(); };
			fixFlexFlash();
			flexResults();
			flexIntro();
		}



	// fixes a content-length problem with with design
		var fixFlexFlash = function() {
			var flextest = getByClass('swfhandler-swfCont flextest')
			if ((!swf.rev ||swf.rev < swf.defaults.revReq) && flextest.length) {
				flextest = getByClass('swfhandler-swfCont flextest')[0];
				flextest.style.height = 'auto';
			}
		}



		var flexResults = function() {
			var bars = document.getElementById('bars')
			if (bars) {
				var flexVersion = bars.getAttribute('flextest')
				drawBars(flexVersion);
				printMessage(flexVersion);
			}
		}



		var flexIntro = function() {
			if (document.location.search.indexOf('skipintro=true') != -1) {
				document.getElementById('tripleFlexCheck').style.display = 'none';
				document.getElementById('surveyForm').style.display      = 'block';
			}
		}



	// these functions are for the homepage
		var getHomeDom  = function() {
			var domObj = {
				images : document.getElementById('prodSets').getElementsByTagName('img'),
				texts  : document.getElementById('prodParas').getElementsByTagName('img'),
				links  : document.getElementById('prodLinks').getElementsByTagName('div')
			}
			return domObj;
		}
		var homeHideAll = function() {
			var parts = getHomeDom();
			for (var i in parts) {
				var thisPart = parts[i]
				for (var ii = 0; ii < thisPart.length; ii++) {
					thisPart[ii].style.display = 'none';
				}
			}
		};
		var homeShow0   = function() {
			homeHideAll();
			var parts = getHomeDom();
				parts.images[0].style.display = 'block';
				parts.texts[0].style.display  = 'block';
				parts.links[1].style.display  = 'block';
		};
		var homeShow1   = function() {
			clearTimeout(window.delayHomeOut);
			homeHideAll();
			var parts = getHomeDom();
				parts.images[1].style.display = 'block';
				parts.texts[1].style.display = 'block';
				parts.links[0].style.display = 'block';
		};
		var homeShow2   = function() {
			clearTimeout(window.delayHomeOut);
			homeHideAll();
			var parts = getHomeDom();
				parts.images[2].style.display = 'block';
				parts.texts[2].style.display = 'block';
				parts.links[1].style.display = 'block';
		};
		var homeShow3   = function() {
			clearTimeout(window.delayHomeOut);
			homeHideAll();
			var parts = getHomeDom();
				parts.images[3].style.display = 'block';
				parts.texts[3].style.display = 'block';
				parts.links[2].style.display = 'block';
		};
		var setHome     = function() {
			var flexTestLink = document.getElementById('flexTestLink');
				if (flexTestLink) {
					flexTestLink.onmouseover = function() { document.getElementById('homeContentPara0').setSrc('global/img/tf_text_main_over.jpg'); }
					flexTestLink.onmouseout  = function() { document.getElementById('homeContentPara0').setSrc('global/img/img_homeCont_0.jpg'); }
				}
			var prodLinks = {
				prodLinks1 : getByClass('prodLink1'),
				prodLinks2 : getByClass('prodLink2'),
				prodLinks3 : getByClass('prodLink3')
			}
			for (var i in prodLinks) {
				var linkName   = i;
				var theseLinks = prodLinks[i]
				for (var ii = 0; ii < theseLinks.length; ii++) {
					switch (linkName) {
						case 'prodLinks1':
							theseLinks[ii].onmouseover = function() { homeShow1(); }
						break;
						case 'prodLinks2':
							theseLinks[ii].onmouseover = function() { homeShow2(); }
						break;
						case 'prodLinks3':
							theseLinks[ii].onmouseover = function() { homeShow3(); }
						break;
					}
					theseLinks[ii].onmouseout = function() {
						window.delayHomeOut = setTimeout(homeShow0, 20);
					}
				}
			}
		}


	// this function fixes some IE 6 layout issue bs.
		var fixBoxes = function() {
			var divs = getByClass('listBoxContentAreaParent');
			for (var i = 0; i< divs.length; i++) {
				var thisDiv = divs[i];
				var height = (thisDiv.offsetHeight/10) + 'em';
					thisDiv.style.height    = height;
			}
		}


	// utility, gets a list of child elements by className
		var getByClass = function(thisClass) {
			thisObj = document.getElementsByTagName('body')[0];
			var theseChildren = [];
			if (typeof(thisObj) != 'function') {
				var allChildren   = thisObj.getElementsByTagName('*');
				for (var i = 0; i < allChildren.length; i++) {
					var thisChild = allChildren[i];
					if (thisChild.className == thisClass && typeof(thisChild) != 'function') {
						theseChildren.push(thisChild);
					}
				}
			}
			return theseChildren;
		}


		initSequence.push(startSite);


	function Popup(page,w,h) {
		x = (screen.availWidth-w)/2;
		y = (screen.availHeight-h)/2;
		OpenWin = this.open(page, "NewWindow", "height=" + h + ",width=" + w + ",left=" + x +",top=" +y +",location=no,scrollbars=yes");
	}