
//the html contents to display
var menuContent=new Array();	// notice need to init array or won't work

menuContent["enzymes"]="<div id='notebox'>Microfluidics and enzyme characterisation</div>";
menuContent["mitochondria"]="<div id='notebox'>Organelle Analysis</div>";
menuContent["biochips"]="<div id='notebox'>Development of protein biochips</div>";

menuContent["test"]="<p class='notes'>hum de dum</p>";



function alterContent(frameid,elementid,content){

   //if IE 4+ or konqueror
   if (document.all){
   	// innerHTML: complete content, incl HTML (excl element itself, that is <div>
	//elementid = eval(elementid);	// need this cos onmouseover calls this function with
					// elementid in "" (which is the way NS4 likes it)
					// however, it's not how IE likes it
      //elementid.innerHTML=content;

	parent.frames[frameid].document.all[elementid].innerHTML=menuContent[content];
	//top.getElementbyID(elementid).innerHTML=menuContent[content];
   }

   //else if NS 4
   else if (document.layers){	// actually NS4 can handle <div> tags if absolutely positioned
   				// but  browser prefers <layer> tags over <div>
	//document.elementidOuter.document.elementidInner.document.write(content);
	//document.elementidOuter.document.elementidInner.document.close();
	parent.frames[frameid].document.layers[elementid].document.write(menuContent[content]);
	parent.frames[frameid].document.layers[elementid].document.close();
   }

   //else if NS 6 (supports new DOM)
   else if (document.getElementById){
	rng = document.createRange();
	//el = document.getElementById(elementid);
	el = parent.getElementById(elementid);
	rng.setStartBefore(el);
	htmlFrag = rng.createContextualFragment(content);
	while (el.hasChildNodes())
		el.removeChild(el.lastChild);	// remove contents of the specified element
		el.appendChild(htmlFrag);	// and replace with new content
   }

}

function clearContent(frameid,elementid) {
   if (document.all) {
	parent.frames[frameid].document.all[elementid].innerHTML = "";   }	
   else if (document.layers) {
 	parent.frames[frameid].document.layers[elementid].document.write("");
	parent.frames[frameid].document.layers[elementid].document.close();
   }
   else if (document.getElementById){
	rng = document.createRange();
	//el = document.getElementById(elementid);
	el = parent.getElementById(elementid);
	rng.setStartBefore(el);
	htmlFrag = rng.createContextualFragment("");
	while (el.hasChildNodes())
		el.removeChild(el.lastChild);	// remove contents of the specified element
		el.appendChild(htmlFrag);	// and replace with new content
   }

}


