function getXMLHTTP() { //fuction to return the xml http object
		var xmlhttp=false;	
		try{
			xmlhttp=new XMLHttpRequest();
		}
		catch(e)	{		
			try{			
				xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch(e){
				try{
				req = new ActiveXObject("Msxml2.XMLHTTP");
				}
				catch(e1){
					xmlhttp=false;
				}
			}
		}
		 	
		return xmlhttp;
    }



	function getState(prdid) {		
		var strURL="findStateDealerNetwork.asp?prdid="+prdid;
		var req = getXMLHTTP();
		// alert(strURL);
		if (req) {
			
			req.onreadystatechange = function() {
				if (req.readyState == 4) {
					// only if "OK"
					if (req.status == 200) {						
						document.getElementById('divState').innerHTML=req.responseText;
					} else {
						alert("There was a problem while selection");
					}
				}				
			}			
			req.open("GET", strURL, true);
			req.send(null);
		}		
	}
	
	function getCity(prdid,id) {		
		var strURL="findCityDealerNetwork.asp?prdid="+prdid+"&state="+id;
		var req = getXMLHTTP();
		
		if (req) {
			
			req.onreadystatechange = function() {
				if (req.readyState == 4) {
					// only if "OK"
					if (req.status == 200) {						
						document.getElementById('divCity').innerHTML=req.responseText;
					} else {
						alert("There was a problem while selection");
					}
				}				
			}			
			req.open("GET", strURL, true);
			req.send(null);
		}		
	}
	
	
	function getHomeCity(id) {
		
		var strURL="findCityHomeUsers-Storage.asp?state="+id;
		var req = getXMLHTTP();
		//alert(strURL);
		if (req) {
			
			req.onreadystatechange = function() {
				if (req.readyState == 4) {
					// only if "OK"
					if (req.status == 200) {						
						document.getElementById('divHomeCity').innerHTML=req.responseText;
					} else {
						alert("There was a problem while selection");
					}
				}				
			}			
			req.open("GET", strURL, true);
			req.send(null);
		}		
	}
	
	
	function getBusinessCity(id) {
		
		var strURL="findCityBusinessUsers-Storage.asp?state="+id;
		var req = getXMLHTTP();
		
		if (req) {
			
			req.onreadystatechange = function() {
				if (req.readyState == 4) {
					// only if "OK"
					if (req.status == 200) {						
						document.getElementById('divBusinessCity').innerHTML=req.responseText;
					} else {
						alert("There was a problem while selection");
					}
				}				
			}			
			req.open("GET", strURL, true);
			req.send(null);
		}		
	}