function setTextareas(){
	y = document.getElementById("edu").scrollHeight;
	y2 = document.getElementById("sum").scrollHeight;

	document.getElementById('edu').style.height = String(y)+"px";
	document.getElementById('sum').style.height = String(y2)+"px";

	/*
	y = document.getElementById('measurement');
	y2 = document.getElementById('measurement2');
	y.style.display = "none";
	y2.style.display = "none";
	*/
}

function setPage(title){
	str = window.location.search;//picks up the ?id=[]&page=[] values
	str = str.substr(1);//takes off the ?
	x = str.split("page=");//splits at the "page" variable
	y = x.pop()//takes off the last entry in the array (ie the "id" var)
	if(y.match("%20") != null){
		z = y.split("%20");//splits at any spaces (%20)...
		str = z.join(" ")//... then re-joins using the space (" ")
		str2 = z.join("");
	}else if(y.match(" ") != null){
		z = y.split(" ");//splits at any spaces (%20)...
		str = y;				//str holds the name given with all spaces ie. "conatact us"
		str2 = z.join("");		//str2 holds the name without spaces. ie "contactus"
	}else{
		str=y;
		str2=str;
	}
	
	if(str==""){
		str = "Home";// used to identify the default "sub menu". if different default please change value to match.
	}
	if(document.getElementById(str2)!="null"){
//		document.getElementById(str2).style.display = 'block'; // displays the relevent sub menu


	x=document.getElementById("menuBar"); // identify the submen blocks
	var children = x.childNodes; // create a list of it's child elements
 
   for (var i = 0; i < children.length; i++){ // for every child in the list
	   if(children[i].nodeName != "#text"){ // ignore any text childNodes - we only want the <DIV> childNodes
		  if(str != children[i].id){ // if the child node is not the one we want HIDE IT.
				document.getElementById(children[i].id).style.display = "none";
		  }
	   }
   }
   
}
		temp=document.getElementById(str2+"Nav")
		if(temp!=null){
		document.getElementById(str2+"Nav").className = 'clicked'; // marks the "top nav" menu item as clicked.
	}
	if(String(title)!="undefined"){
		document.title += " - "+ String(title); // sets the window title. ie. the blue bar at the top of the window.
		t = document.getElementById("pageTitle");
		t.innerHTML = title;  // sets the page title within the "white area" of the document
	}
}
function takeLinkNav(x){
  x.href += "&page=" + x.innerHTML;
  //document.cookie("pageCat="+x);
}
function takeLink(x){
  x.href += "&page=" + x.name;
}
function spawn(first,second,third){
	var x = new Array(first);
	for(i = 1; i < second; i++){
		x.push(first);
	}
	if(third){
		x = x.reverse();
	}
	return x;
}
function showHide(x){
	if(document.getElementById(x).style.display == 'block'){
		document.getElementById(x).parentNode.style.backgroundImage = 'url(folder.gif)';
		document.getElementById(x).style.display = 'none';
	}else{
		document.getElementById(x).style.display = 'block';
		document.getElementById(x).parentNode.style.backgroundImage = 'url(folder2.gif)';
	}
}

function mw_crumbs(divider,default_page,root){
	if(!divider) { divider = " > " }
	if(!default_page){ default_page = "index.asp" }
	var m = location.toString(),h = "";
	m = m.substring(m.indexOf("/") + 1);
	m = m.split("/");
	var howmany = spawn("../",m.length,true);
	howmany[m.length] = default_page;
	for(i = 1;i<m.length-1;i++){
		h += ("<a href = "+howmany[i+2]+">"+unescape( m[i]+"</a>"+divider))
	}
	h = h.substr(0,h.length-2);
	//h += "<b>"+document.title+"</b>";
	if(root) {
		h = h.replace(eval("/"+location.host+"/"),root);
	}
	h += "";
	return h
}