// see global-1.js for commented code
	var setMenus = function(thisUrl) {
		thisUrl = thisUrl || document.location.href;
		thisUrl = (/\#$/.test(thisUrl)) ? thisUrl.split('#')[0] : thisUrl;
		var highlightAll = true
		var allLists = document.getElementsByTagName('ul');
		for (var i = 0; i < allLists.length; i++) {
			var thisList = allLists[i];
			if (thisList.getAttribute('ismenu')) {
				var menuParent     = thisList;
				var allNavLinks    = menuParent.getElementsByTagName('a');
				var allNavElements = menuParent.getElementsByTagName('*');
				for (var aa = 0; aa < allNavElements.length; aa++) {
					var thisObj = allNavElements[aa];
					switch (thisObj.nodeName) {
						case 'LI':
							thisObj.className = '';
						break;
						case 'IMG':
							thisObj.outState();
						break;
					}
				}
				for (var bb = 0; bb < allNavLinks.length; bb++) {
					var thisLink = allNavLinks[bb];
						thisLink.ovrState = function() {
							clearTimeout(window.menuTimer);
							var thisHref = this.href;
							setMenus(this.href);
						}
						thisLink.outState = function() {
							setMenus();
						}
						thisLink.onmouseover = function() { this.ovrState(); }
						thisLink.onmouseout  = function() { window.menuTimer = setTimeout(this.outState, 100); }
				}
				for (var cc = 0; cc < allNavLinks.length; cc++) {
					var currentLink = allNavLinks[cc];
					if (currentLink.href == thisUrl) {
						var currentImg  = currentLink.getElementsByTagName('img')[0];
						var currentItem = currentLink.parentNode;
						var currentList = currentItem.parentNode;
						currentItem.className = 'current';
						if (currentImg.ovrState) { currentImg.ovrState(); currentImg.omouseout = null; }
						while (currentList != menuParent.parentNode) {
							if (currentList.nodeName == 'LI') { 
								currentList.className = 'current';
								for (var ddd = 0; ddd < currentList.childNodes.length; ddd++) {
									var thisNode = currentList.childNodes[ddd]
									if (highlightAll && thisNode.nodeName == 'A') { thisNode.firstChild.ovrState(); thisNode.firstChild.onmouseout = null; }
								}
							}
							currentList = currentList.parentNode;
						}
					}
				}
			}
		}
	}

	var showDictionary = function(showTerm) {
		var urlHash = document.url.hash;
		if (showTerm) {
			var goTerm = showTerm;
		} else if (urlHash) {
			urlHash = urlHash.toString();
			var goTerm = unescape(urlHash.split('goTerm=')[1].split(';')[0]);
		}
		var dictParent   = document.getElementById('dictionary');
		if (dictParent) {
			var dictShield   = dictParent.getElementsByTagName('div')[0];
				dictShield.style.display  = 'none';
			var glossParent  = document.getElementById('glossary');
				glossParent.style.display = 'block';
			var startBtn     = dictShield.getElementsByTagName('a')[0];
			setDictionary(showTerm);
		}
	}
	var setDictionary = function(showTerm) {
		var dictObject  = document.getElementById('glossary');
		var dictCounter = document.getElementById('glossary-showCount');
		if (dictObject) {
			dictObject.normalize();
			var allTerms = dictObject.getElementsByTagName('dt');
			var allDefs  = dictObject.getElementsByTagName('dd');
			var sectTabs = dictObject.getElementsByTagName('ul')[0].getElementsByTagName('li')
			var urlHash = document.url.hash;
			if (showTerm) {
				var goTerm = showTerm;
			} else if (urlHash) {
				urlHash = urlHash.toString();
				var goTerm = unescape(urlHash.split('goTerm=')[1].split(';')[0]);
			}
			var dictBreaks = 'abc-defghijklm-nopqrstuvwxyz'.split('-');
			var dictSects = [];
			var dictExpCont = function(index, showHide, noTrack) {
				var thisTerm = allTerms[parseInt(index)];
				var thisDef  = allDefs[parseInt(index)];
				if (typeof(showHide) != 'string') { showHide = (thisTerm.className == 'open') ? 'close' : 'open'; }
				if (showHide == 'open' && !noTrack) { algTrack('glossary: ' + s.pageName, thisTerm); }
				thisTerm.className = showHide;
				thisDef.className  = showHide;
				dictCount();
			}
			for (var i = 0; i < dictBreaks.length; i++) {
				var thisSect = dictBreaks[i];
				dictSects.push([]);
				for (var ii = 0; ii < thisSect.length; ii++) {
					var thisChar = thisSect.charAt(ii);
					for (var iii = 0; iii < allTerms.length; iii++) {
						var thisTerm  = allTerms[iii];
						var thisDefn  = allTerms[iii];
						var firstChar = thisTerm.innerHTML.charAt(0).toLowerCase();
						if (firstChar == thisChar) { dictSects[i].push(thisTerm); }
						if (i == 0) {
							thisTerm.setAttribute('nodeIndex', iii);
							thisDefn.setAttribute('nodeIndex', iii);
							thisTerm.onclick = function(showHide, preventTrack) { dictExpCont(this.getAttribute('nodeIndex'), showHide, preventTrack); }
						}
					}
				}
			}
			var goSect = function(num, showIndex) {
				dictObject.setAttribute('currentSect', num);
				for (var i in dictSects) {
					if (i == num) {
						sectTabs[i].firstChild.ovrState();
						sectTabs[i].firstChild.onmouseout = null;
					} else {
						sectTabs[i].firstChild.outState();
						sectTabs[i].firstChild.onmouseout = function() { this.outState(); };
					}
					for (var ii in dictSects[i]) {
						var thisTerm = dictSects[i][ii];
						thisTerm.onclick('close');
						thisTerm.style.display = (i == num) ? 'block' : 'none';
					}
				}
					var stopTracking = !(showIndex || false);
					dictSects[num][showIndex || 0].onclick('open', stopTracking);
			}
			if (allTerms.length != allDefs.length) { throw('CHECK DOCUMENT STRUCTURE! DICTIONARY TERMS AND DEFINITIONS DON\'T MATCH UP!!!'); }
			var totalTerms  = (allTerms.length);
				dictObject.setAttribute('totalSects', dictSects.length);
				dictObject.setAttribute('currentSect', 0);
			var dictCount = function() {
				openTerms   = 0;
				for (var i  = 0; i < allTerms.length; i++) {
					if (allTerms[i].className == 'open') { openTerms++; }
					dictCounter.innerHTML = 'Showing ' + openTerms + '/' + totalTerms;
				}
			}
			for (var i = 0; i < sectTabs.length; i++) {
				var thisTab     = sectTabs[i];
				thisTab.setAttribute('tabIndex', i)
					thisTab.onclick = function() { 
						var tabNum  = parseInt(this.getAttribute('tabIndex'));
						this.blur();
						goSect(tabNum);
					}
			}
			var prevBtn = dictObject.getElementsByTagName('a')[0];
				prevBtn.onclick = function() {
					var currentSect = parseInt(dictObject.getAttribute('currentSect'));
					var totalSects  = parseInt(dictObject.getAttribute('totalSects'));
					var tabNum      = (currentSect - 1 + totalSects) % totalSects;
					goSect(tabNum);
				}
			var nextBtn = dictObject.getElementsByTagName('a')[1];
				nextBtn.onclick = function() {
					var currentSect = parseInt(dictObject.getAttribute('currentSect'));
					var totalSects  = parseInt(dictObject.getAttribute('totalSects'));
					var tabNum      = (currentSect + 1) % totalSects;
					goSect(tabNum);
				}
			if (typeof(goTerm) != 'undefined') {
				for (var i = 0; i < dictSects.length; i++) {
					var thisSect = dictSects[i];
					for (var ii = 0; ii < thisSect.length; ii++) {
						var termHtml = thisSect[ii].innerHTML.toLowerCase().split(' ').join('');
						var termLink = goTerm.toLowerCase().split(' ').join('');
						if (termHtml == termLink) { goSect(i, ii); }
					}
				}
			} else {
				goSect(0);
			}
		}
	}
	var setDictLinks = function() {
		var allLinks    = document.getElementsByTagName('a');
		var dictObject  = document.getElementById('glossary');
		var glossUrl    = './dict.html#goTerm=';
		for (var i = 0; i < allLinks.length; i++) {
			var thisLink = allLinks[i];
			if (thisLink.className == 'dictLink') {
				if (dictObject) {
					thisLink.onclick = function() { showDictionary(this.innerHTML); }
				} else {
					thisLink.onclick = function() { 
						document.location.href = glossUrl + escape(this.innerHTML);
					}
				}
			}
		}
		var dictParent       = document.getElementById('dictionary');
		if (dictParent) {
			var dictShield   = dictParent.getElementsByTagName('div')[0];
			var startBtn     = dictShield.getElementsByTagName('a')[0];
				startBtn.onclick = function() { showDictionary(); algTrack('glossary: ' + s.pageName, thisLink); }
		}
	}
	function getElementsByClass(val){ 
		var all = document.all || document.getElementsByTagName('*');
		var arr = [];
		for(var k = 0; k < all.length; k++) if(all[k].className == val) arr[arr.length] = all[k];
		return arr;
	}
	var clickInit = function(){
		var allClicks = getElementsByClass("click");
		for(i=0; i<allClicks.length; i++){
			var thisClick = allClicks[i];
			var thisImage = thisClick.firstChild;


			try {
				if (thisImage.nodeName == 'IMG') {
					thisImage.onmouseover = null;
					thisImage.onmouseout  = null;
					if (client.engine == 'msie' && parseInt(client.engRev) == 6) {
						thisImage.outState();
					}
				}
			} catch (e) {
			}



			allClicks[i].onclick = function(){
				this.parentNode.className = (this.parentNode.className) ? "" : "expanded";
				if (client.engine != 'msie' && parseInt(client.engRev) != 6) {
					if(this.firstChild.src){
						var x = this.firstChild.src;
						this.firstChild.src = (x.substring(x.length-7, x.length)=="_on.png") ? x.substring(x.length-7, 0)+".png" : x.substring(x.length-4, 0)+"_on.png";
					}
				}
			}

		}
	}
	var setExtLink = function() {
		var extLink = document.getElementById('extLinkObj');
		if (extLink) {
			var link = document.url.querystring.pairs.goPage;
			extLink.onclick = function() {
				this.href = document.url.querystring.pairs.goPage;
				algTrack('externalLink: ' + link, this);
				window.open(link);
				return false;
			}
		}
	}
	var docSupport = function() {
		var searchResults = document.getElementById('searchResults');
		if (searchResults) {
		var allStrongs = searchResults.getElementsByTagName('strong');
			for (var i = 0; i < allStrongs.length; i++) {
				var thisStrong         = allStrongs[i];
					thisStrong.onclick = function() {
						var rowElement = this.parentNode.parentNode;
						if (rowElement.className.indexOf('shade') != -1) {
							rowElement.className = (rowElement.className == 'shade-show') ? 'shade' : 'shade-show';
						} else {
							rowElement.className = (rowElement.className == 'show')       ? ''      : 'show';
						}
						var drid = this.getAttribute('drid');
						if (drid && rowElement.className.indexOf('show') != -1) {
							algTrack('show dr: ' + drid, this);
						}
						else if (rowElement.className.indexOf('show') != -1) {
						    logNameSC(this.firstChild);
						}
					}
			}
		}
		var drloginid = document.body.getAttribute('drid');
		if (drloginid) {
			var dlAds = document.getElementById('dlAdsBtn');
			if (dlAds) {
				dlAds.onclick = function() {
					var adForm = document.forms[0];
					if (adForm) {
						var val = null;
						for(var i = 0; i < adForm.adselect.length; i++ ) {
							if( adForm.adselect[i].checked == true ) {
								var val = adForm.adselect[i].value;
								break;
							}
						}
						if (val) {
							algTrack('dr ' + drloginid + 'dl: '  + val, this);
							window.open('/docs/' + val);
						}
					}
				}
			}
		}
	}
	var surgeryGuide = function() {
		var surgGuidePrnt = document.getElementById('surgGuidePrnt');
		var surgGuidePrev = document.getElementById('surgGuidePrev');
		var selectAll     = document.getElementById('selectAll');
		var clearAll      = document.getElementById('clearAll');
		var addTextInput  = document.getElementById('addTextInput');
		var allInputs     = document.getElementsByTagName('input');
		var submitFunc = function() {
			var parentCodeChunk           = document.getElementById('right');
				parentCodeChunk           = parentCodeChunk.getElementsByTagName('ul')[0]
			var questionSects             = parentCodeChunk.childNodes;
			var printrCodeChunk           = document.createElement('div');
				printrCodeChunk.innerHTML = '';
			var lineFillDiv               = document.createElement('div');
				lineFillDiv.className     = 'lineFillDiv';
				lineFillDiv.innerHTML     = '&nbsp;';
				for (var i = 0; i < questionSects.length; i++) {
					var thisList  = questionSects[i];
					if (thisList.nodeType == 1) {
						var sectDiv            = document.createElement('div');
							sectDiv.innerHTML  = ''
						var thisTitle          = thisList.getElementsByTagName('a')[0].innerHTML;
						var allInputs          = thisList.getElementsByTagName('input');
						var ansCount           = 0;
						var sectHead           = document.createElement('h1');
							sectHead.innerHTML = thisTitle;
							sectHead           = sectDiv.appendChild(sectHead);
						for (var ii = 0; ii < allInputs.length; ii++) {
							var thisInput    = allInputs[ii];
							var questionWrap = thisInput.parentNode;
							if (questionWrap.className.indexOf('show') != -1) {
								ansCount++;
								switch(thisInput.type) {
									case 'checkbox':
										var questionCopy  = questionWrap.cloneNode(true);
										var deleteControl = questionCopy.removeChild(questionCopy.getElementsByTagName('input')[0]);
											questionCopy  = questionCopy.innerHTML;
									break;
									case 'text':
										 	questionCopy = thisInput.value
									break;
								}
								var thisCopy           = document.createElement('div');
									thisCopy.innerHTML = questionCopy;
									thisCopy.className = 'questCopy';
									sectDiv.appendChild(thisCopy);
								sectDiv.appendChild(lineFillDiv.cloneNode(true));
								sectDiv.appendChild(lineFillDiv.cloneNode(true));
								sectDiv.appendChild(lineFillDiv.cloneNode(true));
							}
							if (ansCount) { printrCodeChunk.appendChild(sectDiv); }
						}
					}
				}
			var rawHTMLdoc = '<html>\r\n\
								<head>\r\n\
									<style type="text/css">\r\n\
										body         { font-family: arial; font-size: 14px; color: #666666; }\r\n\
										h1           { font-family: arial; font-size: 16px; font-weight: bold; color: #351D0E; padding: 0; margin: 20px 0px 0px 0px; }\r\n\
										#wrapper     { margin: 0pt 30pt 0pt 30px; }\r\n\
										#head        { border-bottom: 1px dotted #351D0E; text-align: right; height: 104px; }\r\n\
										#questions   { float: left; }\r\n\
										#logo        {  }\r\n\
										.questCopy   { margin-top: 20px; }\r\n\
										.lineFillDiv { border-bottom: 1px solid #CCCCCC; height: 20px; }\r\n\
										#foot        { margin-top: 5px; }\r\n\
									</style>\r\n\
								</head>\r\n\
								<body>\
									<div id="wrapper">\r\n\
										<div id="head">\r\n\
											<img src="/global/img/sdg-questions.png" id="questions"/>\r\n\
											<img src="/global/img/sdg-logo.png"      id="logo"/>\r\n\
										</div>\r\n\
										<!-- content goes here -->\r\n\
										<div id="foot">\r\n\
											<img src="/global/img/sdg-foot.png" id="foot"/>\r\n\
										</div>\r\n\
									</div>\r\n\
								</body>\r\n\
							</html>';
				rawHTMLdoc = rawHTMLdoc.split('<!-- content goes here -->').join(printrCodeChunk.innerHTML);
			
			var newwindow   = window.open();
			var newdocument = newwindow.document;
				newdocument.write(rawHTMLdoc);
				newdocument.close();
		}
		if (surgGuidePrnt && surgGuidePrev) {
			surgGuidePrnt.onclick = submitFunc;
			surgGuidePrev.onclick = submitFunc;
			if (selectAll) {
				selectAll.onclick = function() {
					for (var i = 0; i < allInputs.length; i++) {
						var thisInput = allInputs[i];
						if (thisInput.type == 'checkbox') { 
							thisInput.checked = true;
							thisInput.onclick();
						}
					}
				}
			}
			if (clearAll) {
				clearAll.onclick = function() {
					for (var i = 0; i < allInputs.length; i++) {
						var thisInput = allInputs[i];
						if (thisInput.type == 'checkbox') {
							thisInput.checked = false;
							thisInput.onclick();
						}
					}
				}
			}
			if (addTextInput) {
				addTextInput.onclick = function() {
					var allTextInputs = document.getElementById('allTextInputs');
					var newInput      = allTextInputs.getElementsByTagName('li')[0].cloneNode(true);
						newInput      = allTextInputs.appendChild(newInput);
						surgeryGuide(); // <!-- at this point we need to reinitialize, due to new elements.
				}
			}
			for (var i = 0; i < allInputs.length; i++) {
				var thisInput = allInputs[i];
				
				switch(thisInput.type) { 
					case 'checkbox':
						thisInput.onclick = function() {
								var blockParent  = this.parentNode.parentNode.parentNode.parentNode;  //<!-- parent
								var checkBoxes   = blockParent.getElementsByTagName('input');
								var countElement = blockParent.getElementsByTagName('div')[0];
								var questionWrap = this.parentNode;
								var checkedCount = 0;
								for (var ii = 0; ii < checkBoxes.length; ii++) { if (checkBoxes[ii].checked == true) checkedCount++ };
								countElement.innerHTML =  checkedCount + '/' + checkBoxes.length  + ' checked'
								questionWrap.className = (this.checked == true) ? 'show' : '';
						}
						thisInput.onclick();
					break;
					case 'text':
						thisInput.onchange = function() {
								var blockParent  = this.parentNode.parentNode.parentNode.parentNode;  //<!-- parent
								var checkBoxes   = blockParent.getElementsByTagName('input');
								var countElement = blockParent.getElementsByTagName('div')[0];
								var questionWrap = this.parentNode;
								var checkedCount = 0;
								for (var ii = 0; ii < checkBoxes.length; ii++) { if (checkBoxes[ii].value != 'Type your question here' && this.value != '') checkedCount++ };
								questionWrap.className = (this.value != 'Type your question here' && this.value != '') ? 'textbox-show' : 'textbox';
							if (this.value == '') { this.value = 'Type your question here'; }
						}
						thisInput.onfocus = function() {
							if (this.value == 'Type your question here') { this.value = '' }
						}
						thisInput.onblur = thisInput.onchange;
					break;
				}
			}
		}
	}

	var makePopups = function() {
		var allLinks = document.getElementsByTagName('a');
		for (var i = 0; i < allLinks.length; i++) {
			var thisLink = allLinks[i];
			var popInfo  = thisLink.getAttribute('popwin');
			if (popInfo) {
				popInfo     = popInfo.toLowerCase();
				if (popInfo.indexOf('x') != -1) {
					thisLink.setAttribute('popwidth',  parseInt(popInfo.split('x')[0]));
					thisLink.setAttribute('popheight', parseInt(popInfo.split('x')[1]));
					thisLink.onclick = function() {
						window.popWin = window.open(this.href, 'popwin', 'width='+this.getAttribute('popwidth')+', height='+this.getAttribute('popheight')+', menubar=no,location=yes,resizable=yes,scrollbars=yes,status=no')
						return false;
					}
				} else if (popInfo == 'true') {
					thisLink.setAttribute('target', '_blank');
				}
			}
		}
	}	

	window.onload = function() {
		setImageHelpers();
		swf.setAll(8);
		setMenus();
		setDictionary();
		setDictLinks();
		clickInit();
		setExtLink();
		docSupport();
		surgeryGuide();
		makePopups();
	}
// see swfHandler.js for commented code
	function swfHandler(defaultUrl, defaultOpts, defaultAlt) {
		if (defaultUrl  && typeof(defaultUrl)  != 'string')  { throw('new swfHandler(url, options): default url for swf movies must be a string');      }
		if (defaultOpts && typeof(defaultOpts) != 'object')  { throw('new swfHandler(url, options): default options for swf movies must be an object'); }
		var root             = this;
			root.defaultUrl  = defaultUrl  || false;
			root.defaultOpts = defaultOpts || {};
		var swfStr     = false;
		var swfValue   = false;
		if (typeof(ActiveXObject) != 'undefined') {
			for (var loop = 0; loop < 50; loop++){
				try {
					var swfAxObj = new ActiveXObject('ShockwaveFlash.ShockwaveFlash.' + loop);
					swfValue = loop;
				} catch(e) {  }
			}
		} else {
		    if (navigator.plugins && navigator.plugins.length > 0) {
				if (navigator.plugins['Shockwave Flash 2.0'])  { swfValue = 2; }
				if (navigator.plugins['Shockwave Flash'])      {
					swfStr = navigator.plugins['Shockwave Flash'].description;
					swfValue = swfStr.split('.')[0].substring(swfStr.split('.')[0].lastIndexOf(' '));
				}
			}
		}
		root.rev = swfValue;
		if (document.location.href.indexOf('flash=false') != -1) { root.rev = false; }
		root.movie = function(swfUrl, swfOpts) {
			swfUrl  = swfUrl  || root.defaultUrl;
			swfOpts = swfOpts || {};
			var revReq = swfOpts.revReq || root.defaultOpts.revReq || false;
			if (revReq) {
				var altCont = swfOpts.altCont || root.defaultOpts.altCont || false;
			}
			for (var loop in root.defaultOpts) {
				var propName  = loop;
				var propValue = root.defaultOpts[loop];
				if (typeof(swfOpts[propName]) == 'undefined') { swfOpts[propName] = propValue; }
			}
			var swfObject   = document.createElement('object');
			if (typeof(ActiveXObject) == 'function') {
				try {
					var embObject = document.createElement('embed');
						embObject = swfObject.appendChild(embObject);
				} catch (e) {
					swfObject = document.createElement('embed');
				}
			}
			if (revReq) {
				if (!root.rev || parseFloat(revReq) > parseFloat(root.rev)) {
					if (altCont) {
						if (typeof(altCont) == 'string')   {
							if ((/\.png$/.test(altCont)) || (/\.jpg$/.test(altCont)) || (/\.jpeg$/.test(altCont)) || (/\.gif$/.test(altCont))) {
								swfObject        = document.createElement('img');
								swfObject.src    = altCont;
								swfObject.width  = swfWidth;
								swfObject.height = swfHeight;
							} else if ((/\.html$/.test(altCont)) || (/\.htm$/.test(altCont)) || (/\.shtml$/.test(altCont)) || (/\.asp$/.test(altCont)) || (/\.aspx$/.test(altCont)) || (/\.php$/.test(altCont)) || (/^http/.test(altCont)) || (/^https/.test(altCont)) ) {
								parent.location.replace(altCont);
							} else {
								swfObject = altCont;
							}
						} else {
							if (typeof(altCont) == 'function') {
								altCont();
								swfObject = false;
							} else {
								swfObject = altCont;
							}
						}
					} else {
						return false;
					}
				}
			}
			if (swfObject) {
				swfObject.setParam  = root.setParam;
				swfObject.killParam = root.killParam;
				swfObject.getVar    = root.getVar;
				swfObject.setVar    = root.setVar;
				swfObject.goFrame   = root.goFrame;
				swfObject.pause     = root.pause;
				swfObject.play      = root.play;
				swfObject.rewind    = root.rewind;
				swfObject.loadMov   = root.loadMov;
				swfObject.setParam('data',  swfUrl);
				swfObject.setParam('movie', swfUrl);
				swfObject.setParam('src',   swfUrl);
				swfObject.setParam('type', 'application/x-shockwave-flash');
				for (var loop in swfOpts) {
					var propName  = loop;
					var propValue = swfOpts[loop];
					if (propName != 'altCont' && propName != 'reqRev') { swfObject.setParam(propName, propValue); }
				}
				swfObject.markup   = root.getMarkup;
			}
			return swfObject;
		}
		root.setParam = function(name, value, killRecursion) {
			if (this.nodeName == 'OBJECT' || this.nodeName == 'EMBED') {
				this.killParam(name, true);
				this.setAttribute(name, value);
				if (this.getElementsByTagName('embed').length && name != 'id') {
					this.getElementsByTagName('embed')[0].setAttribute(name, value);
				}
				if (this.nodeName != 'EMBED') {
					var param = document.createElement('param');
						param.name  = name;
						param.value = value;
					var param = this.appendChild(param);
				}
				if ((name == 'id' || name == 'name') && !(name == 'id' && document.getElementById(value)) && !killRecursion) {
					this.setParam((name == 'id') ? 'name' : 'id', value, true);
				} else if ((name == 'id' || name == 'name') && (name == 'id' && document.getElementById(value))) {
					try { console.log('swf.setParam: ID \'' + value + '\' allready exists, cannot set as id for movie'); } catch(e) {} //<-- politely warn when preexisting ID prevents ID setting.
				}
			}
		}
		root.killParam = function(name, killRecursion) {
			if (this.nodeName == 'OBJECT' || this.nodeName == 'EMBED') {
				this.removeAttribute(name);
				if (this.hasChildNodes() && this.firstChild.nodeName.toLowerCase() == 'embed' && name != 'id') {
					if (this.firstChild.hasAttribute(name)) { this.firstChild.removeAttribute(name) }
				}
				if (this.hasChildNodes()) {
					for (var loop = 0; loop < this.childNodes.length; loop++) {
						if (this.childNodes[loop].nodeName.toLowerCase() == 'param' && this.childNodes[loop].name == name) { this.removeChild(this.childNodes[loop]); }
					}
				}
				if ((name == 'id' || name == 'name') && !killRecursion) {
					this.killParam((name == 'id') ? 'name' : 'id', true);
				}
			}
		}
		root.getMarkup =  function() {
			if (this.parentNode) {
				var markup = this.parentNode.innerHTML
			} else {
				var tempDiv = document.createElement('div');
					tempSwf = tempDiv.appendChild(this);
				var markup  = tempDiv.innerHTML;
			}
			return markup;
		}
		root.getVar = function(varName, swfMovie) {
			swfMovie = root.getObjRef(swfMovie) || this;
			try {
				return swfMovie.GetVariable(varName);
			} catch (e) { return 'undefined'; }
		}
		root.setVar = function(varName, varValue, swfMovie) {
			swfMovie = root.getObjRef(swfMovie) || this;
			try {
				swfMovie.SetVariable(varName, varValue);
			} catch (e) {  }
		}
		root.goFrame = function(swfFrame, swfLayer, swfMovie) {
			try {
			swfMovie = root.getObjRef(swfMovie) || this;
				var movieLayer = (swfLayer) ? swfLayer : '_level0/';
				if (parseInt(swfFrame) == NaN) {
					swfMovie.TGotoLabel(movieLayer, swfFrame);
				} else {
					swfMovie.TGotoFrame(movieLayer, swfFrame);
				}
			} catch (e) {  }
		}
		root.pause = function(swfLayer, swfMovie) {
			swfMovie = root.getObjRef(swfMovie) || this;
			try {
				var movieLayer = (swfLayer) ? swfLayer : '_level0/';
				swfMovie.TStopPlay(movieLayer);
			} catch (e) {  }
		}
		root.play = function(swfLayer, swfMovie) {
			swfMovie = root.getObjRef(swfMovie) || this;
			try {
				var movieLayer = (swfLayer) ? swfLayer : '_level0/';
				swfMovie.TPlay(movieLayer);
			} catch (e) {  }
		}
		root.rewind = function() {
			swfMovie = root.getObjRef(swfMovie) || this;
			try {
				swfMovie.Rewind();
			} catch (e) {  }
		}
		root.loadMov = function(layer, newSwf, swfMovie) {
			swfMovie = root.getObjRef(swfMovie) || this;
			newSwf = newSwf || '';
			try {
				swfMovie.LoadMovie(layer, newSwf);
			} catch (e) {  }
		}
		root.getObjRef = function(swfId) {
			var objRef = false;
			if (window.document[swfId])  { objRef = window.document[swfId]; }
			if (typeof(ActiveXObject) != 'undefined') {
				if (document.embeds && document.embeds[swfId]) { objRef =  document.embeds[swfId]; }
			} else {
				objRef = document.getElementById(swfId);
			}
			return objRef;
		}
		try {
			var testMovie = root.movie('', 1, 1);
		} catch (e) {
			root.rev = false;
		}
		root.setAll = function(revReq, postProcess){
			if (revReq && typeof(revReq) != 'number')                { throw('swf.setAll(revReq, postProcess): revReq must be a number, null, or boolean false'); }
			if (postProcess  && typeof(postProcess)  != 'function')  { throw('swf.setAll(revReq, postProcess): postProcess must be null, or a function!');        }
			root.allSwfs = [];
			var allElements = document.getElementsByTagName('div');
			var showFlash = !!(!revReq || root.rev >= revReq);
			var objBuilder  = function(thisObj, postProcess) {
				var options = {};
				var attbrs  = thisObj.attributes;
				for (var ii = 0; ii < attbrs.length; ii++) { 
					var name  = attbrs[ii].name;
					var value = attbrs[ii].value;
					if (
						name == 'id'     ||
						name == 'style'  ||
						name == 'objref' ||
						name == 'class'
					) { continue; }
					options[name] = value;
				}
				if (postProcess) { options = postProcess(options); }
				return options;
			}
			for (var i = 0; i < allElements.length; i++) {
				var thisObj = allElements[i];
				var thisOpt = thisObj.getAttribute('swfhandler');
				if (thisOpt) {
					thisOpt = thisOpt.toLowerCase();
					switch(thisOpt) {
						case 'altcont':
						        if (!showFlash) { window.location.replace('/default_html.aspx'); } //redirect users who do not have Flash
								if (showFlash) { thisObj.innerHTML = ''; } // prevent superfluous images from hogging bandwidth
								thisObj.style.visibility = (showFlash) ? 'hidden' : 'visible';
								thisObj.style.display    = (showFlash) ? 'none'   : 'block';
						break;
						case 'swfcont':
								if (!showFlash) { 
									thisObj.style.display    = 'none';
									thisObj.style.visibility = 'hidden';
									window.location.replace('/default_html.aspx');
									continue;
								} else {
									thisObj.style.display   = 'block';
									thisObj.style.visiblity = 'visible';
									var swfOpts = objBuilder(thisObj, postProcess);
									if (thisObj.getAttribute('objref')) {
										var objRef = thisObj.getAttribute('objref');
										if (typeof(window[objRef]) != 'undefined') {
											try { console.log('changing value of: ' + objRef + ' to swf.movie object reference'); } catch(e) {}
										}
										window[objRef] = root.movie(swfOpts.url, swfOpts);
										window[objRef] = thisObj.appendChild(window[objRef]);
									} else {
										var thisMovie = root.movie(swfOpts.url, swfOpts);
											thisMovie = thisObj.appendChild(thisMovie);
									}
								}
						break;
					}
				}
			}
		}
	}
	var swf = new swfHandler(false, {allowScriptAccess:'always', swfLiveConnect:'true', quality:'best', revReq:7});
// see clientApp.js for commented code
		function clientApp() {
			var root   = this;
			root.agent      = navigator.userAgent.toLowerCase();
			root.name       = navigator.appName.toLowerCase();
			root.version    = navigator.appVersion.toLowerCase();
			root.system     = navigator.platform.toLowerCase();
			root.engine     = false;
			if (root.system == 'macppc' || root.system == 'macintel')     { root.os = 'mac';        }
			else if (root.system == 'iphone')                             { root.os = 'iphone';     }
			else if (root.system == 'win32'  || root.system == 'win64')   { root.os = 'win';        }
			else if (root.agent.indexOf(' linux') != -1)                  { root.os = 'linux';      }
			else if (!root.os && root.system)                             { root.os = root.system;  }
			else if (!root.os)                                            { root.os = false;        }
			try { if (navigator.product.toLowerCase() == 'gecko')         { root.engine = 'gecko';  }} catch (e) {}
			try { if ((document.childNodes) && (!navigator.taintEnabled)) { root.engine = 'webkit'; }} catch (e) {}
			try { if (typeof(window.opera) == 'object')                   { root.engine = 'opera';  }} catch (e) {}
			try { if (typeof(window.ScriptEngine) == 'function')          { root.engine = 'icab';   }} catch (e) {}
			try { if (typeof(ActiveXObject) == 'function')                { root.engine = 'msie';   }} catch (e) {}
			if (!root.engine)                                             { root.engine = false;    }
			switch(root.engine){
				case 'webkit' :
					try {
						root.engRev = root.agent.split(' applewebkit/')[1].split(' (khtml')[0];
					} catch (e) {
						root.engRev = root.agent.split(' khtml/')[1].split(' (like ')[0];
					}
				break;
				case 'gecko'  : root.engRev = root.agent.split(') gecko/')[1].split(' ')[0];                     break;
				case 'opera'  : root.engRev = root.agent.split('opera')[1].substring(1).split(' (')[0];          break;
				case 'icab'   : root.engRev = root.engRev = root.agent.split(' icab ')[1].split(';')[0];         break;
				case 'msie'   : root.engRev = root.engRev = root.agent.split(' msie ')[1].split(';')[0];         break;
				case false    : root.engRev = false;                                                             break;
			}
			if (root.agent.indexOf('mozilla/') != -1)                     { root.app = 'mozilla';    }
			if (root.engine == 'msie')                                    { root.app = 'msie';       }
			if (root.agent.indexOf(' netscape6/') != -1)                  { root.app = 'netscape';   }
			if (root.agent.indexOf(' netscape/') != -1)                   { root.app = 'netscape';   }
			if (root.agent.indexOf(' safari/') != -1)                     { root.app = 'safari';     }
			if (root.agent.indexOf('safari) omniweb/') != -1)             { root.app = 'omniweb';    }
			if (root.agent.indexOf(' gecko) shiira') != -1)               { root.app = 'shiira';     }
			if (root.agent.indexOf(' camino/') != -1)                     { root.app = 'camino';     }
			if (root.agent.indexOf('konqueror/') != -1)                   { root.app = 'konqueror';  }
			if (root.agent.indexOf(' firefox/') != -1)                    { root.app = 'firefox';    }
			if (root.agent.indexOf(' epiphany/') != -1)                   { root.app = 'epiphany';   }
			if (root.agent.indexOf('opera') != -1)                        { root.app = 'opera';      }
			if (root.engine == 'icab')                                    { root.app = 'icab';       }
			if (!root.app)                                                { root.app = false;        }
			switch(root.app){
				case 'mozilla'   : root.appRev = root.agent.split(' rv:')[1].split(') ')[0];                     break;
				case 'msie'      : root.appRev = root.engRev = root.agent.split(' msie ')[1].split(';')[0];      break;
				case 'safari'    : root.appRev = root.agent.split(' safari/')[1];                                break;
				case 'omniweb'   : root.appRev = root.agent.split('omniweb/v')[1];                               break;
				case 'shiira'    : root.appRev = root.agent.split('shiira/')[1].split(' safari')[0];             break;
				case 'camino'    : root.appRev = root.agent.split('camino/')[1];                                 break;
				case 'netscape'  : root.appRev = (root.agent.indexOf(' netscape6/') != -1) ? root.agent.split(' netscape6/')[1] : root.agent.split(' netscape/')[1]; break;
				case 'navigator' : root.appRev = root.agent.split('ozilla/')[1].split(' ')[0].split('-')[0];     break;
				case 'konqueror' : root.appRev = root.agent.split(' konqueror/')[1].split(';')[0].split('-')[0]; break;
				case 'firefox'   : root.appRev = root.agent.split(' firefox/')[1];                               break;
				case 'epiphany'  : root.appRev = root.agent.split(' epiphany/')[1].split(' ')[0];                break;
				case 'opera'     : root.appRev = root.engRev;                                                    break;
				case 'icab'      : root.appRev = root.engRev = root.agent.split(' icab ')[1].split(';')[0];      break;
				case false       : root.appRev =  false;                                                         break;
			}
			root.supportsDom = !!(
				typeof(document.getElementById)                  != 'undefined' &&
				typeof(document.getElementsByTagName)            != 'undefined' &&
				typeof(document.nextSibling)                     != 'undefined' &&
				typeof(document.previousSibling)                 != 'undefined' &&
				typeof(document.childNodes)                      != 'undefined' &&
				typeof(document.parentNode)                      != 'undefined' &&
				typeof(document.hasChildNodes)                   != 'undefined' &&
				typeof(document.nodeType)                        != 'undefined' &&
				typeof(document.cloneNode)                       != 'undefined' &&
				typeof(document.insertBefore)                    != 'undefined' &&
				typeof(document.appendChild)                     != 'undefined' &&
				typeof(document.removeChild)                     != 'undefined' &&
				typeof(document.replaceChild)                    != 'undefined' &&
				typeof(document.documentElement.tagName)         != 'undefined' &&
				typeof(document.documentElement.getAttribute)    != 'undefined' &&
				typeof(document.documentElement.removeAttribute) != 'undefined' &&
				typeof(document.documentElement.attributes)      != 'undefined'
			);
			root.xmlhttp = false;
			if (typeof(ActiveXObject) != 'function' && typeof(XMLHttpRequest) != 'undefined') {
				root.xmlhttp = true;
			} else {
				try {
					var tempXmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
					root.xmlhttp = true;
				} catch (e) {
					try {
						xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
						root.xmlhttp = true;
					} catch (e) {}
				}
			}
			root.viewport = function(windowName) {
				var dimensions = false;
				if (!windowName) { windowName = window.self; }
				try {
					if (self.innerHeight) {
						dimensions = [windowName.innerWidth, windowName.innerHeight];
					} else if (document.body) {
						dimensions = [windowName.document.body.clientWidth, windowName.document.body.clientHeight];
					} else if (document.documentElement && document.documentElement.clientHeight) {
						dimensions = [windowName.document.documentElement.clientWidth, windowName.document.documentElement.clientHeight];
					}
				} catch (e) { }
				return dimensions;
			}
			root.position = function(windowName) {
				var coordinates = false;
				if (!windowName) { windowName = window.self; }
				if (window.screenLeft) {
					coordinates = [windowName.screenLeft, windowName.screenTop];
				} else if (window.screenX) {
					coordinates = [windowName.screenX, windowName.screenY];
				}
				return coordinates;
			}
			root.screenX       = screen.width;
			root.screenY       = screen.height;
			root.screenAvailY  = screen.availWidth;
			root.screenAvailX  = screen.availHeight;
		}
		var client = new clientApp();




	function cookieHandler() {
		var root = this;
		root.values = new Array();
		root.getValues = function() {
			var cookieString   = document.cookie;
			root.values.length = 0;
			if (cookieString) {
				for (var loop = 0; loop < cookieString.split('; ').length; loop++) {
					var thisPair = cookieString.split('; ')[loop];
					var thisName = unescape(thisPair.split('=')[0]);
					var thisValue = unescape(thisPair.split('=')[1]);
					root.values[thisName] = thisValue;
				}
			}
		}
		root.write = function(cookieName, cookieValue, expires, path) {
			cookieValue   = cookieName + '=' + escape(cookieValue);
			var cookieExpires = '';
			if (expires) {
				var cookieDate  = new Date(expires).toGMTString();
				if (expires) {
					var futureDate = new Date();
					futureDate.setTime(futureDate.getTime()+(expires*24*60*60*1000));
					cookieDate = futureDate.toGMTString();
				}
				cookieValue+= ';expires=' + cookieDate;
			}
			if (path) { cookieValue+= path; }
			document.cookie = cookieValue;
			root.getValues();
		}
		root.expire = function(cookieName) { root.write(cookieName, 'false', 'April 1, 1976'); }
		root.get = function(getValue) {
			root.getValues();
			return (root.values[getValue]) ? root.values[getValue] : false;
		}
		root.getValues();
	}

	var cookie = new cookieHandler();
//see httpHandler.js for commented code
	function queryHandler(qryData) {
		var root = this;
		root.pairs = {};
		root.getString = function() {
			var qstr = '';
			for (var loop in root.pairs) {
				qstr += escape(loop) + '=' + escape(root.pairs[loop]) + '&';
			}
			return qstr.substring(0, qstr.length-1);
		}
		if (qryData) {
			switch (typeof(qryData)) {
				case 'object':
					for (var loop in qryData) {
						root.pairs[loop] = unescape(qryData[loop]);
					}
				break;
				case 'string':
					if (/[?||&||=]/.test(qryData)) {
						qryData = qryData.split('#')[0].match(/\?.+/);
						if (qryData) {
							qryData = qryData.toString().split('?')[1].split('&')
							for (var loop in qryData) {
								var thisPair  = qryData[loop].split('=');
								var thisName  = thisPair[0] || 'undefined';
								var thisValue = thisPair[1] || 'undefined';
								root.pairs[unescape(thisName)] = unescape(thisValue);
							}
						}
					}
				break;
			}
		}
	}
	var urlHandler = function(url) {
		var root = this;
		root.getAbsFromRel  = function(str) {
			var locPathArr = root.strGetPath(document.location.href).toString();
				locPathArr = locPathArr.substring(1, (locPathArr.length-1)).split('/');
			var relPathArr = root.strGetPath(str).toString();
				relPathArr = relPathArr.substring(0, (relPathArr.length-1)).split('/');
			for (var i in relPathArr) {
				var relNode = relPathArr[i];
				if (relNode == '.'||'')                   { continue;                 }
				if (relNode == '..' && locPathArr.length) { locPathArr.pop(relNode);  }
				if (/^[^.].*&/.test(relNode))             { locPathArr.push(relNode); }
			}
			var locPathStr = '/' + locPathArr.join('/') +  '/';
				locPathStr = locPathStr.split('//').join('/');
			return locPathStr;
		}
		root.strIsUri       = function(str) { str = str.toString(); return /^\w+(?=:\/\/)/.test(str); }
		root.strIsRel       = function(str) { str = str.toString(); return /^[\?#]|^[\.\w]+(?=$)|^[\.\w]+(?=[\/])/.test(str); }
		root.strIsAbs       = function(str) { str = str.toString(); return /^\//.test(str); }
		root.strGetProtocol = function(str) { str = str.toString(); return str.match(/^\w+(?=:\/\/)/); }
		root.strGetUser     = function(str) { str = str.toString(); return str.replace(/^\w+\:\/\//, '').match(/^[^\/\.\?#@]+(?=:[^\/\.\?#@]+@)|^[^\/\.\?#@]+(?=@)/); }
		root.strGetPassword = function(str) { str = str.toString(); return (/^\w+:\/\/[^:\/@]+:[^:\/@]+@/.test(str)) ? str.replace(/^\w+\:\/\//, '').match(/[^:\/@]+(?=@)/) : null; }
		root.strGetDomain   = function(str) { str = str.toString(); return (/^\w+:\/\//.test(str)) ? str.replace(/^\w+:\/\/.+@|^\w+:\/\//, '').replace(/[:\/].*/, '') : null; }
		root.strGetPort     = function(str) { str = str.toString(); return str.replace(/^\w+:\/\/?[^:\/]*/, '').replace(/\/.*/, '').match(/[\d]+$/); }
		root.strGetPath     = function(str) { str = str.toString(); return str.replace(/^\w+:\/\/[^\/]+/, '').replace(/^(?=[^\.\/])/,'./').split(/[\?#]/)[0].match(/^.+\/|\//); }
		root.strGetFile     = function(str) { str = str.toString(); return str.replace(/[\?#].*/,'').match(/[\w\.]+\.[\w\.]+$/); }
		root.strGetQuery    = function(str) { str = str.toString(); return str.split(/#/)[0].replace(/^[^\?]*\?|^.*$/,'').match(/^.+$/); }
		root.strGetHash     = function(str) { str = str.toString(); return str.replace(/^[^#]*#|^.*$/,'').match(/^.+$/); }
		root.updateData = function(url) {
			var thisUrl = document.location.href;
			switch (typeof(url)) {
				case 'string':
					root.protocol    = root.strGetProtocol(url) || root.strGetProtocol(thisUrl);
					root.user        = root.strGetUser(url)     || root.strGetUser(thisUrl);
					root.password    = root.strGetPassword(url) || root.strGetPassword(thisUrl);
					root.domain      = root.strGetDomain(url)   || root.strGetDomain(thisUrl);
					root.port        = root.strGetPort(url)     || root.strGetPort(thisUrl);
					root.path        = root.strGetPath(url)     || root.strGetPath(thisUrl);
					root.file        = root.strGetFile(url)     || root.strGetFile(thisUrl);
					root.querystring = new queryHandler(url);
					root.hash        = root.strGetHash(url);
					if (root.strIsRel(root.path)) { root.path = root.getAbsFromRel(root.path); }
				break;
				case 'object':
					root.protocol    = url.protocol || root.strGetProtocol(thisUrl);
					root.user        = url.user     || root.strGetUser(thisUrl);
					root.password    = url.password || root.strGetPassword(thisUrl);
					root.domain      = url.domain   || root.strGetDomain(thisUrl);
					root.port        = url.port     || root.strGetPort(thisUrl);
					root.path        = url.path     || root.strGetPath(thisUrl);
					root.file        = url.file     || root.strGetFile(thisUrl);
					root.querystring = true;
					root.hash        = true;
				break;
			}
			root.url = root.string();
		}
		root.string = function() {
			var url = root.protocol + '://';
				url+= (root.user) ? root.user + ((root.password) ? ':' + root.password + '@' : '@') : '';
				url+= root.domain;
				url+= (root.port) ? ':' + root.port : '';
				url+= root.path;
				url+= root.file || '';
				url+= '?' + root.querystring.getString();
				if (root.hash) { url+= '#' + root.hash; }
			return url;
		}
			root.updateData(url||document.location.href);
	}



	function xmlHttpHandler(delay) {
		var root = this;
		root.requests = [];
		root.delay = (delay && typeof(delay) == 'number') ? delay : 50;
		root.xmlHttp = function() {
			var xmlHttp = false;
			if (typeof(ActiveXObject) != 'function' && typeof(XMLHttpRequest) != 'undefined') {
				xmlHttp = new XMLHttpRequest();
			} else {
				try {
					xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
				} catch (e) {
					xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
				}
			}
			return xmlHttp;
		}
		root.supported = (root.xmlHttp) ? true : false;
		root.getType = function(request) {
			var datType = 'text/txt';
			if      (/\.xml$/.test(request.split('?')[0]))  { datType = 'text/xml';        }
			else if (/\.js$/.test(request.split('?')[0]))   { datType = 'text/javascript'; }
			else if (/\.json$/.test(request.split('?')[0])) { datType = 'text/javascript'; }
			return datType;
		}
		root.get = function(request, callback, args) {
			if (callback) {
				root.requests.push([request, callback, args]);
				if (root.requests.length == 1) { root.start(); }
				return root.supported;
			} else {
				return root.sendRequest([request]);
			}
		}
		root.sendRequest = function(requestData, fromQueue) {
			var xmlHttp = root.xmlHttp();
			var request = requestData[0];
			var handler = (typeof(requestData[1]) == 'function') ? requestData[1] : false;
			var args    = (typeof(requestData[2]) == 'object')   ? requestData[2] : [];
			if (xmlHttp) {
				var datType = root.getType(request);
				if (xmlHttp.overrideMimeType && datType == 'text/xml') { xmlHttp.overrideMimeType(datType); }
				if (handler) {
					xmlHttp.onreadystatechange = function() {
						if(xmlHttp.readyState == 4) {
							var serverResponse = (datType != 'text/xml') ? xmlHttp.responseText : xmlHttp.responseXML;
							serverResponse = (datType == 'text/javascript') ? eval(serverResponse) : serverResponse;
							args.unshift(serverResponse);
							var argStr = '';
							for (var arg in args) { argStr += 'args[' + arg + '], ' };
							argStr = argStr.substring(0, argStr.lastIndexOf(','));
							if (fromQueue) { root.start(); }
							eval('handler(' + argStr + ')');
						}
					}
					xmlHttp.open('GET', request, true);
					xmlHttp.send(null);
					return true;
				} else {
					xmlHttp.open('GET', request, false);
					xmlHttp.send(null);
					if (xmlHttp.status == 200) {
						var serverResponse = (datType == 'text/javascript') ? xmlHttp.responseText : xmlHttp.responseXML;
						if (datType == 'text/javascript') { serverResponse = eval(serverResponse); }
						return serverResponse;
					}
				}
			} else {
				return false;
			}
		}
		root.start = function() {
			if (root.requests.length > 0) {
				var nextRequest = function() {
					var request = root.requests.shift();
					root.sendRequest(request, true);
				}
				root.timer = setTimeout(nextRequest, root.delay);
			}
		}
	}

	var ajax      = new xmlHttpHandler();
	document.qstr = new queryHandler(document.location.href);
	document.url  = new urlHandler(document.location.href);
// see imageHelper.js for commented code
	var setImageHelpers = function() {
		var allImages = document.getElementsByTagName('img');
		for (var i = 0; i < allImages.length; i++) {
			if (!allImages[i].getAttribute('iscacheimg')) {
				var thisImage = allImages[i];
				addImgSrcSetter(thisImage);
				addImgSrcGetter(thisImage);
				addImgStateSetters(thisImage);
				setImageLinkStates(thisImage);
			}
		}
//		if (typeof(ieSixPngSupport) != 'undefined') { ieSixPngSupport(); }
	}
	var addImgSrcSetter = function(imgObj) { imgObj.setSrc = function(url) { this.src = url; } }
	var addImgSrcGetter = function(imgObj) { imgObj.getSrc = function(obj) { return this.src; } }
	var addImgStateSetters = function(imgObj) {
		var ovrStateSuffix = '_on';
		var outStateSuffix = '_off';
		var imgSrc         = imgObj.src;
		var thisPath       = imgSrc.substring(0, (imgSrc.lastIndexOf('/')+1));
		var thisFile       = imgSrc.substring(imgSrc.lastIndexOf('/')+1).split('#')[0].split('?')[0];
		var thisExtension  = thisFile.substring(thisFile.lastIndexOf('.'));
		var thisFileName   = thisFile.substring(0, thisFile.lastIndexOf('.'));
		var isRollover = (
			(thisFileName.lastIndexOf(outStateSuffix) == (thisFileName.length - outStateSuffix.length)) ||
			(thisFileName.lastIndexOf(ovrStateSuffix) == (thisFileName.length - ovrStateSuffix.length))
		)
		if (isRollover) {
			imgObj.setAttribute('imagpath', thisPath);
			imgObj.setAttribute('ovrimage', thisFile.split(outStateSuffix + thisExtension).join(ovrStateSuffix + thisExtension));
			imgObj.setAttribute('offimage', thisFile.split(ovrStateSuffix + thisExtension).join(outStateSuffix + thisExtension));
			imgObj.ovrState    = function() { this.setSrc(this.getAttribute('imagpath') + this.getAttribute('ovrimage'));   }
			imgObj.outState    = function() { imgObj.setSrc(this.getAttribute('imagpath') + this.getAttribute('offimage')); }
			imgObj.onmouseover = function() { this.ovrState(); }
			imgObj.onmouseout  = function() { this.outState(); }
		}
	}
	var setImageLinkStates = function(imgObj) {
		var spoofLoc = document.body.getAttribute('spoofloc');
		if (spoofLoc) { window.spoofUrl = document.location.href.substring(0, document.location.href.lastIndexOf('/')) + '/' + spoofLoc; }
		window.spoofUrl = window.spoofUrl || document.location.href;
		var makeCurrent = function(imgObj) {
			if (imgObj.onmouseover) { imgObj.onmouseover(); }
			imgObj.onmouseover = null;
			imgObj.onmouseout  = null;
		}
		if (imgObj.parentNode && imgObj.parentNode.nodeName == 'A' && imgObj.parentNode.getAttribute('href')) {
			if (imgObj.parentNode.getAttribute('href') != '') {
				var linkURL = imgObj.parentNode.href;
				var linkANC = linkURL.split('#')[1] || false;
				var pageURL = spoofUrl;
				var pageANC = pageURL.split('#')[1] || false;
				if (linkANC) {
					if (linkURL == pageURL) {
						imgObj.setAttribute('isCurrent', 'true');
						makeCurrent(imgObj);
					}
				} else {
					if (pageURL.indexOf(linkURL) == 0) {
						imgObj.setAttribute('isCurrent', 'true')
						makeCurrent(imgObj);
					}
				}
			}
		}
	}
	if (client.engine == 'msie' && parseInt(client.engRev) == 6) {
			document.writeln('<style type="text/css"> div#msieSixPngLoaderDiv     { visibility: hidden; position: absolute; left: 0px; top: 0px; width: 1px; height: 1px; font-size: 0px; line-height: 0px; overflow: hidden; } </style>');
			document.writeln('<style type="text/css"> div#msieSixPngLoaderDiv img { visibility: hidden; } </style>');
			var addImgSrcSetter = function(imgObj) {
					var msieSixPngLoaderDiv = document.getElementById('msieSixPngLoaderDiv');
					if (!msieSixPngLoaderDiv) {
						msieSixPngLoaderDiv           = document.createElement('div');
						msieSixPngLoaderDiv           = document.body.insertBefore(msieSixPngLoaderDiv, document.body.getElementsByTagName('*')[0]); // <-- putting it first sticks it on the bottom of the render tree, making it less likely to interfere with things.
						msieSixPngLoaderDiv.id        = 'msieSixPngLoaderDiv';
						msieSixPngLoaderDiv.innerHTML = '<!-- this div permits unobtrusive preloading and measurement of .png images in IE 6, for transparency support -->';
					}
				imgObj.setSrc = function(url) {
					var isPng   = (/\.png$/.test(url.split('?')[0]));
					if (isPng) {
						var cachedPngs = document.getElementById('msieSixPngLoaderDiv').getElementsByTagName('img');
						var cachedImg  = false;
						for (var i = 0; i < cachedPngs.length && !cachedImg; i++) {
							var thisPng = cachedPngs[i];
							if (thisPng.src == url) { cachedImg = thisPng; }
						}
						if (cachedImg) {
							this.style.filter     = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' + cachedImg.src + '\', sizingMethod=\'scale\')';
							this.src              = '/global/img/blank.gif';
							this.style.width      = cachedImg.offsetWidth + 'px';
							this.style.height     = cachedImg.offsetHeight + 'px';
							this.style.visibility = 'visible';
						} else {
							var pngLoaderDiv = document.getElementById('msieSixPngLoaderDiv');
							var newCacheImg  = document.createElement('img');
								newCacheImg.setAttribute('iscacheimg', 'true');
								newCacheImg  = pngLoaderDiv.appendChild(newCacheImg);
								var callBack = this;
								newCacheImg.onload = function() {
										callBack.style.width      = this.offsetWidth + 'px';
										callBack.style.height     = this.offsetHeight + 'px';
										callBack.style.filter     = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' + this.src + '\', sizingMethod=\'scale\')';
										callBack.src              = '/global/img/blank.gif';
										callBack.style.visibility = 'visible';
										if (this != cachedPngs[0]) { cachedPngs[0].onload(); }
								}
								newCacheImg.src = url;
						}
					} else {
						this.style.filter  = null; 
						this.src           = url;  
						this.style.width   = '';
						this.style.height  = '';
					}
				}
			}
			var addImgSrcGetter = function(imgObj) {
				imgObj.getSrc = function(){

					if (this.src.indexOf('blank.gif') != -1 && this.style.filter != 'undefined') {
						return this.style.filter.split('src=')[1].split(', sizingMethod')[0];
					} else {
						return this.src;
					}
				}
			}
			var ieSixPngSupport = function() {
				if (client.engine == 'msie' && parseInt(client.engRev) == 6) {
					var allImgs = document.body.getElementsByTagName('img');
					for (var i in allImgs) {
						var thisImg = allImgs[i];
						try {
							if (!thisImg.getAttribute('iscacheimg')) {
								var isPng   = (/\.png$/.test(thisImg.src.split('?')[0]));
								if (isPng) {
									addPngSupport(thisImg);
									if (thisImg.complete) {
										thisImg.onload();
									}
								} else {
									thisImg.style.visibility = 'visible';
								}
							}
						} catch (e) {}
					}
				}
			}
			var addPngSupport = function(imgObj) {
				imgObj.onload = function() {
					var thisUrl = imgObj.src;
					var thisDir = thisUrl.substring(0, thisUrl.lastIndexOf('/')+1);
					var isBlank = (/blank\.gif$/.test(thisUrl.split('?')[0]));
					var isPng   = (/\.png$/.test(thisUrl.split('?')[0]));
					if (isPng && !isBlank && client.engine == 'msie' && parseInt(client.engRev) == 6) {
						imgObj.style.visibility = 'hidden';
						imgObj.style.width      = 'auto';
						imgObj.style.height     = 'auto';
						imgObj.style.filter     = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' + imgObj.src + '\', sizingMethod=\'crop\')';
						imgObj.style.width      = imgObj.offsetWidth  + 'px';
						imgObj.style.height     = imgObj.offsetHeight + 'px';
						imgObj.src              = thisDir + 'blank.gif';
					} else if (isBlank) {
						imgObj.style.visibility = 'visible';
					}
				}
			}
	}
//see swfHandler.js for commented code
	function swfHandler(defaultUrl, defaultOpts, defaultAlt) {
		if (defaultUrl  && typeof(defaultUrl)  != 'string')  { throw('new swfHandler(url, options): default url for swf movies must be a string');      }
		if (defaultOpts && typeof(defaultOpts) != 'object')  { throw('new swfHandler(url, options): default options for swf movies must be an object'); }
		var root             = this;
			root.defaultUrl  = defaultUrl  || false;
			root.defaultOpts = defaultOpts || {};
		var swfStr     = false;
		var swfValue   = false;
		if (typeof(ActiveXObject) != 'undefined') {
			for (var loop = 0; loop < 50; loop++){
				try {
					var swfAxObj = new ActiveXObject('ShockwaveFlash.ShockwaveFlash.' + loop);
					swfValue = loop;
				} catch(e) {  }
			}
		} else {
		    if (navigator.plugins && navigator.plugins.length > 0) {
				if (navigator.plugins['Shockwave Flash 2.0'])  { swfValue = 2; }
				if (navigator.plugins['Shockwave Flash'])      {
					swfStr = navigator.plugins['Shockwave Flash'].description;
					swfValue = swfStr.split('.')[0].substring(swfStr.split('.')[0].lastIndexOf(' '));
				}
			}
		}
		root.rev = swfValue;
		if (document.location.href.indexOf('flash=false') != -1) { root.rev = false; }
		root.movie = function(swfUrl, swfOpts) {
			swfUrl  = swfUrl  || root.defaultUrl;
			swfOpts = swfOpts || {};
			var revReq = swfOpts.revReq || root.defaultOpts.revReq || false;
			if (revReq) {
				var altCont = swfOpts.altCont || root.defaultOpts.altCont || false;
			}
			for (var loop in root.defaultOpts) {
				var propName  = loop;
				var propValue = root.defaultOpts[loop];
				if (typeof(swfOpts[propName]) == 'undefined') { swfOpts[propName] = propValue; }
			}
			var swfObject   = document.createElement('object');
			if (typeof(ActiveXObject) == 'function') {
				try {
					var embObject = document.createElement('embed');
						embObject = swfObject.appendChild(embObject);
				} catch (e) {
					swfObject = document.createElement('embed');
				}
			}
			if (revReq) {
				if (!root.rev || parseFloat(revReq) > parseFloat(root.rev)) {
					if (altCont) {
						if (typeof(altCont) == 'string')   {
							if ((/\.png$/.test(altCont)) || (/\.jpg$/.test(altCont)) || (/\.jpeg$/.test(altCont)) || (/\.gif$/.test(altCont))) {
								swfObject        = document.createElement('img');
								swfObject.src    = altCont;
								swfObject.width  = swfWidth;
								swfObject.height = swfHeight;
							} else if ((/\.html$/.test(altCont)) || (/\.htm$/.test(altCont)) || (/\.shtml$/.test(altCont)) || (/\.asp$/.test(altCont)) || (/\.aspx$/.test(altCont)) || (/\.php$/.test(altCont)) || (/^http/.test(altCont)) || (/^https/.test(altCont)) ) {
								parent.location.replace(altCont);
							} else {
								swfObject = altCont;
							}
						} else {
							if (typeof(altCont) == 'function') {
								altCont();
								swfObject = false;
							} else {
								swfObject = altCont;
							}
						}
					} else {
						return false;
					}
				}
			}
			if (swfObject) {
				swfObject.setParam  = root.setParam;
				swfObject.killParam = root.killParam;
				swfObject.getVar    = root.getVar;
				swfObject.setVar    = root.setVar;
				swfObject.goFrame   = root.goFrame;
				swfObject.pause     = root.pause;
				swfObject.play      = root.play;
				swfObject.rewind    = root.rewind;
				swfObject.loadMov   = root.loadMov;
				swfObject.setParam('data',  swfUrl);
				swfObject.setParam('movie', swfUrl);
				swfObject.setParam('src',   swfUrl);
				swfObject.setParam('type', 'application/x-shockwave-flash');
				for (var loop in swfOpts) {
					var propName  = loop;
					var propValue = swfOpts[loop];
					if (propName != 'altCont' && propName != 'reqRev') { swfObject.setParam(propName, propValue); }
				}
				swfObject.markup   = root.getMarkup;
			}
			return swfObject;
		}
		root.setParam = function(name, value, killRecursion) {
			if (this.nodeName == 'OBJECT' || this.nodeName == 'EMBED') {
				this.killParam(name, true);
				this.setAttribute(name, value);
				if (this.getElementsByTagName('embed').length && name != 'id') {
					this.getElementsByTagName('embed')[0].setAttribute(name, value);
				}
				if (this.nodeName != 'EMBED') {
					var param = document.createElement('param');
						param.name  = name;
						param.value = value;
					var param = this.appendChild(param);
				}
				if ((name == 'id' || name == 'name') && !(name == 'id' && document.getElementById(value)) && !killRecursion) {
					this.setParam((name == 'id') ? 'name' : 'id', value, true);
				} else if ((name == 'id' || name == 'name') && (name == 'id' && document.getElementById(value))) {
					try { console.log('swf.setParam: ID \'' + value + '\' already exists, cannot set as id for movie'); } catch(e) {}
				}
			}
		}
		root.killParam = function(name, killRecursion) {
			if (this.nodeName == 'OBJECT' || this.nodeName == 'EMBED') {
				this.removeAttribute(name);
				if (this.hasChildNodes() && this.firstChild.nodeName.toLowerCase() == 'embed' && name != 'id') {
					if (this.firstChild.hasAttribute(name)) { this.firstChild.removeAttribute(name) }
				}
				if (this.hasChildNodes()) {
					for (var loop = 0; loop < this.childNodes.length; loop++) {
						if (this.childNodes[loop].nodeName.toLowerCase() == 'param' && this.childNodes[loop].name == name) { this.removeChild(this.childNodes[loop]); }
					}
				}
				if ((name == 'id' || name == 'name') && !killRecursion) {
					this.killParam((name == 'id') ? 'name' : 'id', true);
				}
			}
		}
		root.getMarkup =  function() {
			if (this.parentNode) {
				var markup = this.parentNode.innerHTML
			} else {
				var tempDiv = document.createElement('div');
					tempSwf = tempDiv.appendChild(this);
				var markup  = tempDiv.innerHTML;
			}
			return markup;
		}
		root.getVar = function(varName, swfMovie) {
			swfMovie = root.getObjRef(swfMovie) || this;
			try {
				return swfMovie.GetVariable(varName);
			} catch (e) { return 'undefined'; }
		}
		root.setVar = function(varName, varValue, swfMovie) {
			swfMovie = root.getObjRef(swfMovie) || this;
			try {
				swfMovie.SetVariable(varName, varValue);
			} catch (e) {  }
		}
		root.goFrame = function(swfFrame, swfLayer, swfMovie) {
			try {
			swfMovie = root.getObjRef(swfMovie) || this;
				var movieLayer = (swfLayer) ? swfLayer : '_level0/';
				if (parseInt(swfFrame) == NaN) {
					swfMovie.TGotoLabel(movieLayer, swfFrame);
				} else {
					swfMovie.TGotoFrame(movieLayer, swfFrame);
				}
			} catch (e) {  }
		}
		root.pause = function(swfLayer, swfMovie) {
			swfMovie = root.getObjRef(swfMovie) || this;
			try {
				var movieLayer = (swfLayer) ? swfLayer : '_level0/';
				swfMovie.TStopPlay(movieLayer);
			} catch (e) {  }
		}
		root.play = function(swfLayer, swfMovie) {
			swfMovie = root.getObjRef(swfMovie) || this;
			try {
				var movieLayer = (swfLayer) ? swfLayer : '_level0/';
				swfMovie.TPlay(movieLayer);
			} catch (e) {  }
		}
		root.rewind = function() {
			swfMovie = root.getObjRef(swfMovie) || this;
			try {
				swfMovie.Rewind();
			} catch (e) {  }
		}
		root.loadMov = function(layer, newSwf, swfMovie) {
			swfMovie = root.getObjRef(swfMovie) || this;
			newSwf = newSwf || '';
			try {
				swfMovie.LoadMovie(layer, newSwf);
			} catch (e) {  }
		}
		root.getObjRef = function(swfId) {
			var objRef = false;
			if (window.document[swfId])  { objRef = window.document[swfId]; }
			if (typeof(ActiveXObject) != 'undefined') {
				if (document.embeds && document.embeds[swfId]) { objRef =  document.embeds[swfId]; }
			} else {
				objRef = document.getElementById(swfId);
			}
			return objRef;
		}
		try {
			var testMovie = root.movie('', 1, 1);
		} catch (e) {
			root.rev = false;
		}
		root.setAll = function(revReq, postProcess){
			if (revReq && typeof(revReq) != 'number')                { throw('swf.setAll(revReq, postProcess): revReq must be a number, null, or boolean false'); }
			if (postProcess  && typeof(postProcess)  != 'function')  { throw('swf.setAll(revReq, postProcess): postProcess must be null, or a function!');        }
			root.allSwfs = [];
			var allElements = document.getElementsByTagName('div');
			var showFlash = !!(!revReq || root.rev >= revReq);
			var objBuilder  = function(thisObj, postProcess) {
				var options = {};
				var attbrs  = thisObj.attributes;
				for (var ii = 0; ii < attbrs.length; ii++) { 
					var name  = attbrs[ii].name;
					var value = attbrs[ii].value;
					if (
						name == 'id'     ||
						name == 'style'  ||
						name == 'objref' ||
						name == 'class'
					) { continue; }
					options[name] = value;
				}
				if (postProcess) { options = postProcess(options); }
				return options;
			}
			for (var i = 0; i < allElements.length; i++) {
				var thisObj = allElements[i];
				var thisOpt = thisObj.getAttribute('swfhandler');
				if (thisOpt) {
					thisOpt = thisOpt.toLowerCase();
					switch(thisOpt) {
						case 'altcont':
						        if (!showFlash) { window.location.replace('/default_html.aspx'); }
								if (showFlash) { thisObj.innerHTML = ''; }
								thisObj.style.visibility = (showFlash) ? 'hidden' : 'visible';
								thisObj.style.display    = (showFlash) ? 'none'   : 'block';
						break;
						case 'swfcont':
								if (!showFlash) { 
									thisObj.style.display    = 'none';
									thisObj.style.visibility = 'hidden';
									window.location.replace('/default_html.aspx');
									continue;
								} else {
									thisObj.style.display   = 'block';
									thisObj.style.visiblity = 'visible';
									var swfOpts = objBuilder(thisObj, postProcess);
									if (thisObj.getAttribute('objref')) {
										var objRef = thisObj.getAttribute('objref');
										if (typeof(window[objRef]) != 'undefined') {
											try { console.log('changing value of: ' + objRef + ' to swf.movie object reference'); } catch(e) {}
										}
										window[objRef] = root.movie(swfOpts.url, swfOpts);
										window[objRef] = thisObj.appendChild(window[objRef]);
									} else {
										var thisMovie = root.movie(swfOpts.url, swfOpts);
											thisMovie = thisObj.appendChild(thisMovie);
									}
								}
						break;
					}
				}
			}
		}
	}
	var swf = new swfHandler(false, {allowScriptAccess:'always', swfLiveConnect:'true', quality:'best', revReq:7});
//see customAdditions.js for commented code  
	if (!(document.qstr.pairs.jsDisabled)) {
		document.writeln('<link rel="stylesheet" href="/global/css/jsEnabled.css" />');                                                          // <-- general js-enabled css
		if (client.engine) {
			document.writeln('<link rel="stylesheet" href="/global/css/'  + client.engine + '.css" />');                                         // <-- browser specific js-enabled css
			if (client.engine != 'msie' && client.os != 'iphone') {
				document.writeln('<link rel="stylesheet" href="/global/css/'  + client.engine + '-' + client.os + '.css" />');                   // <-- browser/os js-enabled css
			}
			if (client.engine == 'msie' && parseInt(client.engRev) < 7) {
				document.writeln('<link rel="stylesheet" href="/global/css/'  + client.engine + '-' + parseInt(client.engRev) + '.css" />');     // <-- separates 7/6 msie eng
				if (parseInt(client.engRev) == 6) { document.writeln('<script type="text/javascript" src="/global/js/ie6PngSupport.js"></script>'); }
			}
		}
	} else {
		document.writeln('<link rel="stylesheet" href="/global/css/jsDisabled.css" />');                                                         // <-- general js-disabled css
	}