function am(name){document.write('<script src="'+name+'.js"><\/script>');
}
;
am("theBrain/prototype");
am("theBrain/wz_jsgraphics");
am("theBrain/utility");
am("theBrain/xmlUtil");
am("theBrain/settings");
am("theBrain/globals");
am("theBrain/thought");
am("theBrain/requestTht");
am("theBrain/search");
am("theBrain/autohide");
am("theBrain/dragPlex");
am("theBrain/animation");
am("theBrain/scrollbars");
am("theBrain/loadHeaderFooter");
am("theBrain/linkThoughts");

function startUp()
{	
	document.title=pageTitle;
	aq(); // set up the Header and footer divs loading html // dont bother
	aH(); // set global mouseUp and mouseMove handlers as z() and v()
	if(loadContentInFrame){$("mainPage").style.overflowY="hidden";
	}
	$("plex").style.fontSize=plexFontSize+"px";
	$("plexBackground").style.fontSize=plexFontSize+"px";
	ez=new jsGraphics("canvas");
	var H="";
	for(i=0; i<fJ.length; i++)
	{
		i=i+2;
		H+=fJ.substring(i,i+1);
	}
	fJ=H;
	H="";
	for(i=0; i<fK.length; i++)
	{
		i=i+2;
		H+=fK.substring(i,i+1);
	}
	fK=H;
	plexResized();
	if(configServerRequest!=null&&configServerRequest.length>0)
	{
		new Ajax.Request(configServerRequest,{method:'get',onSuccess:D,onFailure:O});
	}
	else
	{
		// I think this does the display
		//alert('jsut before D()');
		D();
	}
	
	/*aX="20";
	ax(aX);*/
	
};

function aj()
{
	an();
	eK();
	eJ();
};

function aH()
{
	if(document.all)
	{
		document.body.onmouseup=z;
		document.body.onmousemove=v;
	}
	else
	{
		document.body.setAttribute("onMouseUp","z(event);");
		document.body.setAttribute("onMouseMove","v(event);");
	}
};

// universal mouseUp handler
function z(e)
{
	if(!e) e=event;
	var fy=eN(e);
		
	if(!fy)
	{
		fy=aB(e);
	}
	return!fy;
};

// universal mouseMove handler
function v(e)
{
	if(!e) e=event;
	
	var fy=eM(e);
	if(!fy)
	{
		fy=aA(e);
	}
	return!fy;
};

// draw the thoughts in the plex!
function D()
{
	setInterval(aR,250);
	setInterval(fE,1000);
	
	if(animate)
	{
		setInterval(F,delay);
	}
	
	var dc=aa();
	if(dc!=null)
	{
		startThought=dc;
	}
	//alert(startThought);
	ax(startThought); //aX="60";"60");
	ct=true;
};

function O()
	{alert("There was an error during server side configuration.");};
	
function aR()
{
	var bn="perE83linSecEqKye";
	if(fB)
	{
		return;
	}
	fB=true;
	var dc=aa();
	bl=window.location.href;
	if(dc!=null)
	{
		var db="#-"+dc;
		if((db!=T(aX,0)&&db!=T(cP,0))||(fA==1&&fz==0))
		{
			ax(dc);
			scroll(0,0);
		}
	}
	fB=false;
};

// check if id dW is in element list ee
//
function aN(dW,ee)
{
	for(var i=0; i<ee.length; i++)
	{
		if(ee[i].id==dW)
		{
			return true;
		}
	}
	return false;
};

function af(dW){var ee=cS;
for(var i=0;
i<ee.length;
i++){if(ee[i].id==dW){return ee[i];
}
}
return null;
};

function aa()
{
	var cF=document.location.toString();
	if(cF.indexOf("#1-",0)!=-1)
	{
		fz=1;
		return cF.substring(cF.indexOf("#1-")+3);
	}
	if(cF.indexOf("#-",0)!=-1)
	{
		fz=0;
		return cF.substring(cF.indexOf("#-")+2);
	}
	if(cF.indexOf("#",0)==-1||cF.indexOf("#",0)==cF.length-1)
	{
		fz=0;
		return startThought;
	}
	return null;
};

function X(){if(document.all){var cF=$("backFixFrame").getAttribute("src");
if(cF.indexOf("=-",0)!=-1){return cF.substring(cF.indexOf("=-")+2);
}
return null;
}
}
;
function T(id,fz){var prefix="#-";
if(fz!=0){prefix="#"+fz+"-";
}
if(id==null)return null;
if(id.length<12)return prefix+id;
if(id.substring(0,11)=="1,Thoughts,"){return prefix+id.substring(11);
}
return prefix+id;
}
;
function o(){var cC=cD;
var cF=window.location.href;
var cr=cF.length;
var test="";
aK(true);
for(var i=0;
i<cF.length;
i++){cr--;
test+=cF.substring(i,i+1);
}
if(r(cC)!=cF)return false;
return true;
}
;
function r(cC){cC=ai(cC,null,null);
return cC;
}
 