// == functie voor overview rollovers =================

function ON(num) {
	document.getElementById("table_bg_" + num).style.background='url(media/images/overview_bg_on.gif)';
};

function ON2(num) {
	document.getElementById("table_bg_" + num).style.background='url(media/images/overview_bg_on2.gif)';
};

function OFF(num) {
	document.getElementById("table_bg_" + num).style.background='url(media/images/nix.gif)';
};


// == roll over + preload ===============================

var flag = false;

function imageLoad() {  // called with onLoad()
    if (document.images) {
        img1on = new Image(); img1on.src = "media/images/qua_nav_news_on.gif";
        img2on = new Image(); img2on.src = "media/images/qua_nav_port_on.gif";
        img3on = new Image(); img3on.src = "media/images/qua_nav_studio_on.gif";
        img5on = new Image(); img5on.src = "media/images/qua_nav_tours_on.gif";
        img4on = new Image(); img4on.src = "media/images/qua_nav_contacts2_on.gif";

	sub1on = new Image(); sub1on.src = "media/images/qua_subnav_about_on.gif";
	sub2on = new Image(); sub2on.src = "media/images/qua_subnav_vision_on.gif";
	sub3on = new Image(); sub3on.src = "media/images/qua_subnav_method_on.gif";
	sub4on = new Image(); sub4on.src = "media/images/qua_subnav_people_on.gif";
	sub5on = new Image(); sub5on.src = "media/images/qua_subnav_office_on.gif";
	sub6on = new Image(); sub6on.src = "media/images/qua_subnav_network_on.gif";
	sub7on = new Image(); sub7on.src = "media/images/qua_subnav_vacancies_on.gif";

	sub8on = new Image(); sub8on.src = "media/images/qua_subnav_portf_bydate_on.gif";
	sub9on = new Image(); sub9on.src = "media/images/qua_subnav_portf_byclient_on.gif";
	sub10on = new Image(); sub10on.src = "media/images/qua_subnav_portf_bycategory_on.gif";

	sub11on = new Image(); sub11on.src = "media/images/qua_subnav_contact_general_on.gif";
	sub12on = new Image(); sub12on.src = "media/images/qua_subnav_contact_quabook_on.gif";

        return (flag = true);  // set the flag and let the function know know it can work
    }
}

if (document.images) {   // load the off images in the normal way
    img1off = new Image(); img1off.src = "media/images/qua_nav_news_off.gif";
    img2off = new Image(); img2off.src = "media/images/qua_nav_port_off.gif";
    img3off = new Image(); img3off.src = "media/images/qua_nav_studio_off.gif";
    img5off = new Image(); img5off.src = "media/images/qua_nav_tours_off.gif";
    img4off = new Image(); img4off.src = "media/images/qua_nav_contacts2_off.gif";

    sub1off = new Image(); sub1off.src = "media/images/qua_subnav_about_off.gif";
    sub2off = new Image(); sub2off.src = "media/images/qua_subnav_vision_off.gif";
    sub3off = new Image(); sub3off.src = "media/images/qua_subnav_method_off.gif";
    sub4off = new Image(); sub4off.src = "media/images/qua_subnav_people_off.gif";
    sub5off = new Image(); sub5off.src = "media/images/qua_subnav_office_off.gif";
    sub6off = new Image(); sub6off.src = "media/images/qua_subnav_network_off.gif";
    sub7off = new Image(); sub7off.src = "media/images/qua_subnav_vacancies_off.gif";

    sub8off = new Image(); sub8off.src = "media/images/qua_subnav_portf_bydate_off.gif";
    sub9off = new Image(); sub9off.src = "media/images/qua_subnav_portf_byclient_off.gif";
    sub10off = new Image(); sub10off.src = "media/images/qua_subnav_portf_bycategory_off.gif";

    sub11off = new Image(); sub11off.src = "media/images/qua_subnav_contact_general_off.gif";
    sub12off = new Image(); sub12off.src = "media/images/qua_subnav_contact_quabook_off.gif";
}


function rollIn(imgName) {
    if (document.images && (flag == true)) {
        document[imgName].src = eval(imgName + "on.src");
    }
}

function rollOut(imgName) {  // the normal onMouseOut function
    if (document.images){
        document[imgName].src = eval(imgName + "off.src");
    }
}
