//menuhead

   /***********************************************
   * Switch Menu script- by Martial B of http://getElementById.com/
   * Modified by Dynamic Drive for format & NS4/IE4 compatibility
   * Visit http://www.dynamicdrive.com/ for full source code
   ***********************************************/

  // if (document.getElementById){ //DynamicDrive.com change
  // document.write('<style type="text/css">\n')
  // document.write('.submenu{display: none;}\n')
  // document.write('</style>\n')
  // }

   function SwitchMenu(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("masterdiv").getElementsByTagName("span"); //DynamicDrive.com change
		if(el.style.display != "block"){ //DynamicDrive.com change
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="submenu") //DynamicDrive.com change
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
   }
   
function kasuj_alert(url)
{
            if (confirm('Czy na pewno chcesz usun±ć ofertę?'))
            {
                location.href=url;
            }
}
function podmien_on(i)
{
        if(i==3) image="onas_hover.jpg";
		if(i==4) image="oferta_hover.jpg";
		if(i==5) image="zamowienie_hover.jpg";
		if(i==6) image="kontakt_hover.jpg";
		if(i==7) image="praca_hover.png";
		//if(i==8) image="praca_hover.png";
		document.images[i].src="img/" + image;
}

function podmien_off(i)
{
		if(i==3) image="onas.jpg";
		if(i==4) image="oferta.jpg";
		if(i==5) image="zamowienie.jpg";
		if(i==6) image="kontakt.jpg";
		if(i==7) image="praca.png";
		//if(i==8) image="praca.png";
        document.images[i].src="img/" + image;
}
function podmien_on2(i)
{
        document.images[p-i].src="images/strzalka3.jpg";
}

function podmien_off2(i)
{
        document.images[p-i].src="images/strzalka3blank.jpg";
}
function podmien_dol(i)
{
        document.images[p-i].src="images/strzalkadol.jpg";
        block=false;
}
function sprawdz_form(form,wymagane)
{
        alert('Wypełnij wszystkie wymagane pola!');
		//alert(wymagane[0]+wymagane[1]+wymagane[2]);
		alert(wymagane.length);
		for (i = 0; i < wymagane.length; i++) 
		{
			alert(i + 'wymagane' + wymagane[i] + 'value ' + form.wymagane[i].value);
			inp = eval(form + '.' + wymagane[i]);
		 //alert(inp);
				if (inp.value == '')
                {
						alert('Wypełnij wszystkie wymagane pola!');
							return false;
				}
		}

	//f = eval('document.' + form);
	
	return false;
}

function otworz(adres) {
noweOkno = window.open(adres, 'puzzle', 'menubar=no, toolbar=no, location=no, scrollbars=no, resizable=no, status=no, width=502, height=502, left=60, top=60')
noweOkno.focus()
} 
