startList = function() {

if (document.all&&document.getElementById) {

navRoot = document.getElementById("main_menu");

for (i=0; i<navRoot.childNodes.length; i++) {

node = navRoot.childNodes[i];

if (node.nodeName=="LI") {

node.onmouseover=function() {

this.className+=" over";

  }

  node.onmouseout=function() {

  this.className=this.className.replace("over", "");

   }

   }

  }

 }

}

window.onload=startList;



var flag=new Array();

var firstime=new Array();

flag[0]=null;

flag[1]=null;

firstime[0]=null;

firstime[1]=null;

function appearnow(theid,number,linkid){

	document.getElementById(linkid).style.color='white';

	document.getElementById(theid).style.display='block';

		if (firstime[number] != 1) {

			document.getElementById(theid).style.opacity='0';

			document.getElementById(theid).style.filter='alpha(opacity=0)';

			new Effect.Opacity(theid,{duration:.5, from:0.0, to:1.0});

			firstime[number]=1;

			}

		flag[number]=1;

	}



function disappearnow(the_id,number,linkid){

	flag[number]=0;

	setTimeout("goaway('"+the_id+"','"+number+"','"+linkid+"')",100);

	}



	function goaway(thisid,mynumber,mylinkid){

	if (flag[mynumber]==0){

	document.getElementById(mylinkid).style.color='black';

	document.getElementById(thisid).style.display='none';

	firstime[mynumber]=0;

	}

	}

function closeIt(thepic) {

	document.getElementById(thepic).style.display='none';

	new Effect.Opacity('hidebackground',{duration:0.1, from:0.5, to:0});$('hidebackground').style.display='none';

	}

function enlargeIt(thepic,height) {

	$('hidebackground').style.display='block';new Effect.Opacity('hidebackground',{duration:0.5, from:0.0, to:0.7});$('hidebackground').style.height=height;

	new Draggable(thepic);document.getElementById(thepic).style.display='block';

	

}


