function MM_preloadImages() { //v3.0
	var d = document; 
	if (d.images) {
		if (!d.MM_p) {
			d.MM_p=new Array();
		}
		var i, j=d.MM_p.length, a=MM_preloadImages.arguments; 
		for (i=0; i < a.length; i++) {
			if (a[i].indexOf("#") != 0) {
				d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];
			}
		}
	}
}

function MM_swapImgRestore() { //v3.0
	var i,x,a=document.MM_sr;
	for (i=0; a && i < a.length && (x=a[i]) && x.oSrc; i++) {
		x.src=x.oSrc;
	}
}

function MM_swapImage() { //v3.0
	var i, j=0, x, a=MM_swapImage.arguments;
	document.MM_sr=new Array;
	for (i=0; i < (a.length-2); i+=3) {
		if ((x=MM_findObj(a[i]))!=null) {
			document.MM_sr[j++]=x;
			if (!x.oSrc) {
				x.oSrc=x.src;
				x.src=a[i+2];
			}
		}
	}
}

function MM_findObj(n, d) { //v4.01
	var p, i, x; 
	if (!d) {
		d=document;
	}
	if ((p=n.indexOf("?")) > 0 && parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document;
		n=n.substring(0,p);
	}
	if (!(x=d[n]) && d.all) {
		x=d.all[n];
	}
	for (i=0; !x && i < d.forms.length; i++) {
		x=d.forms[i][n];
	}
	for (i=0; !x && d.layers && i < d.layers.length; i++) {
		x=MM_findObj(n,d.layers[i].document);
	}
	if (!x && d.getElementById) {
		x=d.getElementById(n);
	}
	return x;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
	window.open(theURL,winName,features);
}

function MM_showHideLayers() { //v6.0
	var i, p, v, obj, args=MM_showHideLayers.arguments;
	for (i=0; i < (args.length-2); i+=3) {
		if ((obj=MM_findObj(args[i])) != null) { 
			v=args[i+2];
			if (obj.style) { 
				obj=obj.style; 
			}
			var d=(v=='show')?'block':(v=='hide')?'none':v;
			v=(v=='show')?'visible':(v=='hide')?'hidden':v; 
			obj.visibility=v; 
			obj.display=d;
		}
	}
}

// window pop up function
function popWindow(url, myWidth, myHeight) {
	var winWidth = mywidth ? myWidth : 462;
	var winHeight = myHeight ? myHeight : 480;
	var optionListing = "HEIGHT=" + winHeight + ",WIDTH=" + winWidth + ",innerHeight=480,innerWidth=462,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0,screenX=10,screenY=20";
	remote = window.open(url, "sb_popup", optionListing);
	if (remote != null)  {
		remote.focus();
	}
}

function popWindowScroll(url) {
	var optionListing = "HEIGHT=500,WIDTH=477,innerHeight=500,innerWidth=477,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0,screenX=10,screenY=20"
	remote = window.open(url, "sb_popup", optionListing);
	if (remote != null)  {
		remote.focus();
	}
}

function popWindowLarge(url) {
	var optionListing = "HEIGHT=500,WIDTH=660,innerHeight=500,innerWidth=660,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0,screenX=10,screenY=20"
	remote = window.open(url, "sb_popup", optionListing);
	if (remote != null)  {
		remote.focus();
	}
}

function sb_validateForm() { //v4.0
  	var i,p,q,nm,test,num,min,max,errors='',args=sb_validateForm.arguments;
  	for (i=0; i<(args.length-2); i+=3) { 
	
		test=args[i+2]; 
		val=MM_findObj(args[i]);
		if (val) { 
	
			var temp_nm=val.name;
			temp_nm=args[i];
			nm = eval(temp_nm+'_label'); 
		
			if ((val=val.value)!="") {
    	  		if (test.indexOf('isEmail')!=-1) { 
					p=val.indexOf('@');
					if (p<1 || p==(val.length-1)) {
						errors+='- '+nm+' '+emailError+'\n';
     				}
				} 
				else if (test!='R') { 
					num = parseFloat(val);
       				if (isNaN(val)) {
       					errors+='- '+nm+' '+numericError+'\n';
	   				}
					if (test.indexOf('inRange') != -1) { 
						p=test.indexOf(':');
        	  			min=test.substring(8,p); 
          				max=test.substring(p+1);
         				if (num<min || max<num) {
         					errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    					}
					}
    			}
    		} 
    		else if (test.charAt(0) == 'R') {
    			errors += '- '+nm+' '+nullError+'.\n'; 
			}
		}
  	}
	
  	if (errors) {
  		alert(validationMessage+'\n'+errors);
	}
	document.MM_returnValue = (errors == '');
}



// Returns the entire query string passed to the current page.
function getQueryString(){ 
	zquery = parent.location.search; 
	zquery = zquery.substring(1,zquery.length); 
	return (zquery); 
} 

// Parses a query string 'queryString' for the variable 'queryName'
// and returns the value associated with that name.
function parseQuery (queryString, queryName) {
	startIndex = queryString.indexOf(queryName);
	if (startIndex == -1) {
		return "";
	}
	
	startIndex = queryString.indexOf("=", startIndex) + 1;
	endIndex = queryString.indexOf("&", startIndex);
	if (endIndex == -1) {
		endIndex = queryString.length;
	}
	return queryString.substring(startIndex, endIndex);
}

function jumpPage(url) {
	if ((url != "none") && (url != "")) {
		// Escape the value of the parameter
		paramName = url.substring(0, url.indexOf("=")+1);
		varName = escape(url.substring(url.indexOf("=") + 1, url.length));
		url =  paramName + varName;
		location.href=url;
	}
}

function changeIframe (baseUrl, defaultPage, iframeNameParam) {
	var iframeName = "externalContent";
	if ((typeof iframeNameParam != 'undefined') && (iframeNameParam != "")) {
		iframeName = iframeNameParam;
	}
	
	var subpage = parseQuery(getQueryString(), "subpage");
	//alert("subpage = " + subpage);
	if (subpage == "") {
		subpage = defaultPage;
	}
	
	iFrameObj = getObj(iframeName);
	iFrameObj.src= "http://" + baseUrl + subpage;
}


// Writes out the subsection navigation
function sb_writeSubsectionNav () {
	var sHTML = "";
	var currentLocation = location.href;
	currentLocation = currentLocation.slice(currentLocation.lastIndexOf("/")+1);
	currentSection = -1;
	currentIndex = -1;
	
	//alert("currentIndex = "+currentIndex);
	
	for (i=0; (i<subsection.length) && (currentSection < 0); i++) {
		for (j=0; (j<subsection[i].length) && (currentIndex < 0); j++) {
			if (subsection[i][j].indexOf(currentLocation) != -1) {
				//alert ("index found at "+j+" - "+i);
				currentIndex = j;
				currentSection = i;
			}
		}
	}
	
	sHTML += "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
	sHTML += "<tr>";
	sHTML += "<td><img src=\"/site_images/s.gif\" width=\"1\" height=\"10\" alt=\"\"/></td>"
	sHTML += "<td  align=\"center\" valign=\"middle\" class=\"prevNext\" height=\"10\" nowrap>";
	
	if ((currentIndex-1) < 0) {
		sHTML += "<img src=\"/site_images/s.gif\" width=\"2\" height=\"1\" alt=\"\" /><span class=\"prevNextArrow\">&lt;</span><img src=\"/site_images/s.gif\" width=\"5\" height=\"1\" alt=\"\" />" + prevText ;
	} else {
		sHTML += "<img src=\"/site_images/s.gif\" width=\"2\" height=\"1\" alt=\"\" /><span class=\"prevNextArrow\">&lt;</span><img src=\"/site_images/s.gif\" width=\"5\" height=\"1\" alt=\"\" /><a href=\""  + subsection[currentSection][currentIndex-1] + "\" class=\"prevNextLink\">" + prevText + "</a>";
	}
	
	if (subsectionIndex == "") {
		sHTML += "<img src=\"/site_images/s.gif\" width=\"4\" height=\"1\" alt=\"\" />|<img src=\"/site_images/s.gif\" width=\"5\" height=\"1\" alt=\"\" />";
		sHTML += "Index";
		sHTML += "<img src=\"/site_images/s.gif\" width=\"4\" height=\"1\" alt=\"\" />|<img src=\"/site_images/s.gif\" width=\"5\" height=\"1\" alt=\"\" />";
	} else {
		sHTML += "<img src=\"/site_images/s.gif\" width=\"4\" height=\"1\" alt=\"\" />|<img src=\"/site_images/s.gif\" width=\"5\" height=\"1\" alt=\"\" />";
		sHTML += "<a href=\"" + subsectionIndex + "\" class=\"prevNextLink\">" + indexText + "</a>";
		sHTML += "<img src=\"/site_images/s.gif\" width=\"4\" height=\"1\" alt=\"\" />|<img src=\"/site_images/s.gif\" width=\"5\" height=\"1\" alt=\"\" />";
	}

	if ( (currentIndex < 0) || (currentIndex > (subsection[currentSection].length - 2)) ) {	
		sHTML += nextText + "<img src=\"/site_images/s.gif\" width=\"4\" height=\"1\" alt=\"\" /><span class=\"prevNextArrow\">&gt;</span><img src=\"/site_images/s.gif\" width=\"3\" height=\"1\" alt=\"\" />";
	} else {
		sHTML += "<a href=\"" + subsection[currentSection][currentIndex+1] +  "\" class=\"prevNextLink\">" + nextText + "</a><img src=\"/site_images/s.gif\" width=\"4\" height=\"1\" alt=\"\" /><span class=\"prevNextArrow\">&gt;</span><img src=\"/site_images/s.gif\" width=\"3\" height=\"1\" alt=\"\" />";
	}	
	sHTML += "</td>";
	sHTML += "</tr>";
	sHTML += "</table>";

	//alert(sHTML);
	document.write(sHTML);
}

document.write("<script language='JavaScript1.2' src='/scripts/sniffer.js'></script>");

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}
 
function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i < changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}
 
var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		topLeft_over = newImage("/images/finance/ar2004/topLeft-over.jpg");
		topRight_over = newImage("/images/finance/ar2004/topRight-over.jpg");
		botLeft_over = newImage("/images/finance/ar2004/botLeft-over.jpg");
		botRight_over = newImage("/images/finance/ar2004/botRight-over.jpg");
		taglines_botRight_over = newImage("/images/finance/ar2004/taglines-botRight_over.gif");
		taglines_botLeft_over = newImage("/images/finance/ar2004/taglines-botLeft_over.gif");
		taglines_topRight_over = newImage("/images/finance/ar2004/taglines-topRight_over.gif");
		taglines_topLeft_over = newImage("/images/finance/ar2004/taglines-topLeft_over.gif");
		preloadFlag = true;
	}
}

// begin animation swap
function scAni(name,value,days) {
    document.cookie = name+"="+value+"; path=/";
}

function rcAni(name) {
    return ((document.cookie.indexOf(name) == -1) ? null : 'found');
}

function aniSwap() {
	if (rcAni('headerAni') == null) {
		MM_swapImage('merckLogo','','/site_images/header/top-bar.gif',1);
		scAni('headerAni','x');
	}
}
//end animation swap
 
preloadImages();

//BEGIN FONT SIZER

//setCookie( "fontSize", this.curSize, -1, "/" );
function setCookie(name, value, days, path, domain, secure) {
	var expires = "";
	if ((typeof days == "number") && (days != -1)) {
		var date = new Date();
		date.setTime(date.getTime() + (days*24*60*60*1000));
		expires = date.toGMTString();
	}
	document.cookie = name + "=" + escape(value) +
		((expires) ? "; expires=" + expires : "") +
		((path) ? "; path=" + path : "") +
		((domain) ? "; domain=" + domain : "") +
		((secure) ? "; secure" : "");
}

function getCookie(name) {
	var nameq = name + "=";
	var c_ar = document.cookie.split(';');
	for (var i=0; i < c_ar.length; i++) {
		var c = c_ar[i];
		while (c.charAt(0)==' ') {
			c = c.substring(1, c.length);
		}
		if (c.indexOf(nameq) == 0) {
			return unescape(c.substring(nameq.length, c.length));
		}
	}
	return null;
}

function deleteCookie(name, path, domain) {
	if (getCookie(name)) {
		document.cookie = name + "=" +
			((path) ? "; path=" + path : "") +
			((domain) ? "; domain=" + domain : "") +
			"; expires=Thu, 01-Jan-70 00:00:01 GMT";
	}
}

var dw_fontSizerDX = {
    sizeUnit:    "px",
    defaultSize: 14,
    maxSize:     20,
    minSize:     10,
    adjustList: [], 

    setDefaults: function(unit, dflt, mn, mx, sels) {
        this.sizeUnit = unit;       this.defaultSize = dflt;
        this.maxSize = mx;          this.minSize = mn;
        if (sels) this.set(dflt, mn, mx, sels);
    },

    set: function (dflt, mn, mx, sels) { 
        var ln = this.adjustList.length;        
        for (var i=0; sels[i]; i++) {
            this.adjustList[ln+i] = [];
            this.adjustList[ln+i]["sel"]  = sels[i];
            this.adjustList[ln+i]["dflt"] = dflt;
            this.adjustList[ln+i]["min"]   = mn || this.minSize;
            this.adjustList[ln+i]["max"]   = mx || this.maxSize;
            this.adjustList[ln+i]["ratio"] = this.adjustList[ln+i]["dflt"] / this.defaultSize;
        }
    },

    init: function() {
        if ( !document.getElementById || !document.getElementsByTagName ) return;
        var size, sizerEl, i;
        size = window.location.search? window.location.search.slice(1): getCookie("fontSize");
        size = !isNaN( parseFloat(size) )? parseFloat(size): this.defaultSize;
        // in case default unit changed or size passed in url out of range
        if ( size > this.maxSize || size < this.minSize ) size = this.defaultSize;
        this.curSize = this.defaultSize;  // create curSize property to use in calculations 
        sizerEl = document.getElementById('sizer');
        if (sizerEl) sizerEl.style.display = "block";
        // if neither set nor setDefaults populates adjustList, apply sizes to body and td's
        if (this.adjustList && this.adjustList.length == 0) {
            this.setDefaults( this.sizeUnit, this.defaultSize, this.minSize, this.maxSize, ['body', 'td'] );
        }
        if ( size != this.defaultSize ) {
    			this.adjust( size - this.defaultSize );
    		}
    },

    adjust: function(n) {
        var viewTextSize = document.getElementById('viewTextSize');
        //MAT: MODIFIED
        if (ctaID != -1) clearTimeout(ctaID);
        //MAT: end
        if ( !this.curSize ) return; // set in init
        var alist, size, list, i, j;
        // check against max/minSize
        if ( n > 0 ) {
            if ( this.curSize + n > this.maxSize ) n = this.maxSize - this.curSize;
        } else if ( n < 0 ) {
            if ( this.curSize + n < this.minSize ) n = this.minSize - this.curSize;
        }
        if ( n == 0 ) return;
        this.curSize += n;
        // loop through adjustList, calculating size, checking max/min
        alist = this.adjustList;
        for (i=0; alist[i]; i++) {
            size = this.curSize * alist[i]['ratio']; // maintain proportion 
            size = Math.max(alist[i]['min'], size);
            size = Math.min(alist[i]['max'], size);
            list = dw_getElementsBySelector( alist[i]['sel'] );
            for (j=0; list[j]; j++) {
				list[j].style.fontSize = size + this.sizeUnit;
            }
        }
        setCookie( "fontSize", this.curSize, -1, "/" );
        //MAT: MODIFIED
        
        viewTextSize.style.fontSize = "medium";
        currTextSize = viewTextSize.offsetHeight;

        if (ctaID != -1) checkTextAdjust();
        //MAT: end
        
       // var submitstring = "/htbin/redirects/global/mrl/redirect.pl?url=/mrl/research/ts.html";
	//	var submitbox = document.getElementById('submitbox');
	//	if (submitbox && submitbox.contentDocument) {submitbox.contentDocument.location.replace(submitstring);}
	//	else if (submitbox) {submitbox.src = submitstring;}
    },

    reset: function() {
        var alist = this.adjustList, list, i, j;
        for (i=0; alist[i]; i++) {
            list = dw_getElementsBySelector( alist[i]['sel'] );
            for (j=0; list[j]; j++) { 
                // Reset adjustList elements to their default sizes
                //list[j].style.fontSize = alist[i]['dflt'] + this.sizeUnit;
                list[j].style.fontSize = '';  // restores original font size
            } 
        }
        this.curSize = this.defaultSize;
        deleteCookie("fontSize", "/");
        
     //   var submitstring = "/htbin/redirects/global/mrl/redirect.pl?url=/mrl/research/ts.html";
	//	var submitbox = document.getElementById('submitbox');
	//	if (submitbox && submitbox.contentDocument) {submitbox.contentDocument.location.replace(submitstring);}
	//	else if (submitbox) {submitbox.src = submitstring;}
    }

}

function dw_getElementsBySelector(selector) {
    if (!document.getElementsByTagName) return [];
    var nodeList = [document], tokens, bits, list, col, els, i, j, k;
    selector = selector.normalize();
    tokens = selector.split(' ');
    for (i=0; tokens[i]; i++) {
        if ( tokens[i].indexOf('#') != -1 ) {  // id
            bits = tokens[i].split('#'); 
            var el = document.getElementById( bits[1] );
            if (!el) return []; 
            if ( bits[0] ) {  // check tag
                if ( el.tagName.toLowerCase() != bits[0].toLowerCase() ) return [];
            }
            for (j=0; nodeList[j]; j++) {  // check containment
                if ( nodeList[j] == document || dw_contained(el, nodeList[j]) ) 
                    nodeList = [el];
                else return [];
            }
            continue; 
        }
        else if ( tokens[i].indexOf('.') != -1 ) {  // class
            bits = tokens[i].split('.'); col = [];
            for (j=0; nodeList[j]; j++) {
                els = dw_getElementsByClassName( bits[1], bits[0], nodeList[j] );
                for (k=0; els[k]; k++) { col[col.length] = els[k]; }
            }
            nodeList = [];
            for (j=0; col[j]; j++) { nodeList.push(col[j]); }
            continue; 
        }
        else {  // element 
            els = []; 
            for (j = 0; nodeList[j]; j++) {
                list = nodeList[j].getElementsByTagName(tokens[i]);
                for (k = 0; list[k]; k++) { els.push(list[k]); }
            }
            nodeList = els;
        }
    }
    return nodeList;
}

function dw_getElementsByClassName(sClass, sTag, oCont) {
	var result = [], list, i;
	var re = new RegExp("\\b" + sClass + "\\b", "i");
	oCont = oCont? oCont: document;
	if (document.getElementsByTagName) {
		if ( !sTag || sTag == "*" ) {
			list = oCont.all ? oCont.all : oCont.getElementsByTagName("*");
		}
		else {
			list = oCont.getElementsByTagName(sTag);
		}
		for (i=0; list[i]; i++) {
			if ( re.test( list[i].className ) ) {
				result.push( list[i] );
			}
		}
	}
	return result;
}

// returns true of oNode is contained by oCont (container)
function dw_contained(oNode, oCont) {
	if (!oNode) {
		return; // in case alt-tab away while hovering (prevent error)
	}
	while ( oNode = oNode.parentNode ) {
		if ( oNode == oCont ) {
			return true;
		}
	}
	return false;
}

if (!Array.prototype.push) {  // ie5.0
	Array.prototype.push =  function() {
		for (var i=0; arguments[i]; i++) {
			this[this.length] = arguments[i];
		}
		return this[this.length-1]; // return last value appended
	}
}

String.prototype.normalize = function() {
	var re = /\s\s+/g;
	return this.trim().replace(re, " ");
}

String.prototype.trim = function() {
	var re = /^\s+|\s+$/;
	return this.replace(re, "");
}

// setDefaults arguments: size unit, default size, minimum, maximum
// optional array of elements or selectors to apply these defaults to
//dw_fontSizerDX.setDefaults("px", 14, 9, 32, ['div#content'] );
//dw_fontSizerDX.setDefaults("em", 1, 1, 1, ['div#viewTextSize'] );
dw_fontSizerDX.setDefaults("px",12,8,20,['td','tr','body','table']);

// set arguments: default size, minimum, maximum
// array of elements or selectors to apply these settings to
//dw_fontSizerDX.set(12, 9, 18, ['div.sidebar'] );
dw_fontSizerDX.set(12, 12, 12, ['.navSection'] );
dw_fontSizerDX.set(10, 6, 18, ['.navSubsection','.navItem1','.navItem1off','.navItem1on','.navItem2','.navItem2off','.navItem2on','.navItem3','.navItem3off','.navItem3on','.navSubsection','.navbgMain','.navItem1selected','.navItem2selected','.navItem3selected']);
dw_fontSizerDX.set(12, 6, 18, ['.ticker','.homeNewsList','.homeFeatureList']);

//save to a cookie for page to page
var ctaID = -1;
var vtsStyle = "font-size: medium; visibility: hidden; position: absolute; left: -50px; top: -50px;";
document.write('<DIV ID="viewTextSize" style="'+vtsStyle+'">M</DIV>');

function showTextSizer() {
  var viewTextSize = document.getElementById('viewTextSize');
	dw_fontSizerDX.init();
	autoStart();
	if (getCookie("fontSize") || (viewTextSize.offsetHeight <= 21) || (viewTextSize.offsetHeight == 19)) {
		currTextSize = viewTextSize.offsetHeight;
		//document.write('<div id="sizer" class="sidebarCopy"><table><tr><td valign="top" width="20"><img src="/site_images/textsize.gif" width="20" height="16" alt="Text Size" border="0" style="padding-right: 2px"/></td><td valign="middle" width="11"><a href="javascript:dw_fontSizerDX.adjust(1);" title="Increase Text Size"><img src="/site_images/increase_textsize.gif" width="11" height="11" alt="Increase Text Size" border="0"/></a></td><td class="sidebarCopy"><a href="javascript:dw_fontSizerDX.reset();" title="Reset Text Size" class="linkNotUnderlined">Text Resize</a></td><td valign="middle" width="11"><a href="javascript:dw_fontSizerDX.adjust(-1);" title="Decrease Text Size"><img src="/site_images/decrease_textsize.gif" width="11" height="11" alt="Decrease Text Size" border="0"/></a></td></tr></table></div>');
		document.write(docText);
		MM_showHideLayers('sizer', '', 'show');
		checkTextAdjust();
	}
	else {
		dw_fontSizerDX.reset();
	}
}


function checkTextAdjust() {
  var viewTextSize = document.getElementById('viewTextSize');
	if ((viewTextSize.offsetHeight < currTextSize-1) || (viewTextSize.offsetHeight > currTextSize+1)) {
		MM_showHideLayers('sizer', '', 'hide');
		dw_fontSizerDX.reset();
	}
	else {
		ctaID = setTimeout('checkTextAdjust()',1000);	
	}
}

//END FONT SIZER


//TEMPORARY FONT SIZER TESTER
function autoStart() {
	//this line should be copied back into showTextSizer
	//document.write('<div id="sizer" class="sidebarCopy"><table><tr><td width="5"><img height="1" alt="" src="/site_images/s.gif" width="1"></td><td valign="top" width="20"><img src="/site_images/textsize.gif" width="20" height="16" alt="Text Size" border="0" style="padding-right: 2px"/></td><td valign="top" width="32"><a href="javascript:dw_fontSizerDX.adjust(2);" title="Increase Text Size"><img src="/site_images/increase_textsize.gif" width="15" height="16" alt="Increase Text Size" border="0"/></a><a href="javascript:dw_fontSizerDX.adjust(-2);" title="Decrease Text Size"><img src="/site_images/decrease_textsize.gif" width="15" height="16" alt="Decrease Text Size" border="0"/></a></td><td class="sidebarCopy"><a href="javascript:dw_fontSizerDX.reset();" title="Reset Text Size" class="linkNotUnderlined">reset</a> text size</td></tr></table></div>');
  if (window.onload)	{
    var loadStr1028 = window.onload.toString();
		var newLoadStr1028 = loadStr1028.substring(loadStr1028.indexOf("{") + 1,loadStr1028.lastIndexOf("}") - 1) + "\r" + ";" + "dw_fontSizerDX.init()";
		window.onload = new Function(newLoadStr1028);
	}
	else {
		//window.onload = showTextSizer;
		window.onload = "dw_fontSizerDX.init();";
	}
}
//autoStart();
//END TESTER

//YHN FIX FOR FLASH

theObjects = document.getElementsByTagName("object");
for (var i = 0; i < theObjects.length; i++) {
theObjects[i].outerHTML = theObjects[i].outerHTML;
}

//END YHN FIX

//this function includes all necessary js files for the application
function include(file) {
  var script  = document.createElement('script');
  script.src  = file;
  script.type = 'text/javascript';
  script.defer = 'defer';
  document.getElementsByTagName('head').item(0).appendChild(script);
}

//jQuery library and QuickFind code for QuickFind functionality
include('/scripts/jquery121.js');
include('/scripts/quicklinks.js');
//include('/scripts/survey.js');
include('/scripts/AC_RunActiveContent.js');
//include('/SpryAssets/SpryEffects.js');
include('/scripts/SpryEffects.js');  
//-include('/scripts/clientSideInclude.js');
include('/scripts/email-a-scout.js');

//HOME PAGE ANIMATION
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
function MM_effectGrowShrink(targetElement, duration, from, to, toggle, referHeight, growFromCenter)
{
 Spry.Effect.DoGrow(targetElement, {duration: duration, from: from, to: to, toggle: toggle, referHeight: referHeight, growCenter: growFromCenter});
}

 function elemOn(elem_id){
  if(document.getElementById(elem_id))
   document.getElementById(elem_id).style.display = "inline";
 }
 function elemOff(elem_id){
  if(document.getElementById(elem_id))
   document.getElementById(elem_id).style.display = "none";
 }
 function hideAll(){
  for( var i = 1; i <= 3; i++ )
   elemOff( 'div'+i );
 }
 function showAll(){
  for( var i = 1; i <= 3; i++ )
   elemOn( 'div'+i );
 }
 function showOne(elem_id){
  hideAll( );
  elemOn( elem_id );
 }
 
 //ACCESSIBILITY

var xmlDoc;
function importXML(file) {
 var moz = (typeof document.implementation != 'undefined') && (typeof document.implementation.createDocument != 'undefined');
 var ie = (typeof window.ActiveXObject != 'undefined');
 if (moz) {
	 //alert('Moz');
   xmlDoc = document.implementation.createDocument("", "", null);
   xmlDoc.async = false;
	 xmlDoc.onreadystatechange=verify;  
   xmlDoc.onload = readXML;
   xmlDoc.load(file);
 } 
 else if (ie) {
  // alert('IE');
   xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
   xmlDoc.async = false;
	 xmlDoc.onreadystatechange=verify;  
   xmlDoc.load(file);
   readXML();

 }
 else
 {
	//alert('i have no name :(');
	alert('Your browser can\'t load the XML file: ' + file);
	//return;
 } //end else if
}
function verify()
{  
	if (xmlDoc.readyState != 4)
	{  
	 return false;  
	}
}


function readXML()
{
  //alert('reading xml');

	var icons=xmlDoc.getElementsByTagName("icons");
	var pgms=icons[0].getElementsByTagName("icon");
	//REMOVE white spaces in XML file. Intended mainly for NS6/Mozilla
//	for (i=0;i<icons.childNodes.length;i++){
//		if ((icons.childNodes[i].nodeType == 3)&&
//		(!notWhitespace.test(icons.childNodes[i].nodeValue))) {
//			// that is, if it's a whitespace text node
//			icons.removeChild(icons.childNodes[i])
//			i--
//		}
//	}	
	var sText = '<table width="600" border="0" align="center" cellpadding="5" cellspacing="0">';
	var iCnt = pgms.length;
	for(var i=0; i<iCnt; i++) {
		sText += '<tr>';
		sText += '<td><h3>' + pgms[i].getAttribute("header") + '</h3>';
		sText += '<p><img src="' + pgms[i].getAttribute("thumbnail") + '" alt="' + pgms[i].getAttribute("thumbnailDescr") + '" align="left" /></p>';
		// Mozilla uses textContent, IE uses text
		if(typeof(pgms[i].textContent) != "undefined")
			sText += pgms[i].textContent;
		else
			sText += pgms[i].text ;
		var sType = pgms[i].getAttribute("type") ;
		if (sType == "video")
			sText += "<a href='" + pgms[i].getAttribute("fullvideoUrl") + "' title='" + pgms[i].getAttribute("fullvideoTooltip") + "' target='_blank'>" + pgms[i].getAttribute("fullvideoTooltip") + "</a><br /><br />";
		sText += '<hr width="95%" size="1" noshade="noshade" /></td></tr>';
	}
	sText += '</table>';
	document.write(sText);
}

