/**
 * @author hugneg
 */
document.write('<form name="langu" method="post" action="">')
var sPath = window.location.href;
var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);
var sLang = sPath.substring(sPath.lastIndexOf('/') - 2);


document.write('<select name="Language"  class="langswitch" onChange="changelang(this.options[this.selectedIndex].value)"; return true;></form>')

if (sLang == ('en/' + sPage))
{
	document.write('<option  value="../en/');
	document.write(sPage);
	document.write('" selected>English (en)<\/option>');

}
else
{
	document.write('<option  value="../en/');
	document.write(sPage);
	document.write('">English (en)<\/option>');	
}
							
if (sLang == ('de/' + sPage))
{
	document.write('<option  value="../en/');
	document.write(sPage);
	document.write('" selected>Deutsch (de)<\/option>');

}
else
{
	document.write('<option  value="../de/');
	document.write(sPage);
	document.write('">Deutsch (de)<\/option>');	
}
if (sLang == ('bg/' + sPage))
{
	document.write('<option  value="../bg/');
	document.write(sPage);
	document.write('" selected>български (bg)<\/option>');

}
else
{
	document.write('<option  value="../bg/');
	document.write(sPage);
	document.write('">български (bg)<\/option>');	
}
								
if (sLang == ('nl/' + sPage))
{
	document.write('<option  value="../nl/');
	document.write(sPage);
	document.write('" selected>Nederlands (nl)<\/option>');

}
else
{
	document.write('<option  value="../nl/');
	document.write(sPage);
	document.write('">Nederlands (nl)<\/option>');	
}
if (sLang == ('el/' + sPage))
{
	document.write('<option  value="../el/');
	document.write(sPage);
	document.write('" selected>ελληνικά (el)<\/option>');

}
else
{
	document.write('<option  value="../el/');
	document.write(sPage);
	document.write('">ελληνικά (el)<\/option>');	
}					
if (sLang == ('it/' + sPage))
{
	document.write('<option  value="../it/');
	document.write(sPage);
	document.write('" selected>italiano (it)<\/option>');

}
else
{
	document.write('<option  value="../it/');
	document.write(sPage);
	document.write('">italiano (it)<\/option>');	
}

if (sLang == ('sl/' + sPage))
{
	document.write('<option  value="../sl/');
	document.write(sPage);
	document.write('" selected>slovenščina (sl)<\/option>');

}
else
{
	document.write('<option  value="../sl/');
	document.write(sPage);
	document.write('">slovenščina (sl)<\/option>');	
}							
document.write('<\/select>');	


function changelang(item) {
	
if (item)
{
	window.location.href = item;
}

else
{
	
}
	

}  

