function zbieraj(id){
	return document.getElementById(id).style;
}
function cz_pu_zmien(msc,id){
	cz_pu_ile = new Array(0,0,0,0,0,0,0,0,0,2,2,2,2,2);
	
	for (i = 1; i <= cz_pu_ile[msc]; i++){
		zbieraj('cz_pu_'+msc+'_'+i+'_a').display = 'none';
		zbieraj('cz_pu_'+msc+'_'+i+'_n').display = 'block';
		zbieraj('cz_pu_'+msc+'_'+i).display = 'none';
	}
	zbieraj('cz_pu_'+msc+'_'+id+'_n').display = 'none';
	zbieraj('cz_pu_'+msc+'_'+id+'_a').display = 'block';
	zbieraj('cz_pu_'+msc+'_'+id).display = 'block';
}
function sklep_laduj(id,model){
	if (id != '' && id != 0){
		x_sklep_option(id,model,sklep_laduj2);
	}
}
function sklep_laduj2(ans){
	//alert(ans);
	eval(ans);
	document.getElementById('select_ajax').innerHTML = opt;
}
function s_wybierz(url){	
	ddmarka = document.getElementById('marka').options.value;
	ddmodel = document.getElementById('model').options.value;

	if (ddmarka == undefined || ddmodel == undefined){
		ddmarka = document.getElementById('marka').value;
		ddmodel = document.getElementById('model').value;
	}
	
	if (ddmodel != 0 && ddmarka != 0 && ddmodel != '' && ddmarka != ''){
		u = 'marka_' + ddmarka + '__,model_' + ddmodel + '__';
		if (url != ''){
			u += ',' + url;
		}
		window.location.href = u + '.html';
	}
	else
		alert('Wybierz markę i model samochodu!');
}




