var ie5=false;
var ns6=false;
var ns4=false;

if (document.getElementById && document.all) {ie5=true};
if (document.getElementById && !document.all) {ns6=true};
if (document.layers) {ns4=true};

// Creating a bookmark entry
function addBookmark(name, url, lang) {
    if (ie5) {
        // IE
        window.external.AddFavorite(url, name);
//    } else if (window.sidebar) {
//        // Mozilla & related
//        window.sidebar.addPanel(name, url+'sidebar.html', "");
    } else if ('eng'==lang) {
        alert("This browser is not supported - please use the built in functions!");
    } else {
        alert("Nem támogatott böngésző - Kérjük használja a böngészője megfelelő funkcióját!");
    }
}

// Setting the startpage
function setStartPage(obj, url, lang) {
    if (ie5) {
        obj.style.behavior = 'url(#default#homepage)';
        obj.setHomePage(url);
    } else if ('eng'==lang) {
        alert('Your browser doesnt support automatic configuration please use the built in functions!');
    } else {
        alert('Az automatikus beállítást nem támongatja a böngészője - Kérjük a beállítások között állítása be a '+url+' oldalt kezdőlapként!');
    }
}
