document.onclick = function( e ) {
	e = e || window.event;

	targetElement = e.target || e.srcElement;

	if (targetElement.nodeType == 3) {
		targetElement = targetElement.parentNode;
	}

	if (targetElement.nodeName == "A" && targetElement.className == "wmaplink") {
		var contentId = targetElement.id.replace( /[^\d]/g, "" );
		var wmap_links = document.getElementById( "wmapmain" ).getElementsByTagName( "A" );

		for (var i = 0, c = wmap_links.length; i < c; i++) {
			if (wmap_links[i].id == targetElement.id) {
				wmap_links[i].className = "wmaplink-active";
				document.getElementById( "wmap" ).innerHTML = textContent[contentId];
			} else {
				wmap_links[i].className = "wmaplink";
			}
		}
	}
}

var textContent = Array();

// Italy
textContent[0] = "<p>Imola Informatica Spa, Imola </p><p class=\"web\">Web: <a href=\"http://www.imolinfo.it\">www.imolinfo.it</a></p><p>SERVIN, Ravenna </p><p class=\"web\">Web: <a href=\"http://www.servin -c.it\">www.servin -c.it</a></p><p>PR Software </p><p class=\"web\">Web: <a href=\"http://www.prsoftware.it\">http://www.prsoftware.it</a></p><p>Joint Research Centre of the European Community, Ispra </p><p class=\"web\">Web: <a href=\"http://alba.jrc.it/main.html\">http://alba.jrc.it/main.html</a> </p>			    <p>CNR - Centro Nazionale delle Ricerche, 'Gino Bozza', Milano </p><p class=\"web\">Web: <a href=\"http://www.cnr.it/istituti\">http://www.cnr.it/istituti</a></p><p>Open University &lsquo;Guglielmo Marconi&rsquo;, Roma </p><p class=\"web\">Web: <a href=\"http://www.unimarconi.it\">www.unimarconi.it </a></p><p>ENEA, Italian National Agency for New Technologies, Energy and Environment, Roma  </p><p class=\"web\">Web: <a href=\"http://www.enea.it\">www.enea.it</a></p>";

// France
textContent[1] = "<p>Universite de Versailles - C3ED </p><p class=\"web\">Web: <a href=\"http://www.c3ed.uvsq.fr\">http://www.c3ed.uvsq.fr</a></p><p>Nodal Consultants, Paris </p><p class=\"web\">Web: <a href=\"http://www.nodal.fr\">www.nodal.fr</a></p>";

// Norway
textContent[2] = "<p>IFE - Institute for Energy Technology, Norway </p><p class=\"web\">Web: <a href=\"http://www.ife.no/\">www.ife.no</a></p><p>Scanastra Ltd. A/S </p>";

// germany
textContent[3] = "<p>Imola Informatica Spa, Imola </p><p class=\"web\">Web: <a href=\"http://www.imolinfo.it\">www.imolinfo.it</a> </p><p>Deutsche Gesellschaft f&uuml;r Luft und Raumfahrt, K&ouml;ln </p><p class=\"web\">Web: <a href=\"http://www.dlr.de\">www.dlr.de </a></p><p>Fraunhofer Institut Physikalische Me&szlig;technik, Freiburg </p><p class=\"web\">Web: <a href=\"http://www.ipm.fraunhofer.de\">http://www.ipm.fraunhofer.de</a><br></p><p >Fraunhofer Institute for Factory Operation and Automation (IFF) </p><p class=\"web\">Web: <a href=\"http://www.iff.fraunhofer .de\">www.iff.fraunhofer .de</a></p><p >Keramik Institut GmbH, Meissen</p><p class=\"web\"> Web: <a href=\"http://www.keramikinstitut.de\">www.keramikinstitut.de</a> </p><p>RDS - Robotron Datenbank Software, Dresden </p><p class=\"web\">Web: <a href=\"http://www.robotron.de\">www.robotron.de</a> </p><p>Hydroisotop GmbH, Schweitenkirchen</p><p class=\"web\"> Web: <a href=\"http://www.hydroisotop.de\">www.hydroisotop.de</a> </p><p>ETR - Elektronik Technologie Rump GmbH, Dortmund</p><p class=\"web\"> Web: <a href=\"http://www.etr-gmbh.de\">www.etr-gmbh.de</a></p>";

// greece
textContent[4] = "<p>\"Europe of Cultures Forum: Adriatic-Ionian Chapter\" (EOCF-AI )</p><p class=\"web\">Web: <a href=\"http://www.eocf-ai.org\">www.eocf-ai.org</a></p>";

//ireland
textContent[5] = "<p>Eastern Health Board – Dublin <br></p><br><p>Moher Technologies Ltd </p>";

// portugal
textContent[6] = "<p>ISTEL, Istituto do Sono Cronobiologia e Telemedicina, Lisboa</p><br><p>INOVA+ Servicos de Consultadoria em Inovacao Tecnologica , SA </p><p class=\"web\">Web: <a href=\"http://www.inovamais.pt\">www.inovamais.pt</a></p>";

//Luxembourg
textContent[7] = "<p>EDGE Sa</p><br><p>PROMIS@Service Sarl </p>";

// uk
textContent[8] = "<p>University of Dundee,  Department of Education, Scotland </p><p class=\"web\">Web: <u><a href=\"http://www.dundee.ac.uk/\">http://www.dundee.ac.uk</a></u></p><p>Open University, Milton Keynes </p><p class=\"web\">Web: <u><a href=\"http://www.open.ac.uk/\">www.open.ac.uk</a></u></p><p>Cranfield Univ. Int. Ecotechnology Res. Center </p><p class=\"web\">Web: <u><a href=\"http://www.cranfield.ac.uk/\">http://www.cranfield.ac.uk</a></u><br></p>";

// israel
textContent[9] = "<p>Israel Antiquities Authorities,</p> <p class=\"web\">Web: <a href=\"http://www.antiquities.org.il\">www.antiquities.org.il</a></p><p>Weizman Institute of Science, Rehovot</p> <p class=\"web\">Web: <a href=\"http://www.weizmann.ac.il\">www.weizmann.ac.il</a></p>";

//Canada
textContent[10] = "<p>Service@FUTUREtec Ltd.</p> <p class=\"web\">Web: <a href=\"http://www.serviceatfuturetec.com\">www.serviceatfuturetec.com</a></p>";

// usa
textContent[11] = "<p>University of Hawaij</p> <p class=\"web\">Web: <a href=\"http://www.hawaii.edu/\">http://www.hawaii.edu/</a></p>";

// china
textContent[12] = "<p>ChinaClick2</p> <p class=\"web\">Web: <a href=\"http://www.51prc.com\">http://www.51prc.com</a></p>";

// australia
textContent[13] = "<p>CSIRO, Manufacturing & Infrastructure Technology, Operation of Urban Water Systems, Victoria</p> <p class=\"web\">Web: <a href=\"http://www.cmit.csiro.au\">http://www.cmit.csiro.au</a></p>";
