// JavaScript Document

var langcodes = new Array("de", "es", "pt", "en", "default")
var langredirects = new Array("../sihot/public_html_sihot/deutsch/index_sihot.html", "../sihot/public_html_sihot/espanol/index_sihot_es.html", "../sihot/public_html_sihot/portugues/index_sihot_pt.html", "../sihot/public_html_sihot/english/index_sihot_gb.html", "../sihot/public_html_sihot/english/index_sihot_gb.html")
var languageinfo = navigator.language? navigator.language : navigator.userLanguage
var gotodefault=1

function redirectpage(dest){
	if (window.location.replace)
		window.location.replace(dest)
	else
		window.location = dest
}

for (i = 0; i < langcodes.length - 1; i++){
	if (languageinfo.substr(0,2) == langcodes[i]){
		redirectpage(langredirects[i])
		gotodefault = 0
		break
	}
}

if (gotodefault)
	redirectpage(langredirects[langcodes.length - 1])
