<script>
    const usrlang = navigator.language || navigator.userLanguage;

    // ======================================================== //
    // Update the variable here to direct trafic                //
    //const type = 'operational'; 
    const type = 'maintenance'; 
    //const type = 'login'
    //const type = 'outage'
    // ======================================================== //

    // first lets figure out the language flag
    let language = 'en';
	if (usrlang.includes('es')) {
        language = 'es';
    }

    // base path
    let base = '/' + language;

    // then lets figure out which status
    if (type === 'maintenance') {
        window.location.href = base + '/maintenance.html';
    } else if (type === 'login') {
        window.location.href = base + '/login.html';
    } else if (type === 'outage') {
        window.location.href = base + '/outage.html';
    } else {
        window.location.href = base;
    }
</script>