<!--
browser = (((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 3 )) || ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 )))             

timer = 0;
OriginalMenu = '';
MenuClicked = 0;
busy = 0;
done = 0;
target = '';
full = 0;
x = 0;
y = 0;
alpha = 0;

function getObj(name){
	if (document.getElementById){
    	return document.getElementById(name);
	}
	else if (document.all){
		return document.all[name];
	}
  	else if (document.layers){
    	return document.layers[name];
	}
	else return false;
}

if (browser) {
	OrganisatieOn = new Image();
	OrganisatieOn.msg = "Organisatie";
	OrganisatieOff = new Image();
	OrganisatieOn.src = "images/menu_on_01_en.gif";
	OrganisatieOff.src = "images/menu_01_en.gif";

	AanmeldenOn = new Image();
	AanmeldenOn.msg = "Aanmelden";
	AanmeldenOff = new Image();
	AanmeldenOn.src = "images/menu_on_02_en.gif";
	AanmeldenOff.src = "images/menu_02_en.gif";	

	ProjectenOn = new Image();
	ProjectenOn.msg = "Projecten";
	ProjectenOff = new Image();
	ProjectenOn.src = "images/menu_on_04_en.gif";
	ProjectenOff.src = "images/menu_04_en.gif";
	
	SponsorsOn = new Image();
	SponsorsOn.msg = "Sponsors";
	SponsorsOff = new Image();
	SponsorsOn.src = "images/menu_on_05_en.gif";
	SponsorsOff.src = "images/menu_05_en.gif";
}
			
function img_act(imgName) {
   if (browser) {
      imgOn = eval(imgName + "On.src");
      document [imgName].src = imgOn;
      msg = eval(imgName + "On.msg");
      window.status = msg;
   }
}

function img_inact(imgName) {
   if (browser) {
	  imgOff = eval(imgName + "Off.src");
	  document [imgName].src = imgOff;
	  window.status = "";   
   }
}

function showmenu(target,name) {
	msgstring = '';
	gox = 0;
	goy = 0;
	
	if (name == "Organisatie"){
		msgstring = "<A HREF=\"organisatie_over.php\" STYLE=\"text-decoration: none; font: bold 13px\">About WoS</A><BR><A HREF=\"organisatie_medewerkers.php\" STYLE=\"text-decoration: none; font: bold 13px\">Employees</A><BR><A HREF=\"organisatie_contact.php\" STYLE=\"text-decoration: none; font: bold 13px\">Contact&nbsp;us</A><BR><A HREF=\"organisatie_organogram.php\" STYLE=\"text-decoration: none; font: bold 13px\">Organization&nbsp;chart</A>";
		gox = 0;
		goy = 0;
	}
	else if (name == "Aanmelden"){
		msgstring = "<A HREF=\"aanmelden_donateur.php\" STYLE=\"text-decoration: none; font: bold 13px\">Support&nbsp;us</A><BR><A HREF=\"aanmelden_gift.php\" STYLE=\"text-decoration: none; font: bold 13px\">Single&nbsp;donation</A><BR><A HREF=\"aanmelden_vrijwilliger.php\" STYLE=\"text-decoration: none; font: bold 13px\">Volunteer</A><BR><A HREF=\"aanmelden_bedrijf.php\" STYLE=\"text-decoration: none; font: bold 13px\">Corporate</A><BR><A HREF=\"nieuwsbrief.php\" STYLE=\"text-decoration: none; font: bold 13px\">Stay informed</A>";
		gox = 0;
		goy = 32;
	}
	else if (name == "Projecten"){
		msgstring = "<A HREF=\"projecten_overzicht.php\" STYLE=\"text-decoration: none; font: bold 13px\">Geographical&nbsp;overview</A><BR><A HREF=\"projecten_criteria.php\" STYLE=\"text-decoration: none; font: bold 13px\">Criteria</A><BR><A HREF=\"projecten_aandragen.php\" STYLE=\"text-decoration: none; font: bold 13px\">Submit</A>";
		gox = 0;
		goy = 64;
	}
	else if (name == "Sponsors"){
		msgstring = "<A HREF=\"sponsors_overzicht.php\" STYLE=\"text-decoration: none; font: bold 13px\">Overview</A><BR><A HREF=\"sponsors_aanmelden.php\" STYLE=\"text-decoration: none; font: bold 13px\">Apply</A>";
		gox = 0;
		goy = 96;
	}
	else {
		msgstring = "This text has been added to your browser by devine intervention 0:)";
	}

	if (busy != 1){	
		if (OriginalMenu == name && MenuClicked == 0){
			busy = 1;
			visibility("MenuHover",1);
			MoveMenu('MenuHover',gox,goy);
			MenuFader('MenuHover','on');
			MenuClicked = 1;
			UpdateContent('MenuContent',msgstring);
			done = 0;
		}
		else if (OriginalMenu == name && MenuClicked == 1){
			busy = 1;
			visibility("MenuHover",'1');
			MoveMenu('MenuHover',gox,goy);
			MenuFader('MenuHover','off');
			MenuClicked = 0;
			UpdateContent('MenuContent',msgstring);
			done = 0;
		}
		else if (OriginalMenu != name && MenuClicked == 0) {
			busy = 1;
			visibility("MenuHover",'1');
			MoveMenu('MenuHover',gox,goy);
			UpdateContent('MenuContent',msgstring);
			MenuFader('MenuHover','on');
			MenuClicked = 1;
			done = 0;
		}
		else if (OriginalMenu != name && MenuClicked == 1) {
			if (alpha == 1){
				busy = 1;
				visibility("MenuHover",'1');
				MenuFader("MenuHover",'off');
				MenuClicked = 0;
				CrossFader("MenuHover",gox,goy,msgstring);
				MenuClicked = 1;
				done = 0;
			}
			else {
				busy = 1;
				visibility("MenuHover",'0');
				MoveMenu("MenuHover",gox,goy);
				UpdateContent('MenuContent',msgstring);
				MenuClicked = 0;
				visibility("MenuHover",'1');
				MenuClicked = 1;
				done = 0;
				busy = 0;
			}
		}
		OriginalMenu = name;
	}
}

function CrossFader(A1,B1,C1,D1) {
	busy = 1;
	A = A1;
	B = B1;
	C = C1;
	D = D1;
    if (done == 1) {
		MoveMenu(A,B,C);
		UpdateContent('MenuContent',D);
		MenuFader(A,'on');
		done = 0;
    } 
	else {
		setTimeout('CrossFader(A,B,C,D)', 250);
    }
}

function MenuFader(target,status){
	step = 10;
	speed = 25;
	if (status == "on"){
		if (alpha == 1){
			visibility("MenuHover",'1');
			SetOpacity('MenuHover',full);
			if (full < 100){
				timer = setTimeout("MenuFader('MenuHover','on')", speed);
				full = full + step;
			}
			else {
				full = 100;
				busy = 0;
				clearTimeout(timer);
			}
		}
		else {
			SetOpacity('MenuHover','100');
			full = 100;
			busy = 0;
		}
	}
	if (status == "off"){
		if (alpha == 1){
			SetOpacity('MenuHover',full);
			if (full > 0){
				timer = setTimeout("MenuFader('MenuHover','off')", speed);
				full = full - step;
			}
			else {
				full = 0;
				busy = 0;
				clearTimeout(timer);
				done = 1;
				visibility("MenuHover",'0');
			}
		}
		else {
			full = 0;
			busy = 0;
			done = 1;
			visibility("MenuHover",'0');
		}
	}
}

function UpdateContent(target,msgstring) {
	var theContent = getObj(target);
	theContent.innerHTML = msgstring;
}

function MoveMenu(target,x,y) {
	MenuX = 157;
	MenuY = 0;
	var block = getObj(target);

	block.style.xpos = MenuX + x;
	block.style.ypos = MenuY + y;
	block.style.left = block.style.xpos;
	block.style.top = block.style.ypos;
}

function visibility(target,show) {
	if (show == 0){
	var theLayer = getObj(target);
		theLayer.style.visibility = 'hidden';
	}
	else {
	var theLayer = getObj(target);
		theLayer.style.visibility = 'visible';
	}
}

function SetOpacity(target,opac) {
	if(document.all){
		//thisbrowser="ie"
		contentlayer = document.all[target];
		contentlayer.filters.alpha.opacity = opac; 
	}
	if(document.layers){
		 //thisbrowser="NN4";
		contentlayer = document.layers[target];
		contentlayer.style.MozOpacity = opac+"%"; 
	}
	if(!document.all && document.getElementById){
		//thisbrowser="NN6";
		contentlayer = document.getElementById(target);
		contentlayer.style.MozOpacity = opac+"%";  
    }
}
// -->