// JavaScript Document
function countriesObj(display_en, display_fr, searchQuerry) {          
this.display_en = display_en;
this.display_fr = display_fr;        
this.searchQuerry = searchQuerry;
this.urlbase = "http://www.unesco-ci.org/cgi-bin/portals/information-society/search.cgi?d=1&information_type=";
}

var infTypes = new Array();
infTypes[0] = new countriesObj ("National Policies","Politiques nationales","National_Policy");
infTypes[1] = new countriesObj ("National Legislations","Législations nationales","National_Legislation");
infTypes[2] = new countriesObj ("National Institutions","Institutions nationales","National_Institution");
infTypes[3] = new countriesObj ("International Guidelines","Directives internationales","International_Guidelines");
infTypes[4] = new countriesObj ("Treaties/Agreements","Traités/Accords","Treaty/Agreement");
infTypes[5] = new countriesObj ("Strategies","Stratégies","Strategy");
infTypes[6] = new countriesObj ("Projects","Projets","Project");
infTypes[7] = new countriesObj ("Initiatives","Initiatives","Initiative");
infTypes[8] = new countriesObj ("Civil Society/NGOs","Société civile/ONG","NGO");
infTypes[9] = new countriesObj ("IGOs","OIG","IGO");
infTypes[10] = new countriesObj ("Private Sector","Secteur privé","Private_Company");
infTypes[11] = new countriesObj ("Associations","Associations","Association");
infTypes[12] = new countriesObj ("Charitable Organizations","Organisations caritatives","Charitable_Organizations");
infTypes[13] = new countriesObj ("University/Research","Universités/Recherche","University/Research_Institution");
infTypes[14] = new countriesObj ("Events","Evénements","Event");
infTypes[15] = new countriesObj ("Tools","Outils","Tool");
infTypes[16] = new countriesObj ("Studies","Etudes","Study");
infTypes[17] = new countriesObj ("Publications","Publications","Publication");
infTypes[18] = new countriesObj ("Portals/Directories","Portails/Catalogues","Portal/Directory");
infTypes[19] = new countriesObj ("Periodicals","Périodiques","Periodical");
infTypes[20] = new countriesObj ("Networks","Réseaux","Network");

function DisplayInfTypes(lang,cols) {
	
	var numTypes = infTypes.length;
	var rowsPerCol = Math.round(numTypes / cols);
	var rowsCounter = 0;
	var urlbase = '';
	
	document.write ("<table class=inftype cellpading=0 cellspacing=0>\n");
	document.write("<tr>");
	for (i=0; i < infTypes.length; i++) {
		
		if (rowsCounter==0) {
		document.write("<td valign=top>");
		}
		
		urlbase = infTypes[i].urlbase + infTypes[i].searchQuerry;
		
		if (lang == "EN") {
		document.write('<div class=inftype><a href=' + urlbase + '>' + infTypes[i].display_en + '</a></div>');
		}
		
		if (lang == "FR") {
		document.write('<div class=inftype><a href=' + urlbase + '>' + infTypes[i].display_fr + '</a></div>');
		}
		
		rowsCounter++;
		
		if (rowsCounter==rowsPerCol) {
		document.write("</td>");
		rowsCounter = 0;
		}
	}
	document.write("<tr>");
	document.write("</table>");
	
}