// JavaScript Document
function makelarge(thesize) {//this makes the body text base size larger
var thesizes = new Array()
thesizes[1]="small";
thesizes[2]="medium";
thesizes[3]="large";
var mybod = document.getElementById("thebody");
mybod.style.fontSize=thesizes[thesize];
hilitesize(thesize);
XMwriteCookie('tsize',thesize,20);
}

function hilitesize(thesize){//this hilights the correct graphic for the selected text size
//first set them all to non selected
var thetextgraphic;
for (var x = 1; x <= 3; x++)
	{
	thetextgraphic = document.getElementById("text"+x);
	thetextgraphic.src = "/images/tsize"+x +"_"+"1.gif";
	}
	//now set the real one
	thetextgraphic = document.getElementById("text"+thesize);
	thetextgraphic.src = "/images/tsize"+thesize +"_"+"2.gif";
	}

function setsize() {//restores the previous selection of size
var thesizes = new Array()
thesizes[1]="small";
thesizes[2]="medium";
thesizes[3]="large";
var mybod = document.getElementById("thebody");
var thecookie =XMreadCookie('tsize');
var thesize ="1";
if (thecookie !="")
{
	thesize = thecookie;
}
mybod.style.fontSize=thesizes[thesize];
hilitesize(thesize);
}

function XMwriteCookie(n,i,t){
	var ep="";if (t){d = new Date();d.setTime(d.getTime()+(t*86400000));
	ep = "; expires="+d.toGMTString();}document.cookie = n+"="+i+ep+"; path=/";
}

function XMreadCookie(n){
	eq = n+"=";ca = document.cookie.split(';');for(var i=0;i<ca.length;i++) {
	c=ca[i];while (c.charAt(0)==' ') c = c.substring(1,c.length);
	if (c.indexOf(eq) == 0) return c.substring(eq.length,c.length);}return '';
}

function P7_downClass2() { 
 var j,args=P7_downClass2.arguments;if(document.getElementById){
 if(!document.p7setdown){p7dco=new Array();document.p7setdown=true;}
 p7dco.length=0;j=0;for(var i=0;i<args.length;i+=2){
  if(document.getElementById(args[i])!=null){p7dco[j]=args[i];p7dco[j+1]=args[i+1];
  document.getElementById(args[i]).className=args[i+1];j+=2;}}}
}