function produktDoKoszyka(id_produktu) {
	
	advAJAX.post({
    url: "./do_koszyka.php",
    parameters : {
      "id_produktu" : id_produktu
    },
    //onSuccess : function(obj) { alert(obj.responseText); }
	onSuccess : function(obj) { window.location.reload(); }
    //onError : function(obj) { alert("Error: " + obj.status); },
});
}

function wyposazenieDoKoszyka(id_wyposazenia) {
	
	advAJAX.post({
    url: "./do_koszyka.php",
    parameters : {
      "id_wyposazenia" : id_wyposazenia
    },
    //onSuccess : function(obj) { alert(obj.responseText); },
	onSuccess : function(obj) { window.location.reload(); }
    //onError : function(obj) { alert("Error: " + obj.status); },
});
}

function czysc_koszyk() {
	
	advAJAX.post({
    url: "./do_koszyka.php",
    parameters : {
      "akcja" : 'czysc'
    },
    //onSuccess : function(obj) { alert(obj.responseText); },
	onSuccess : function(obj) { window.location.reload(); }
    //onError : function(obj) { alert("Error: " + obj.status); },
});
}

function usun_wyposazenie(id_produktu, id_wyposazenia) {
	
	advAJAX.post({
    url: "./do_koszyka.php",
    parameters : {
		"akcja" : 'del_wyposazenie',
		"id_produktu" : id_produktu,
		"id_wyposazenia" : id_wyposazenia
    },
    //onSuccess : function(obj) { alert(obj.responseText); },
	onSuccess : function(obj) { window.location.reload(); }
    //onError : function(obj) { alert("Error: " + obj.status); },
});
}

function usun_produkt(id_produktu) {
	
	advAJAX.post({
    url: "./do_koszyka.php",
    parameters : {
		"akcja" : 'del_produkt',
		"id_produktu" : id_produktu
    },
    //onSuccess : function(obj) { alert(obj.responseText); },
	onSuccess : function(obj) { window.location.reload(); }
    //onError : function(obj) { alert("Error: " + obj.status); },
});
}

function changeLang(id) {
	advAJAX.post({
    url: "./change_lang.php",
    parameters : {
		"langid" : id
    },
    //onSuccess : function(obj) { alert(obj.responseText); }
	onSuccess : function(obj) { window.location.reload(); }
	//onError : function(obj) { alert("Error: " + obj.status); }
});
}

function find_dealer(nazwa) {

	advAJAX.post({
    url: "./find_dealers.php",
    parameters : {
		"dealer" : nazwa
    },
    //onSuccess : function(obj) { alert(obj.responseText); }
	onSuccess : function(obj) { document.getElementById('dealers').innerHTML=obj.responseText; }
    //onError : function(obj) { alert("Error: " + obj.status); },
});
}


function moresearch() {
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById('more').style.display = 'block';
		document.getElementById('proste').style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.more.display = 'block';
			document.proste.display = 'none';
		}
		else { // IE 4
			document.all.more.style.display = 'block';
			document.all.proste.style.display = 'none';
		}
	}
}
function lesssearch() {		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById('more').style.display = 'none';
		document.getElementById('proste').style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.more.display = 'none';
			document.proste.display = 'block';
		}
		else { // IE 4
			document.all.more.style.display = 'none';
			document.all.proste.style.display = 'block';
		}
	}
}

function zmienRegion(region) {
    if (region=='polska') {
        if (document.getElementById) { // DOM3 = IE5, NS6
            document.getElementById('pl_woj').style.display = 'table-row';
            document.getElementById('dealers').style.display = 'block';
            document.getElementById('dealers_zagranica').style.display = 'none';
        }  else {
            if (document.layers) { // Netscape 4
                document.pl_woj.display = 'table-row';
                document.dealers.display = 'block';
                document.dealers_zagranica.display = 'none';
            } else { // IE 4
                document.all.pl_woj.style.display = 'table-row';
                document.all.dealers.style.display = 'block';
                document.all.dealers_zagranica.style.display = 'none';
            }
        }
    } else if (region=='zagranica'){
        if (document.getElementById) { // DOM3 = IE5, NS6
            document.getElementById('pl_woj').style.display = 'none';
            document.getElementById('dealers').style.display = 'none';
            document.getElementById('dealers_zagranica').style.display = 'block';
        }  else {
            if (document.layers) { // Netscape 4
                document.pl_woj.display = 'none';
                document.dealers.display = 'none';
                document.dealers_zagranica.display = 'block';
            } else { // IE 4
                document.all.pl_woj.style.display = 'none';
                document.all.dealers.style.display = 'none';
                document.all.dealers_zagranica.style.display = 'block';
            }
        }
    } else {
        if (document.getElementById) { // DOM3 = IE5, NS6
            document.getElementById('pl_woj').style.display = 'none';
        }  else {
            if (document.layers) { // Netscape 4
                document.pl_woj.display = 'none';
            } else { // IE 4
                document.all.pl_woj.style.display = 'none';
            }
        }
    }
}