function SendRequest(id) {
    var req = mint.Request();
		
		var strona = "ajax/subcatoptions.php?id=" + id;
		
    req.Send(strona, "response");
} 


function SendRequest2() {
    var req2 = mint.Request();
		
		var id2 = document.getElementById("ctr").value;
		
		
		var strona2 = "ajax/subcatoptions2.php?id=" + id2;
		
    req2.Send(strona2 , "subcatright");
} 

function change_sctr(subcat){

document.getElementById("sctr").value = subcat;

}

/*
function SendRequest2() {

    var req2 = mint.Request();
		
		var id2 = document.getElementById("ctr").value;

		
    req2.OnSuccess = function() {
		
		
        var items = this.responseXML.getElementsByTagName("item");
        
        for(var i = 0; i < items.length; ++i) {
				
				
				alert(items[i].firstChild.data);
				
				/*
				lista = document.getElementById("sctr");

nowaOpcja = document.createElement('option');
nowaOpcja.setAttribute('value',items[i].firstChild.data);
nowaOpcjaNazwa = document.createTextNode('Nazwa opcji' + i);
nowaOpcja.appendChild(nowaOpcjaNazwa);

lista.appendChild(nowaOpcja);

 document.getElementById("subcatright").innerHTML += items[i].firstChild.data + "srata<br />";


//"sctr").options[i].value = items[i].firstChild.data;			
							
            
        }
    }
    
		var strona2 = "ajax/subcatoptions2.php?id=" + id2;
    req2.Send(strona2);
} 
*/



function ChangeColor(sum , curr) {

var x;

for(x = 1 ; x <= sum ; x++){

var el = "block" + x;

document.getElementById(el).style.background = "#333366";

}

var current = "block" + curr;

document.getElementById(current).style.background = "#0033cc";

}

function resetpost(){

document.getElementById("postcode").value = "";

}

function confirmdel(x){

var agree=confirm("Czy napewno chcesz usun±ć t± ofertę?");
if(agree)
{
document.location = "myoffers.php?del=" + x;
} else {
return false;
}

}