if (document.images) {
        var button1off = new Image()
        button1off.src = "img/button_home_off.gif"
        var button1on = new Image()
        button1on.src = "img/button_home_on.gif"
        
        var footer1off = new Image()
        footer1off.src = "img/footer1_off.gif"
        var footer1on = new Image()
        footer1on.src = "img/footer1_on.gif"
        
        var footer2off = new Image()
        footer2off.src = "img/footer2_off.gif"
        var footer2on = new Image()
        footer2on.src = "img/footer2_on.gif"
        
        var footer3off = new Image()
        footer3off.src = "img/footer3_off.gif"
        var footer3on = new Image()
        footer3on.src = "img/footer3_on.gif"
        
        var footer4off = new Image()
        footer4off.src = "img/footer4_off.gif"
        var footer4on = new Image()
        footer4on.src = "img/footer4_on.gif"
        
}

function act(imgName) {
        if (document.images) {
                document[imgName].src = eval(imgName + 'on.src')
        };
}

function inact(imgName) {
        if (document.images) {
                document[imgName].src = eval(imgName + 'off.src')
        };
}

function sendform() {
                document.kidzForm.submit();
}


function preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.p) d.p=new Array();
    var i,j=d.p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.p[j]=new Image; d.p[j++].src=a[i];}}
}

function swapImgRestore() { //v3.0
  var i,x,a=document.sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function popupWin(theURL,winName,features,wd,ht) { //v2.0
  //'wd' is the width of the window being popped and 'ht' is the height.
  //features is modified to center the window on the screen. Calculated by finding centre of the screen and subtracting the width/2 and height/2 of the window
  var features=features+',left='+(screen.width/2-(wd/2))+',top='+(screen.height/2-(ht/2))
  winName=window.open(theURL,winName,features);
}

//this script caters for the size variations of popup windows across browsers and platforms adjusting the height accordingly for each.
function winsize(id,c,x,y){
	var agt = navigator.userAgent.toLowerCase();
	var d=eval(id)==null||eval(id+".closed");
	if ((agt.indexOf("mac")!=-1)) 
		{
			if ((agt.indexOf("msie") != -1))
			{
				//mac ie
				if(!d){eval(id+"."+c+"("+(x-8)+","+(y-34)+")");}				
			}
			else
			{
				//mac nn
				if(!d){eval(id+"."+c+"("+x+","+(y-32)+")");}				
			}
	}

	if ((agt.indexOf("win")!=-1)) 
	{
		if ((agt.indexOf("msie") != -1)) 
		{ 
			//pc ie
			if(!d){eval(id+"."+c+"("+x+","+y+")");}
			//alert("pc resize on ie")
		}
		else 
		{			
			if ((agt.indexOf("moz") != -1) && (agt.indexOf("6") != -1))
				{
					//pc nn 6										
					if(!d){eval(id+"."+c+"("+x+","+(y+10)+")");}
					//alert("pc nn6")					
				}
				else
				{
					//other pc nn			
					if(!d){eval(id+"."+c+"("+x+","+(y-7)+");");}
				}			
		}
	}else{
		
	}		
}

//called by glossary items
function winLoad(id,u){
	var d=eval(id)==null||eval(id+".closed");
	if(!d){eval(id+".location.href='"+u+"'")}
}

//called by glossary items and leaving popup
function winControl(id,c){ 
	var d=eval(id)==null||eval(id+".closed");
	if(!d){eval(id+"."+c);}
}

function 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=findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function swapImage() { //v3.0
  var i,j=0,x,a=swapImage.arguments; document.sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=findObj(a[i]))!=null){document.sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

var agt = navigator.userAgent.toLowerCase();
var sStyle, sKnowBreak;

if ((agt.indexOf("mac")!=-1)) 
{
	if ((agt.indexOf("msie") != -1))
	{
		//mac ie
		if ((agt.indexOf("5.0") != -1))
			{
				//mac ie
				sStyle = "<link rel='stylesheet' type='text/css' href='/styles/bodystyles_mac_ie.css'>";
				sKnowBreak = "<img src='/blackdot.gif' width='1' height='2' border='0'><br>";
			}
			else
			{
				//mac ie5.1 and greater
				sStyle = "<link rel='stylesheet' type='text/css' href='/styles/bodystyles_mac_ie51.css'>";
				sKnowBreak = "<img src='/blackdot.gif' width='1' height='2' border='0'><br>";
			}
	}
	else
	{
		//mac nn
		sStyle = "<link rel='stylesheet' type='text/css' href='/styles/bodystyles_mac_nn.css'>";
		sKnowBreak = "<img src='/blackdot.gif' width='1' height='2' border='0'><br>";
	}
} 
else 
{
	if ((agt.indexOf("win")!=-1)) 
	{
		if ((agt.indexOf("msie") != -1)) 
		{ 
			//pc ie
			sStyle = "<link rel='stylesheet' type='text/css' href='/styles/bodystyles_pc_ie.css'>"; 
			sKnowBreak = "<img src='/blackdot.gif' width='1' height='4' border='0'><br>";
		}
		else 
		{
			//pc nn
			sStyle = "<link rel='stylesheet' type='text/css' href='/styles/bodystyles_pc_nn.css'>"; 
			sKnowBreak = "<img src='/blackdot.gif' width='1' height='4' border='0'><br>";
		}
	}
}

//alert(sStyle);
document.write(sStyle);
