// JavaScript Document
div_content = document.getElementById('d_content');

flag_fr = document.getElementById('f_fr');
flag_gb = document.getElementById('f_gb');
flag_de = document.getElementById('f_de');
flag_es = document.getElementById('f_es');
flag_be = document.getElementById('f_be');
flag_nl = document.getElementById('f_nl');
flag_it = document.getElementById('f_it');
//flag_ch = document.getElementById('f_ch');
flag_ie = document.getElementById('f_ie');
flag_pt = document.getElementById('f_pt');
flag_scandinavia = document.getElementById('f_scandinavia');
//flag_world = document.getElementById('f_world');

country_fr = document.getElementById('c_fr');
country_gb = document.getElementById('c_gb');
country_de = document.getElementById('c_de');
country_es = document.getElementById('c_es');
country_be = document.getElementById('c_be');
country_nl = document.getElementById('c_nl');
country_it = document.getElementById('c_it');
//country_ch = document.getElementById('c_ch');
country_ie = document.getElementById('c_ie');
country_pt = document.getElementById('c_pt');
country_scandinavia = document.getElementById('c_scandinavia');
//country_world = document.getElementById('c_world');

popup_be = document.getElementById('p_be');
popup_gb = document.getElementById('p_gb');
popup_fr = document.getElementById('p_fr');

var onContent = false;
var contentTimeout;

function resetPage() {
    country_fr.style.visibility = "hidden";
    country_gb.style.visibility = "hidden";
    country_de.style.visibility = "hidden";
    country_es.style.visibility = "hidden";
    country_be.style.visibility = "hidden";
    country_nl.style.visibility = "hidden";
    country_it.style.visibility = "hidden";
    //country_ch.style.visibility = "hidden";
    country_ie.style.visibility = "hidden";
    country_pt.style.visibility = "hidden";
    country_scandinavia.style.visibility = "hidden";
    //country_world.style.visibility = "hidden";

    popup_be.style.visibility = "hidden";
    popup_gb.style.visibility = "hidden";
    popup_fr.style.visibility = "hidden";
}

function checkOnContent() {
    if (!onContent) {
        resetPage();
    }
}

div_content.onmouseover = function() {
    onContent = true;
}
div_content.onmouseout = function() {
    onContent = false;
    contentTimeout = setTimeout("checkOnContent()", 2000);
}
flag_fr.onmouseover = function() {
    resetPage();
    country_fr.style.visibility = "visible";
    popup_fr.style.visibility = "visible";
}
flag_gb.onmouseover = function() {
    resetPage();
    country_gb.style.visibility = "visible";
    popup_gb.style.visibility = "visible";
}
flag_de.onmouseover = function() {
    resetPage();
    country_de.style.visibility = "visible";
}
flag_es.onmouseover = function() {
    resetPage();
    country_es.style.visibility = "visible";
}
flag_be.onmouseover = function() {
    resetPage();
    country_be.style.visibility = "visible";
    popup_be.style.visibility = "visible";
}
flag_nl.onmouseover = function() {
    resetPage();
    country_nl.style.visibility = "visible";
}
flag_it.onmouseover = function() {
    resetPage();
    country_it.style.visibility = "visible";
}
//flag_ch.onmouseover = function() 
//{
//	resetPage();
//	country_ch.style.visibility = "visible";
//}

flag_pt.onmouseover = function() {
    resetPage();
    country_pt.style.visibility = "visible";
}
flag_scandinavia.onmouseover = function() {
    resetPage();
    country_scandinavia.style.visibility = "visible";
}
//flag_world.onmouseover = function() 
//{
//	resetPage();
//	country_world.style.visibility = "visible";
//}
