function content_switch() {
	var thisid = '';
	var thisdiv = '';
	var result = '';
	
	var content_layers = document.getElementsByTagName("div");
	for (var i = 0; i <= (content_layers.length - 1); i++) {
		thisid = content_layers[i].id
		result = thisid.match(/content_layer_(.+)/);
		if (result != null) {
			// Check to see if this div's id matches any of the arguments.
			// If there's a match, this div will be toggled "On", otherwise "Off".
			var arg_match = 0;
			for (var j = 0; j <= (arguments.length - 1); j++) {
				if (thisid == ('content_layer_' + arguments[j])) {
					arg_match++;
				}
			}
			
			thisdiv = document.getElementById(thisid);
			var tempahrefid = 'layer_link_' + result[1];	// result[1] is the (matched) portion of the regex above
			var thisahref = document.getElementById(tempahrefid);
			if (arg_match > 0) {
				thisdiv.style.display = "";
				if (thisahref != null) {
					thisahref.style.background = "url('http://www2.ku.edu/~hipaa/images/icons/box_black.gif') no-repeat 0 0.5em";
					thisahref.style.font = "bold 1em Arial, Helvetica, sans-serif";
					thisahref.style.color = "#000";
				}
			} else {
				thisdiv.style.display = "none";
				if (thisahref != null) {
					thisahref.style.background = "url('http://www2.ku.edu/~hipaa/images/icons/box_grey.gif') no-repeat 0 0.5em";
					thisahref.style.font = "normal 1em Arial, Helvetica, sans-serif";
					thisahref.style.color = "#0049ae";
				}
			}
			
		} // if (result != null)
	} // for (var i = 0...)
} // function content_switch

function content_switch_plain() {
	var thisid = '';
	var thisdiv = '';
	var result = '';
	
	var content_layers = document.getElementsByTagName("div");
	for (var i = 0; i <= (content_layers.length - 1); i++) {
		thisid = content_layers[i].id
		result = thisid.match(/content_layer_(.+)/);
		if (result != null) {
			// Check to see if this div's id matches any of the arguments.
			// If there's a match, this div will be toggled "On", otherwise "Off".
			var arg_match = 0;
			for (var j = 0; j <= (arguments.length - 1); j++) {
				if (thisid == ('content_layer_' + arguments[j])) {
					arg_match++;
				}
			}
			
			thisdiv = document.getElementById(thisid);
			var tempahrefid = 'layer_link_' + result[1];	// result[1] is the (matched) portion of the regex above
			var thisahref = document.getElementById(tempahrefid);
			if (arg_match > 0) {
				thisdiv.style.display = "";
				if (thisahref != null) {
					thisahref.style.font = "bold 1em Arial, Helvetica, sans-serif";
					thisahref.style.color = "#000";
				}
			} else {
				thisdiv.style.display = "none";
				if (thisahref != null) {
					thisahref.style.font = "normal 1em Arial, Helvetica, sans-serif";
					thisahref.style.color = "#0049ae";
				}
			}
			
		} // if (result != null)
	} // for (var i = 0...)
} // function content_switch

function content_switch2() {
	var thisid = '';
	var thisdiv = '';
	var result = '';
	
	var content_layers = document.getElementsByTagName("div");
	for (var i = 0; i <= (content_layers.length - 1); i++) {
		thisid = content_layers[i].id
		result = thisid.match(/content_layer_(.+)/);
		if (result != null) {
			// Check to see if this div's id matches any of the arguments.
			// If there's a match, this div will be toggled "On", otherwise "Off".
			var arg_match = 0;
			for (var j = 0; j <= (arguments.length - 1); j++) {
				if (thisid == ('content_layer_' + arguments[j])) {
					arg_match++;
				}
			}
			
			thisdiv = document.getElementById(thisid);
			var tempahrefid = 'layer_link_' + result[1];	// result[1] is the (matched) portion of the regex above
			var thisahref = document.getElementById(tempahrefid);
			if (arg_match > 0) {
				thisdiv.style.display = "";
				if (thisahref != null) {
					thisahref.style.background = "url('/~provost/images/icons/arrow_down.gif') no-repeat 0 0.3em";
					thisahref.style.font = "bold 1em Arial, Helvetica, sans-serif";
					thisahref.style.color = "#660000";
					thisahref.style.lineHeight = "1.4";
				}
			} else {
				thisdiv.style.display = "none";
				if (thisahref != null) {
					//thisahref.style.background = "url('') no-repeat 0 0.6em";
					thisahref.style.background = "url('') no-repeat 0 0.5em";
					thisahref.style.font = "normal 1em Arial, Helvetica, sans-serif";
					thisahref.style.color = "#660000";
					thisahref.style.lineHeight = "1.4";
				}
			}
			
		} // if (result != null)
	} // for (var i = 0...)
} // function content_switch2

function content_switch_ad() {
	var thisid = '';
	var thisdiv = '';
	var result = '';
	
	var content_layers = document.getElementsByTagName("div");
	for (var i = 0; i <= (content_layers.length - 1); i++) {
		thisid = content_layers[i].id
		result = thisid.match(/content_layer_(.+)/);
		if (result != null) {
			// Check to see if this div's id matches any of the arguments.
			// If there's a match, this div will be toggled "On", otherwise "Off".
			var arg_match = 0;
			for (var j = 0; j <= (arguments.length - 1); j++) {
				if (thisid == ('content_layer_' + arguments[j])) {
					arg_match++;
				}
			}
			
			thisdiv = document.getElementById(thisid);
			var tempahrefid = 'layer_link_' + result[1];	// result[1] is the (matched) portion of the regex above
			var thisahref = document.getElementById(tempahrefid);
			if (arg_match > 0) {
				thisdiv.style.display = "";
				if (thisahref != null) {
					thisahref.style.background = "url('http://www2.ku.edu/~hipaa/images/icons/arrow_down.gif') no-repeat 0 0.3em";
					thisahref.style.font = "bold 1em Arial, Helvetica, sans-serif";
					thisahref.style.color = "#333366";
					thisahref.style.lineHeight = "1.4";
				}
			} else {
				thisdiv.style.display = "none";
				if (thisahref != null) {
					//thisahref.style.background = "url('') no-repeat 0 0.6em";
					thisahref.style.background = "url('') no-repeat 0 0.5em";
					thisahref.style.font = "normal 1em Arial, Helvetica, sans-serif";
					thisahref.style.color = "#cbde9d";
					thisahref.style.lineHeight = "1.4";
				}
			}
			
		} // if (result != null)
	} // for (var i = 0...)
} // function content_switch_ad

function content_switch_gallery() {
	var thisid = '';
	var thisdiv = '';
	var result = '';
	
	var content_layers = document.getElementsByTagName("div");
	for (var i = 0; i <= (content_layers.length - 1); i++) {
		thisid = content_layers[i].id
		result = thisid.match(/content_layer_(.+)/);
		if (result != null) {
			// Check to see if this div's id matches any of the arguments.
			// If there's a match, this div will be toggled "On", otherwise "Off".
			var arg_match = 0;
			for (var j = 0; j <= (arguments.length - 1); j++) {
				if (thisid == ('content_layer_' + arguments[j])) {
					arg_match++;
				}
			}
			
			thisdiv = document.getElementById(thisid);
			var tempahrefid = 'layer_link_' + result[1];	// result[1] is the (matched) portion of the regex above
			var thisahref = document.getElementById(tempahrefid);
			if (arg_match > 0) {
				thisdiv.style.display = "";
				if (thisahref != null) {
					//thisahref.style.border = "1px solid #333366";
				}
			} else {
				thisdiv.style.display = "none";
				if (thisahref != null) {
					//thisahref.style.border = "1px solid #9999cc";
				}
			}
			
		} // if (result != null)
	} // for (var i = 0...)
} // function content_switch_gallery

function content_switch_larrow() {
	var thisid = '';
	var thisdiv = '';
	var result = '';
	
	var content_layers = document.getElementsByTagName("div");
	for (var i = 0; i <= (content_layers.length - 1); i++) {
		thisid = content_layers[i].id
		result = thisid.match(/content_layer_(.+)/);
		if (result != null) {
			// Check to see if this div's id matches any of the arguments.
			// If there's a match, this div will be toggled "On", otherwise "Off".
			var arg_match = 0;
			for (var j = 0; j <= (arguments.length - 1); j++) {
				if (thisid == ('content_layer_' + arguments[j])) {
					arg_match++;
				}
			}
			
			thisdiv = document.getElementById(thisid);
			var tempahrefid = 'layer_link_' + result[1];	// result[1] is the (matched) portion of the regex above
			var thisahref = document.getElementById(tempahrefid);
			if (arg_match > 0) {
				thisdiv.style.display = "";
				if (thisahref != null) {
					thisahref.style.background = "url('http://www2.ku.edu/~hipaa/images/icons/arrow_left.gif') no-repeat 0 0.4em";
					thisahref.style.font = "bold .9em Arial, Helvetica, sans-serif";
					thisahref.style.color = "#660000";
					thisahref.style.lineHeight = "1.1";
				}
			} else {
				thisdiv.style.display = "none";
				if (thisahref != null) {
					//thisahref.style.background = "url('') no-repeat 0 0.6em";
					thisahref.style.background = "url('') no-repeat 0 0.5em";
					thisahref.style.font = "normal .9em Arial, Helvetica, sans-serif";
					thisahref.style.color = "#660000";
					thisahref.style.lineHeight = "1.1";
				}
			}
			
		} // if (result != null)
	} // for (var i = 0...)
} // function content_switch_larrow

function content_switch_rarrow() {
	var thisid = '';
	var thisdiv = '';
	var result = '';
	
	var content_layers = document.getElementsByTagName("div");
	for (var i = 0; i <= (content_layers.length - 1); i++) {
		thisid = content_layers[i].id
		result = thisid.match(/content_layer_(.+)/);
		if (result != null) {
			// Check to see if this div's id matches any of the arguments.
			// If there's a match, this div will be toggled "On", otherwise "Off".
			var arg_match = 0;
			for (var j = 0; j <= (arguments.length - 1); j++) {
				if (thisid == ('content_layer_' + arguments[j])) {
					arg_match++;
				}
			}
			
			thisdiv = document.getElementById(thisid);
			var tempahrefid = 'layer_link_' + result[1];	// result[1] is the (matched) portion of the regex above
			var thisahref = document.getElementById(tempahrefid);
			if (arg_match > 0) {
				thisdiv.style.display = "";
				if (thisahref != null) {
					thisahref.style.background = "url('http://www2.ku.edu/~hipaa/images/icons/arrow_right.gif') no-repeat 0 0.4em";
					thisahref.style.font = "bold 1em Arial, Helvetica, sans-serif";
					thisahref.style.color = "#660000";
					thisahref.style.lineHeight = "1.1em";
				}
			} else {
				thisdiv.style.display = "none";
				if (thisahref != null) {
					//thisahref.style.background = "url('') no-repeat 0 0.6em";
					thisahref.style.background = "url('') no-repeat 0 0.5em";
					thisahref.style.font = "normal 1em Arial, Helvetica, sans-serif";
					thisahref.style.color = "#660000";
					thisahref.style.lineHeight = "1.1em";
				}
			}
			
		} // if (result != null)
	} // for (var i = 0...)
} // function content_switch_rarrow

function content_switch_plus() {
	var thisid = '';
	var thisdiv = '';
	var result = '';
	
	var content_layers = document.getElementsByTagName("div");
	for (var i = 0; i <= (content_layers.length - 1); i++) {
		thisid = content_layers[i].id
		result = thisid.match(/content_layer_(.+)/);
		if (result != null) {
			// Check to see if this div's id matches any of the arguments.
			// If there's a match, this div will be toggled "On", otherwise "Off".
			var arg_match = 0;
			for (var j = 0; j <= (arguments.length - 1); j++) {
				if (thisid == ('content_layer_' + arguments[j])) {
					arg_match++;
				}
			}
			
			thisdiv = document.getElementById(thisid);
			var tempahrefid = 'layer_link_' + result[1];	// result[1] is the (matched) portion of the regex above
			var thisahref = document.getElementById(tempahrefid);
			if (arg_match > 0) {
				thisdiv.style.display = "";
				if (thisahref != null) {
					thisahref.style.font = "bold 1em Arial, Helvetica, sans-serif";
					thisahref.style.color = "#000";
					thisahref.style.listStyleImage = "url('http://www2.ku.edu/~hipaa/images/icons/minus.png')";
				}
			} else {
				thisdiv.style.display = "none";
				if (thisahref != null) {
					thisahref.style.font = "normal 1em Arial, Helvetica, sans-serif";
					thisahref.style.color = "#0049AE";
					thisahref.style.listStyleImage = "url('http://www2.ku.edu/~hipaa/images/icons/plus.png')";
				}
			}
			
		} // if (result != null)
	} // for (var i = 0...)
} // function content_switch_plus

var temp, temp2, cookieArray, cookieArray2, cookieCount;
function initiate(){
  cookieCount=0;
  if(document.cookie){
    cookieArray=document.cookie.split(";");
    cookieArray2=new Array();
    for(i in cookieArray){
      cookieArray2[cookieArray[i].split("=")[0].replace(/ /g,"")]=cookieArray[i].split("=")[1].replace(/ /g,"");
    }
  }
  cookieArray=(document.cookie.indexOf("state=")>=0)?cookieArray2["state"].split(","):new Array();
  temp=document.getElementById("containerul");
  for(var o=0;o<temp.getElementsByTagName("li").length;o++){
    if(temp.getElementsByTagName("li")[o].getElementsByTagName("ul").length>0){
      temp2 = document.createElement("span");
      temp2.className = "symbols";
      temp2.style.backgroundImage = (cookieArray.length>0)?((cookieArray[cookieCount]=="true")?"url(minus.png)":"url(plus.png)"):"url(plus.png)";
      temp2.onclick=function(){
        showhide(this.parentNode);
        writeCookie();
      }
      temp.getElementsByTagName("li")[o].insertBefore(temp2,temp.getElementsByTagName("li")[o].firstChild)
      temp.getElementsByTagName("li")[o].getElementsByTagName("ul")[0].style.display = "none";
      if(cookieArray[cookieCount]=="true"){
        showhide(temp.getElementsByTagName("li")[o]);
      }
      cookieCount++;
    }
    else{
      temp2 = document.createElement("span");
      temp2.className = "symbols";
      temp2.style.backgroundImage = "url(page.png)";
      temp.getElementsByTagName("li")[o].insertBefore(temp2,temp.getElementsByTagName("li")[o].firstChild);
    }
  }
}

function showhide(el){
  el.getElementsByTagName("ul")[0].style.display=(el.getElementsByTagName("ul")[0].style.display=="block")?"none":"block";
  el.getElementsByTagName("span")[0].style.backgroundImage=(el.getElementsByTagName("ul")[0].style.display=="block")?"url(minus.png)":"url(plus.png)";
}

function writeCookie(){ // Runs through the menu and puts the "states" of each nested list into an array, the array is then joined together and assigned to a cookie.
  cookieArray=new Array()
  for(var q=0;q<temp.getElementsByTagName("li").length;q++){
    if(temp.getElementsByTagName("li")[q].childNodes.length>0){
      if(temp.getElementsByTagName("li")[q].childNodes[0].nodeName=="SPAN" && temp.getElementsByTagName("li")[q].getElementsByTagName("ul").length>0){
        cookieArray[cookieArray.length]=(temp.getElementsByTagName("li")[q].getElementsByTagName("ul")[0].style.display=="block");
      }
    }
  }
  document.cookie="state="+cookieArray.join(",")+";expires="+new Date(new Date().getTime() + 365*24*60*60*1000).toGMTString();
}

function MM_showHide2(num)
{
   var val  = MM_findObj('answer'+num);
   var obj  = MM_findObj('ans'+num);
	

   if(obj != null && val != null)
   {
      if(obj.innerHTML == '')
      {
         obj.innerHTML  = val.innerHTML;
				 obj.style.borderWidth = '1px';
				 obj.style.borderColor = '#ccc';
				 obj.style.borderStyle = 'solid';
      }
      else
      {
         obj.innerHTML  = '';
		 obj.style.padding = '0px';
		 obj.style.marginTop = '0px';
		 obj.style.marginBottom = '0px';
		 obj.style.backgroundColor = '#fff';
		 obj.style.borderWidth = '1px';
		 obj.style.borderColor = '#fff';
		 obj.style.borderStyle = 'solid';
      }
   }
}

function MM_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=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}