
	// place flash file
	var iURL = $$("div.headline img")[0].src; var nImg = $$("div.headline img")[0];
	var fDiv = document.createElement("div"); fDiv.setAttribute('id', "fDiv");
	$(nImg).replaceWith($(fDiv));

	if ($$("div.homepage").length > 0) {
		var so = new SWFObject("/swf/banner_homepage.swf", "Banner", "394", "153", "6", "#FFFFFF");
	} else {
		var so = new SWFObject("/swf/banner.swf", "Banner", "394", "153", "6", "#FFFFFF");
	}
	so.addVariable("strImgUrl", iURL);
	so.addParam("wmode", "transparent");
	so.write("fDiv");
	
	// this code is to get IE6 to accept the dropdown
	if (document.all)
	{
		$$("#menubar li").forEach(function(lnk) {
			if ($(lnk).lastChild.tagName == "DIV") {
				$(lnk).onmouseover = new Function("this.lastChild.style.display = 'block';");
				$(lnk).onmouseout = new Function("this.lastChild.style.display = 'none';")
			}
		});
	}

	window.onresize = IEmenuFix;

	function IEmenuFix() {
		if (document.all)
		{
			$$(".dropdown").forEach(function(dd) {
				dd.style.left = ((window.getWidth() - 950) / 2) + 245;							 
			});	
		}
	}
	
	IEmenuFix();

function LoadFuncs() {
	// add drop cap
	if ($$("div.content p")[0] != undefined) {
		var par = $$("div.content p")[0];
		if (!$(par).hasClass("nodropcap")) {
			var dCon = document.createElement("div"); $(dCon).addClass("firstpara");
			var sDC = document.createElement("span"); $(sDC).addClass("dropcap");
			sDC.appendChild(document.createTextNode(par.innerHTML.charAt(0)));
			var p = document.createElement("p"); 
			p.appendChild(document.createTextNode(par.innerHTML.substring(1, par.innerHTML.length)));
			dCon.appendChild(sDC); dCon.appendChild(p);
			$(par).replaceWith($(dCon));
		}
	
		// if iconbar is present, make them scriptable
		$$("#iconpanel a").forEach(function(lnk) {
			$(lnk).setProperty('title', lnk.href);
			$(lnk).setProperty('href', "#");
			$(lnk).addEvent('click', function(){LoadIconFrame(this)});
		});
	}
}
LoadFuncs();

	// add 'hover' effect to drop down list
	$$("div.dropdown").forEach(function(divEl) {
		$(divEl).addEvent('mouseover', function(){$(this.parentNode.firstChild).addClass("hovered")});
		$(divEl).addEvent('mouseout', function(){$(this.parentNode.firstChild).removeClass("hovered")});
	});
/*
	// turn website into AJAX website
	var ajaxDiv = document.createElement("div");
	ajaxDiv.setAttribute('id', "ajaxframe");
	$("footer").appendChild(ajaxDiv);
	$$("a").forEach(function(lnk) {					 
		if (lnk.href.substring(0,19) == "http://www.2e-volve") // only for internal links (ex. home)
		{
			
			$(lnk).setProperty('title', lnk.href);
			$(lnk).setProperty('href', "#");
			$(lnk).addEvent('click', function(){LoadPage(this)});
			
		}
	});
*/
	function LoadPage(el)
	{
		$$("div.dropdown").forEach(function(div) {$(div).addClass("remove");}) // remove menus
		var oldhtml = $$("div.content")[0].innerHTML;
		$$("div.content")[0].innerHTML = "<div id='loadingpanel'><img src='/images/progress.gif' /><span>Loading...</span></div>" + oldhtml;
		$("ajaxframe").innerHTML = "";
		new Ajax(el.getProperty("title"), {method:"get", onComplete:DisplayPage}).request();
	}

	function DisplayPage(sHtml)
	{
		$("ajaxframe").innerHTML = sHtml;
		$("loadingpanel").style.display = "none";
		$$("div.headline")[0].innerHTML = $$("#ajaxframe div.headline")[0].innerHTML;
		$$("ul.leftlist")[0].innerHTML = $$("#ajaxframe ul.leftlist")[0].innerHTML;
		$$("div.content")[0].innerHTML = $$("#ajaxframe div.content")[0].innerHTML;
		LoadFuncs();
		$$("div.dropdown").forEach(function(div) {$(div).removeClass("remove");}) // bring back menus
	}
	
	
	
	function CraigBio() {
		var grey = document.createElement("div"); grey.setAttribute('id', "grey-bg");
		$("footer").appendChild(grey);
		var greydisappear = new Fx.Style('grey-bg', 'opacity',{duration:0}); greydisappear.set(0);
		var fadein = new Fx.Style('grey-bg', 'opacity', {duration:500, transition:Fx.Transitions.quartInOut});
		fadein.start(0,0.4); 
		
		$("craig-bio").style.display = "block";
		var boxdisappear = new Fx.Style('craig-bio', 'opacity',{duration:0}); greydisappear.set(0);
		var boxfadein = new Fx.Style('craig-bio', 'opacity', {duration:900, transition:Fx.Transitions.quartInOut});
		boxfadein.start(0,1); 
	}
	
	function RemoveBio() {
		$("craig-bio").style.display = "none";
		$('grey-bg').remove();
	}






