
	// browser DOM check
var theBrowserInfo = new Object();

function ClientSniffer()
{
	theBrowserInfo.ua = navigator.userAgent.toLowerCase();
	theBrowserInfo.major = parseInt(navigator.appVersion, 10);
	theBrowserInfo.minor = parseFloat("."+navigator.appVersion.split('.')[1].split(" ")[0]);
	theBrowserInfo.spoofer = (theBrowserInfo.ua.indexOf('spoofer') != -1);
	theBrowserInfo.compatible = (theBrowserInfo.ua.indexOf('compatible') != -1);

	theBrowserInfo.firefox = (theBrowserInfo.ua.indexOf("firefox") != -1);
	theBrowserInfo.moz = (theBrowserInfo.ua.indexOf('mozilla')!=-1);
	theBrowserInfo.ie = (theBrowserInfo.ua.indexOf("msie") != -1);
	theBrowserInfo.ns = (theBrowserInfo.ua.indexOf("netscape") != -1);
	theBrowserInfo.opera = (theBrowserInfo.ua.indexOf("opera") != -1);
	theBrowserInfo.safari = (theBrowserInfo.ua.indexOf("safari") != -1);
	theBrowserInfo.webtv = (theBrowserInfo.ua.indexOf("webtv") != -1);
//====================== opera ==============================================
// theBrowserInfo.ua (id as opera):		opera/8.50 (windows nt 5.0; u; en)
// theBrowserInfo.ua (id as mozilla):	mozilla/5.0 (windows nt 5.0; u; en) opera 8.50
// theBrowserInfo.ua (id as ie):		mozilla/4.0 (compatible; msie 6.0; windows nt 5.0; en) opera 8.50

	var tmptSringArray = null;

	if(theBrowserInfo.opera){
		var operaVersion = null;
		operaVersion = theBrowserInfo.ua.substring(theBrowserInfo.ua.indexOf("opera"));

		if((theBrowserInfo.ie) || (theBrowserInfo.moz)){
				// opera is IDing as mozilla or ie
			tmptSringArray = operaVersion.split(" ")[1].split(".");
		}else{
				// opera is IDing as opera
			tmptSringArray = (operaVersion.split("/")[1]).split(" ")[0].split(".");
		}
		theBrowserInfo.opMajor = parseInt(tmptSringArray[0], 10);
		theBrowserInfo.opMinor = parseInt(tmptSringArray[1], 10);
		theBrowserInfo.opera8p999down =
			(((theBrowserInfo.opMajor < 9)) &&
			(theBrowserInfo.opera === true));
	}else{
		theBrowserInfo.opMajor = 0;
		theBrowserInfo.opMinor = 0;
	}
//====================== mozilla ==============================================
	if(theBrowserInfo.moz && !theBrowserInfo.safari){
		if(!(theBrowserInfo.spoofer) &&
			!(theBrowserInfo.compatible) &&
			!(theBrowserInfo.firefox) &&
			!(theBrowserInfo.ns) &&
			!(theBrowserInfo.opera) &&
			!(theBrowserInfo.webtv)){
			var mozVersion = theBrowserInfo.ua.substring(theBrowserInfo.ua.indexOf("mozilla"));
			tmptSringArray = (mozVersion.split("rv:")[1]).split(" ")[0].split(".");

			theBrowserInfo.mozMajor = parseInt(tmptSringArray[0], 10);
			theBrowserInfo.mozMinor = parseInt(tmptSringArray[1], 10);
			theBrowserInfo.mozMini = parseInt(tmptSringArray[2], 10);

			theBrowserInfo.moz1p7p9down =
				(((
					(theBrowserInfo.mozMajor == 1) &&
					(theBrowserInfo.mozMinor == 7) &&
					(theBrowserInfo.mozMini < 10)) ||
					((theBrowserInfo.mozMajor == 1) &&
					(theBrowserInfo.mozMinor < 7)) ||
					(theBrowserInfo.mozMajor < 1)) &&
					(theBrowserInfo.moz === true));
		}
	}else{
		theBrowserInfo.mozMajor = 0;
		theBrowserInfo.mozMinor = 0;
	}
//====================== netscape ==============================================
	if(theBrowserInfo.ns && !theBrowserInfo.safari){
		if((!theBrowserInfo.spoofer) &&
		   (!theBrowserInfo.compatible) &&
			(!theBrowserInfo.firefox) &&
			(!theBrowserInfo.opera) &&
			(!theBrowserInfo.webtv)){
		var nsVersion = theBrowserInfo.ua.substring(theBrowserInfo.ua.indexOf("netscape"));
		tmptSringArray = (nsVersion.split("/")[1]).split(".");
		theBrowserInfo.nsMajor = parseInt(tmptSringArray[0], 10);
		theBrowserInfo.nsMinor = parseInt(tmptSringArray[1].split(' ')[0], 10);
		theBrowserInfo.ns7p1down =
			(((
				(theBrowserInfo.nsMajor == 7) &&
				(theBrowserInfo.nsMinor < 2)) ||
				(theBrowserInfo.nsMajor < 7)) &&
				(theBrowserInfo.ns === true));
		}
	}else{
		theBrowserInfo.nsMajor = 0;
		theBrowserInfo.nsMinor = 0;
	}
//====================== ie ==============================================
	if(theBrowserInfo.ie && !theBrowserInfo.safari && !theBrowserInfo.opera){
		var ieVersion = theBrowserInfo.ua.substring(theBrowserInfo.ua.indexOf("msie "));
		tmptSringArray = ((ieVersion.split(" ")[1]).split(";")[0]).split(".");
		theBrowserInfo.ieMajor = parseInt(tmptSringArray[0], 10);
		theBrowserInfo.ieMinor = parseInt(tmptSringArray[1], 10);
		theBrowserInfo.ie5p5down =
			((((theBrowserInfo.ieMajor == 5) &&
				(theBrowserInfo.ieMinor < 6)) ||
				(theBrowserInfo.ieMajor < 5)) &&
				(theBrowserInfo.ie === true));
	}else{
		theBrowserInfo.ieMajor = 0;
		theBrowserInfo.ieMinor = 0;
	}
//====================== firefox ==============================================
	if(theBrowserInfo.firefox){
		var ffVersion = theBrowserInfo.ua.substring(theBrowserInfo.ua.indexOf("firefox"));
		tmptSringArray = (ffVersion.split("/")[1]).split(".");
		theBrowserInfo.ffMajor = parseInt(tmptSringArray[0], 10);
		theBrowserInfo.ffMinor = parseInt(tmptSringArray[1], 10);
		theBrowserInfo.ffMini = parseInt(tmptSringArray[2], 10);
		theBrowserInfo.ff1p4down =
			((((theBrowserInfo.ffMajor == 1) && (theBrowserInfo.ffMinor < 5)) ||
				(theBrowserInfo.ffMajor < 1)) &&
				(theBrowserInfo.firefox === true));
	}else{
		theBrowserInfo.ffMajor = 0;
		theBrowserInfo.ffMinor = 0;
	}
//====================== misc OS & platform ====================================
	theBrowserInfo.win = (theBrowserInfo.ua.indexOf("win") != -1);
	theBrowserInfo.mac = (theBrowserInfo.ua.indexOf("mac") != -1);

	theBrowserInfo.bit16 = (theBrowserInfo.ua.indexOf("16bit") != -1);
	theBrowserInfo.win95 = ((theBrowserInfo.ua.indexOf("win95")!=-1) ||
							(theBrowserInfo.ua.indexOf("windows 95")!=-1));
	theBrowserInfo.win98 = ((theBrowserInfo.ua.indexOf("win98")!=-1) ||
							(theBrowserInfo.ua.indexOf("windows 98")!=-1));
	theBrowserInfo.winnt = ((theBrowserInfo.ua.indexOf("winnt")!=-1) ||
							(theBrowserInfo.ua.indexOf("windows nt")!=-1));
//====================== DOM ====================================
	theBrowserInfo.DOMtest =	!(!(document.getElementById));
//====================== Final Flag ====================================
	theBrowserInfo.DOM = !(
					!(theBrowserInfo.DOMtest) ||
					(theBrowserInfo.ff1p4down) ||
					(theBrowserInfo.ie5p5down) ||
					(theBrowserInfo.moz1p7p9down) ||
					(theBrowserInfo.ns7p1down) ||
					(theBrowserInfo.opera8p999down) ||
					(theBrowserInfo.safari));
}

	// sniff the browser for DOM and JavaScript support
var scspi_use_fallback_html;

ClientSniffer();
if(theBrowserInfo.DOM){
	scspi_use_fallback_html = false;
		// debug the dumb site
	if(window && window.location && window.location.search){
		if(window.location.search.slice(1) == 'dumb'){
			scspi_use_fallback_html = true;
		}
	}
}else{
	scspi_use_fallback_html = true;
}

//====================== DOM ====================================

function include_once(theFilename){
	document.write('<script type="text/javascript" src="'+theFilename+'"></script>');
}

if(scspi_use_fallback_html === false){
	document.write('<link rel="stylesheet" type="text/css" href="scspi_dyn.css">');

	include_once('scripts/scspi_fastinit.js');

	include_once('scripts/prototype/dist/c.prototype.js');
	include_once('scripts/scriptaculous-js/src/c.scriptaculous.js');
	include_once('scripts/xslt/c.sarissa.js');
	include_once('scripts/moo_fx/scripts/c.moo.fx.js');
	include_once('scripts/moo_fx/scripts/c.moo.fx.utils.js');

	include_once('scripts/c.scspi_js_lib.js');
	include_once('scripts/c.scspi_defs.js');
	include_once('scripts/c.scspi_key_issue_names.js');
	include_once('scripts/c.scspi_page_header.js');
	include_once('scripts/c.scspi_linkables.js');

	include_once('scripts/c.scspi_menu_objects.js');
	include_once('scripts/c.scspi_menu.js');
	include_once('scripts/c.scspi_menu_events.js');
	include_once('scripts/c.scspi_menu_content_get_involved_arrays.js');
	include_once('scripts/c.scspi_menu_content_key_issues_arrays.js');
	include_once('scripts/c.scspi_menu_content_new_media_arrays.js');
	include_once('scripts/c.scspi_menu_content_news_events_arrays.js');
	include_once('scripts/c.scspi_menu_content_programs_arrays.js');
	include_once('scripts/c.scspi_menu_content_publications_arrays.js');
	include_once('scripts/c.scspi_menu_content_trend_data_arrays.js');
	include_once('scripts/c.scspi_menu_content_arrays.js');
	include_once('scripts/c.scspi_menu_top_about_arrays.js');
	include_once('scripts/c.scspi_menu_top_who_we_are_arrays.js');
	include_once('scripts/c.scspi_menu_top_arrays.js');

	include_once('scripts/c.scspi_dyn_content.js');
	include_once('scripts/c.scspi_dyn_content_footer_nav.js');
	include_once('scripts/c.scspi_dyn_content_media.js');
	include_once('scripts/c.scspi_dyn_content_media_affiliates.js');
	include_once('scripts/c.scspi_dyn_content_people.js');
	include_once('scripts/c.scspi_dyn_content_people_categories.js');
	include_once('scripts/c.scspi_dyn_content_quote.js');

	//include_once('scripts/scspi_dyn_content_viz_data.js');

	include_once('scripts/c.scspi_affiliate_bio_clean_page.js');
	include_once('scripts/c.scspi_affiliate_bio.js');

	include_once('scripts/c.scspi_media_catalog_clean_page.js');
	include_once('scripts/c.scspi_media_catalog.js');

	include_once('scripts/c.scspi_XML_parse_data_to_object.js');
	include_once('scripts/c.scspi_XML_post.js');
	include_once('scripts/c.scspi_XML_query_objects.js');
	include_once('scripts/c.scspi_XML_data_get.js');
	include_once('scripts/c.scspi_XSLT.js');

	include_once('scripts/c.scspi.js');
}
