<!--
// Written by Dexter Zafra at www.ex-designz.net
//Handle Check Username Availability Using Ajax
 var http = createRequestObjectHIT();
 function createRequestObjectHIT() 
     {
           var xmlhttp;
	 try 
                 { 
                    xmlhttp=new ActiveXObject("Msxml2.XMLHTTP"); 
                 }
	  catch(e) 
                 {
	    try { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}
	    catch(f) { xmlhttp=null; }
	    }
	        if(!xmlhttp&&typeof XMLHttpRequest!="undefined") 
                        {
	  	   xmlhttp=new XMLHttpRequest();
	           }
		   return  xmlhttp;
 }
function sndIns(x_capid, x_mileage, x_vehicleyear, x_cusref, x_vehiclevalue) 
  {
            try
              {
http.open('GET', 'CodeweaversInsurance.asp?capid='+x_capid+'&mileage='+x_mileage+'&vehicleyear='+x_vehicleyear+'&cusref='+x_cusref+'&vehiclevalue='+x_vehiclevalue);
				
             //    http.onreadystatechange = handleResponseText;
	    http.send(null);
	 }
	    catch(e){}
	    finally{}
 }
function handleResponseText() 
  {
     try
         {
             if((http.readyState == 4)&& (http.status == 200))
                {
    	         var response = http.responseText;
                 var grnelement = document.getElementById('insuranceresults');
                grnelement.innerHTML = response;
				//alert(response);
	        }
        }
	catch(e){alert("an error occured");}
	finally{}
}
