function fillmakes(sel)


{


if (checkobject("makes")) {

		document.getElementById('makes').options.length = 0;	// Empty Locations select box
	 
 
			var index = ajax.length;
			ajax[index] = new sack();
		 

	ajax[index].requestFile = host + '/vehicles/getmakesnew.asp?startloc=2'		
		
			ajax[index].onCompletion = function(){ createmakes(index) };	// Specify function that will be executed after file has been found
			ajax[index].runAJAX();		// Execute AJAX function

 

}

 
}



function createmakes(index)
{
	var obj = document.getElementById('makes');
	eval(ajax[index].response);	// Executing the response from Ajax as Javascript code	
}





function addLoadEvent(func) {   
  var oldonload = window.onload;   
   if (typeof window.onload != 'function') {   
     window.onload = func;   
   } else {   
     window.onload = function() {   
       if (oldonload) {   
         oldonload();   
      }          func();   
     }   
   }   
 }   


function checkobject(obj) {
	if (document.getElementById(obj)) { return true; } else { return false; }
}



var globalholder = 1;
var url =""+window.location;
var urlparts = url.split('/');
var host = urlparts[0] + '//' + urlparts[2];
 addLoadEvent(fillmakes); 
