// when dom is ready
Event.observe(document, "dom:loaded", function() {

    // setup locale change handler
    var localeChanger = $('localeChanger');
    if (localeChanger) {
        var change = function() {
            localeChanger.form.submit();
        }
        localeChanger.observe('change', change);
        if (navigator.userAgent.indexOf('MSIE') != -1) {
            var options = localeChanger.options;
            for (var i = 0; i < options.length; i++) options[i].onclick = change;
        }
    }
    
});
// when whole page is loaded
// not needed for now
//Event.observe(window, 'load', function(){
//
//});
