// JavaScript
//site_root = '/wacap/';

//site_root='/wacap_php/';

site_root='/';

function onOver(src,clrOver) {

 if (src) 
 {

  src.style.cursor = 'hand';

  src.bgColor = clrOver;


	}


  }


function onOut(src,clrIn) {

	if (src) 
	{

     src.style.cursor = 'default';

     src.bgColor = clrIn;

	}


  }


function LoadPage(page)
{
window.open(page, "Download", "left=200, top=200, width=300, height=300");
};


function link(pname, plink){this.name=pname;this.link=plink;}

function set_flags(src, flag_list){
document.writeln('<table width="100" align="center" border="0" cellpadding="1">');
document.writeln('<tr>');
for(var i=1;i<arguments.length;i++){
if(src!='en'&&arguments[i]=='en'){
document.write('<td><div align="center">');
document.write('<a href="javascript:set_language(\''+src+'\',\'en\')">');
document.write('<img src="'+this.path+'images/uk_flag_thumb.jpg" width="32" height="21" border="0" alt="English">');
document.writeln('</a></div></td>');
}
if(src!='fr'&&arguments[i]=='fr'){
document.write('<td><div align="center">');
document.write('<a href="javascript:set_language(\''+src+'\',\'fr\')">');
document.write('<img src="'+this.path+'images/fr_flag_thumb.jpg" width="34" height="22" border="0" alt="Fran&ccedil;ais">');
document.writeln('</a></div></td>');
}
if(src!='es'&&arguments[i]=='es'){
document.write('<td><div align="center">');
document.write('<a href="javascript:set_language(\''+src+'\',\'es\')">');
document.write('<img src="'+this.path+'images/es_flag_thumb.jpg" width="32" height="22" border="0" alt="Espa&ntilde;ol">');
document.writeln('</a></div></td>');
}
if(src!='it'&&arguments[i]=='it'){
document.write('<td><div align="center">');
document.write('<a href="javascript:set_language(\''+src+'\',\'it\')">');
document.write('<img src="'+this.path+'images/it_flag_thumb.jpg" width="34" height="22" border="0"  alt="Italiano">');
document.writeln('</a></div></td>');
}
}

document.writeln('</tr></table>');
}

function display_menu(){
str= new String(window.location.pathname);
linkname=str.substr(str.lastIndexOf("\\")+1);

document.writeln('<table width="200" cellpadding="5" cellspacing="5">');
for(i=0;i<this.menu.length;i++){

  if(linkname!=this.menu[i].link)
    if(this.menu[i].link.indexOf("mailto:")<0)/*BGCOLOR was 6699CC*/
	  if(this.menu[i].link.indexOf("download")<0)/*BGCOLOR was 6699CC*/
      document.writeln('<TR><TD WIDTH="225" HEIGHT="20" BGCOLOR="#006BB6" CLASS="normalazul" ONMOUSEOUT="onOut(this,\'#006BB6\'); "'+
	  'ONMOUSEOVER="onOver(this,\'#FEBE10\');"> <a CLASS="normalazul" href="'+this.path+this.language+'/'+this.menu[i].link+'">'+
	  this.menu[i].name+'</a></TD></TR>');
	  else
      document.writeln('<TR><TD WIDTH="225" HEIGHT="20" BGCOLOR="#006BB6" CLASS="normalazul" ONMOUSEOUT="onOut(this,\'#006BB6\'); "'+
	  'ONMOUSEOVER="onOver(this,\'#FEBE10\');"> <a CLASS="normalazul" href="'+this.path+this.menu[i].link+'">'+this.menu[i].name+'</a></TD></TR>');
    else /*BGCOLOR was 6699CC*/
      document.writeln('<TR><TD WIDTH="225" HEIGHT="20" BGCOLOR="#006BB6" CLASS="normalazul" ONMOUSEOUT="onOut(this,\'#006BB6\'); "'+
	  'ONMOUSEOVER="onOver(this,\'#FEBE10\');"> <a CLASS="normalazul" href="'+this.menu[i].link+'">'+this.menu[i].name+'</a>');
}
document.writeln('</table>');
return;
}

function set_language(src, dest){
temp=new String(window.location);
temp2=temp.replace('/'+src+'/','/'+dest+'/');
temp3=temp2.replace('lang='+src,'lang='+dest);
window.location=temp3;
}


function init_menu_en(){
this.language='en';
this.display_menu = display_menu;
this.set_flags = set_flags;
this.menu = new Array();
this.path = site_root;

this.menu[0]=new link('Home','../index.php');
this.menu[1]=new link('Forum Rotterdam','forum_rotterdam');
this.menu[2]=new link('Appeal of the cities','index.php');
this.menu[3]=new link('What is WACAP?','introduction.php');
this.menu[4]=new link('Wacap Actions','actions.php');
this.menu[5]=new link('17 October','17october/index.php');
this.menu[6]=new link('Members','members/index.php');
this.menu[7]=new link('Joining WACAP','join.php');
this.menu[8]=new link('City experiences','experiences.php');
this.menu[9]=new link('Previous Forums','forums/index.php');
this.menu[10]=new link('Links','links.php');
this.menu[11]=new link('Contact us','mailto:mohand.cherifi@undp.org');
this.menu[12]=new link('Brochure','download/pdf/brochure/brochure_en.pdf');
this.display_menu();
}


function init_menu_fr(){
this.language='fr';
this.display_menu = display_menu;
this.set_flags = set_flags;
this.menu = new Array();
this.path = site_root;

this.menu[0]=new link("Page d'accueil",'../index_fr.php');
this.menu[1]=new link('Forum Rotterdam','forum_rotterdam');
this.menu[2]=new link('Appel des villes','index.php');
this.menu[3]=new link("A Propos de l'Alliance",'introduction.php');
this.menu[4]=new link('Actions de l\'Alliance','actions.php');
this.menu[5]=new link('17 Octobre','17october/index.php');
this.menu[6]=new link('Membres','members/index.php');
this.menu[7]=new link('Se joindre &agrave; nous','join.php');
this.menu[8]=new link('Exp&eacute;riences des villes','experiences.php');
this.menu[9]=new link('Forums Pr&eacute;c&eacute;dents','forums/index.php');
this.menu[10]=new link('Liens','links.php');
this.menu[11]=new link('Contactez-nous','mailto:mohand.cherifi@undp.org');
this.menu[12]=new link('Brochure','download/pdf/brochure/brochure_fr.pdf');

this.display_menu();
}

function init_menu_es(){
this.language='es';
this.display_menu = display_menu;
this.set_flags = set_flags;
this.menu = new Array();
this.path = site_root;

this.menu[0]=new link("Inicio",'index.php');
this.menu[1]=new link('Forum Rotterdam','forum_rotterdam');
this.menu[2]=new link('Llamado a las Ciudades','index.php');
this.menu[3]=new link('&iquest;Qu&eacute; es el WACAP?','introduction.php');
this.menu[4]=new link("Actividad",'actions.php');
this.menu[5]=new link('17 Octubre','17october/index.php');
this.menu[6]=new link('Miembros','members/index.php');
this.menu[7]=new link("&iquest;Unirse a la Alianza?",'join.php');
this.menu[8]=new link('Experiencias','experiences.php');
this.menu[9]=new link('Foros Anteriores','forums/index.php');
this.menu[10]=new link("Enlaces", 'links.php');
this.menu[11]=new link('Contacto','mailto:mohand.cherifi@undp.org');
this.menu[12]=new link("Folleto",'download/pdf/brochure/brochure_es.pdf');

this.display_menu();
}

function init_menu_it(){
this.language='it';
this.display_menu = display_menu;
this.set_flags = set_flags;
this.menu = new Array();
this.path = site_root;

this.menu[0]=new link("Pagina Principale",'../index.php');
this.menu[1]=new link("Forum di Roma",'forum_rome/index.php');
this.menu[2]=new link("Attivita",'actions.php');
this.menu[3]=new link("Iscrirsi a l'Alleanza?",'join.php');
this.menu[4]=new link("Brossura",'download/pdf/brochure/brochure_it.pdf');
this.display_menu();
}
