

function xDeals(s1,s2)
{ 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  }   
sLoad();
var phone = document.dfform.phone.value;
var url="../includes/xdeals1.asp";
url=url+"?id="+phone + "&"+s2+"="+s1;
url=url+"&sid="+Math.random();
//alert (url);
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function sLoad()
{
document.getElementById("xdeals").innerHTML = "<table class='qdf' sellspacing='1'><tr><td colspan='6'>Searching Please Wait.....</td></tr><tr><td colspan='8' height='600'></td></tr></table>";
}

function stateChanged() 
{ 
if (xmlHttp.readyState==4)
 { 
  document.getElementById("xdeals").innerHTML=xmlHttp.responseText;
 }
}

function myDeals(s2) { 
	var newIndex = eval("document.dfform."+s2+".selectedIndex;"); 
//	if ( newIndex == 0 ) { 
//		alert( "Please select a " + s2 + "!" ); 
//	} else { 
		var p = eval("dfform." + s2 + ".options[ newIndex ].value");
	//	alert(p);
	
//document.dfform.text.selectedIndex=0;
document.dfform.incentive.selectedIndex=0; 
document.dfform.network.selectedIndex=0; 
//document.dfform.contract.selectedIndex=0; 
//document.dfform.minutes.selectedIndex=0; 
//document.dfform.tariff.selectedIndex=0; 
eval("document.dfform." + s2 + ".selectedIndex=" + newIndex); 
xDeals(p,s2);
//} 

}

