/* -----------------------------------------
Author: Walter Sester
Date  : 27/10/2005
Desc  : Script Fondar.org (www.fondar.org)
------------------------------------------- */


// Language
function Jump_lang(l) {
var url = window.location.pathname;
url = url.replace(/\\/g, "/");
var bL = 0;

var a = url.split('/');

for (i=0;i<a.length;i++)
{
	switch (a[i]) {
	  case 'en': a[i] = l;
	  	     bL=1;
		     break;
	  case 'it': a[i] = l;
		     bL=1;
		     break;
	  case 'de': a[i] = l;
		     bL=1;
		     break;
	}
}

if (bL==0 && l.length>0) {
	s=a[a.length-1];
	s= l + '/' + s;
	a[a.length-1] = s;
}
var nu = a.join('/');
nu = nu.replace(/\/\//g, "/")
if (nu != url) { window.location = nu;}

}

