<!--

window.onerror = null;
var bName = navigator.appName;
var bVer = parseInt(navigator.appVersion);
var NS4 = (bName == "Netscape" && bVer >= 4);
var IE4 = (bName == "Microsoft Internet Explorer" && bVer >= 4);
var NS3 = (bName == "Netscape" && bVer < 4);
var IE3 = (bName == "Microsoft Internet Explorer" && bVer < 4);
var loaded = 0;

if (document.images || IE4){
    flag1on  = new Image(); flag1on.src  = "images/flag_gb_on.gif";
    flag1off = new Image(); flag1off.src = "images/flag_gb_off.gif";
    flag2on  = new Image(); flag2on.src  = "images/flag_de_on.gif";
    flag2off = new Image(); flag2off.src = "images/flag_de_off.gif";
    flag3on  = new Image(); flag3on.src  = "images/flag_fr_on.gif";
    flag3off = new Image(); flag3off.src = "images/flag_fr_off.gif";
    flag4on  = new Image(); flag4on.src  = "images/flag_hu_on.gif";
    flag4off = new Image(); flag4off.src = "images/flag_hu_off.gif";
    loaded = 1;
}

function changeImgs(name, no) {
    if (document.images && (loaded == 1)) {
        document[name].src = eval(name + no + ".src");
    }
    return true
}

function setCookie(name, value, days) {
    var expireDate = new Date();
    //set "expstring" to either future or past date, to set or delete cookie, respectively
    var expstring=(typeof days!="undefined")? expireDate.setDate(expireDate.getDate()+parseInt(days)) : expireDate.setDate(expireDate.getDate()-5)
    document.cookie = name+"="+value+"; expires="+expireDate.toGMTString()+"; path=/";
}

function getCookie(name) {
    var re=new RegExp(name+"=[^;]+", "i");
    if (document.cookie.match(re)) {
        return document.cookie.match(re)[0].split("=")[1];
    } else {
        return "";
    }
}

//-->

