var prevPage = "";
var curPage = "";

if (document.images)
{   	
	nowe_on = new Image();
	nowe_on.src = "./grafika/menu/rejestracja_2b.gif";
	nowe_off = new Image();
	nowe_off.src = "./grafika/menu/rejestracja_2.gif";

	oferta_on = new Image();
	oferta_on.src = "./grafika/menu/co_oferujemy_2b.gif";
	oferta_off = new Image();
	oferta_off.src = "./grafika/menu/co_oferujemy_2.gif";

	kontakt_on = new Image();
	kontakt_on.src = "./grafika/menu/kontakt_2b.gif";
	kontakt_off = new Image();
	kontakt_off.src = "./grafika/menu/kontakt_2.gif";

	prywatnie_on = new Image();
	prywatnie_on.src = "./grafika/pso_2.gif";
	prywatnie_off = new Image();
	prywatnie_off.src = "./grafika/pso.gif";

	agencja_on = new Image();
	agencja_on.src = "./grafika/pat_2.gif";
	agencja_off = new Image();
	agencja_off.src = "./grafika/pat.gif";

	agencjax_on = new Image();
	agencjax_on.src = "./grafika/a_t_male_2.gif";
	agencjax_off = new Image();
	agencjax_off.src = "./grafika/a_t_male.gif";
	
	prywatniex_on = new Image();
	prywatniex_on.src = "./grafika/p_s_male_2.gif";
	prywatniex_off = new Image();
	prywatniex_off.src = "./grafika/p_s_male.gif";

	night_cluby_on = new Image();
	night_cluby_on.src = "./grafika/n_c__male_2.gif";
	night_cluby_off = new Image();
	night_cluby_off.src = "./grafika/n_c__male.gif";
  		
}
function imgOn(itemName)
{
	if (document.images) {
		document[itemName].src = eval(itemName + "_on.src");
	}
}

function imgOff(itemName)
{	
	if (document.images && curPage != itemName) {
		document[itemName].src = eval(itemName + "_off.src");
	}

}
// js form validation stuff
var confirmMsg  = 'Proszę zadecydować';
function confirmLink(theLink, theSqlQuery)
{
    // Confirmation is not required in the configuration file
    // or browser is Opera (crappy js implementation)
    if (confirmMsg == '' || typeof(window.opera) != 'undefined') {
        return true;
    }

    var is_confirmed = confirm(confirmMsg + ' :\n' + theSqlQuery);
    if (is_confirmed) {
        theLink.href += '';
    }

    return is_confirmed;
} // end of the 'confirmLink()' function

function displayWindow(url, width, height)
{
	var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=1,menubar=no,left=0,top=0' );
}
// Funkcja wyswietla chmurki do linkow
function wyswietl(T,t)
{
	T.nextSibling.style.display=t?'block':'none'
}