function sample2232() {
  if (http.readyState == 1) {
    // Split the comma delimited response into an array
    //results = http.responseText;
 	  document.getElementById('put_subcat').innerHTML = "<div class=arrow>Loading..</div>";
  } //<img src='../Images/loading-card.gif' height=30 width=150>

  if (http.readyState == 4) {
    // Split the comma delimited response into an array
    results = http.responseText;
 	  document.getElementById('put_subcat').innerHTML = results;
  }
}
function get_subcat() { 
  var cidIndex = document.getElementById("cat");
  var cidValue = cidIndex.options[cidIndex.selectedIndex].value;
 // alert(cidValue);
var url = "get_subcat.php?cid="; // The server-side script
  http.open("GET", url + escape(cidValue), true);
  http.onreadystatechange = sample2232;
  http.send(null);
}

  function makeObject(){
var x;
var browser = navigator.appName;
if(browser == "Microsoft Internet Explorer"){
x = new ActiveXObject("Microsoft.XMLHTTP");
}else{
x = new XMLHttpRequest();
}
return x;
}
//common for all ajax
var request = makeObject();

function GiveYear()
	{	
	
	var selectBox = document.form1.bike_model;
	
	var selectBox1=document.form1.bike_make;

	var Partis = selectBox1.options[selectBox1.selectedIndex].value;
	
	var Partis1 = selectBox.options[selectBox.selectedIndex].value;
	
//	request.open('get', 'year_new1.php?makeid=' + Partis +   'modelid=' + Partis1);
	request.open('get','year_new1.php?makeid=' + Partis  +  '& modelid=' + Partis1);		
//	request.open('get','year_new1.php?modelid=' + Partis1);		
	request.onreadystatechange = parseInfo;
	request.send('');
		
		
	}

        function parseInfo()
        {
        if(request.readyState == 1)
                {
            //    document.getElementById('yearid').innerHTML = 'Loading...';
                }
        if(request.readyState == 4)
                {
                var answer = request.responseText;
             //   document.getElementById('yearid').innerHTML = answer;
                }
        }

function getHTTPObject() {
  var xmlhttp;
  /*@cc_on
  @if (@_jscript_version >= 5)
    try {
      xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (E) {
        xmlhttp = false;
      }
    }
  @else
  xmlhttp = false;
  @end @*/
  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
    try {
      xmlhttp = new XMLHttpRequest();
    } catch (e) {
      xmlhttp = false;
    }
  }
  return xmlhttp;
}
var http = getHTTPObject(); // We create the HTTP Object



