function callProductPage(prodId, otherProd, colors){


	var xhr = createXMLHttpRequest();
  	xhr.onreadystatechange = function() {
    if (xhr.readyState==4) { 
      if (xhr.status==200) {
        var resp = xhr.responseText;
        confirmOk(resp);
      } else {
        alert("An error occurred.");
      }
    }
  }
  xhr.open("POST", "utilities/saveSearch.php", true);
  xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
  xhr.send("id="+prodId+"&products="+otherProd+"&colors="+colors);
}


function confirmOk(resp){
	//alert(resp);
	resp = resp.toString();
	document.location=resp;
}


// -- Generic functions --------------------------------------------------

function createXMLHttpRequest() {
	try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) {}
    try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {}
	try { return new XMLHttpRequest(); } catch(e) {}
    alert("XMLHttpRequest not supported");
    return null;
}
