// JavaScript Document
function __callConnect(){
	if(window.XMLHttpRequest){
		request	= new XMLHttpRequest();
	} else if(window.ActiveXObject){
		try{
			request = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch(e){
			request	= new ActiveXObject("Microsoft.XMLHTTP");
		}
	} else {
		request = false;
	}
	return request;	
}
function tellMake(){
	var make	= document.getElementById('make').value;
	var handler	= __callConnect();
	handler.open('GET', 'common/dispatchmodel.php?make=' + make, true);
	handler.onreadystatechange = function(){
		if(handler.readyState == 4) {
			document.getElementById('model').options.length	= 0;
			stru	= handler.responseText.split(';');
			if(stru.length >= 1){
				for(i=0;i<stru.length;i++){
					if(stru[i].length >= 1){
						clack	= stru[i].split('*.');
						document.getElementById('model').options[i] = new Option(clack[0], clack[1]);
					}
				}			
			}
		}
	}
	handler.send(null);	
}

