function GetHttpObject(){
    var xmlHttpObj;
    try {   
        xmlHttpObj = new XMLHttpRequest();              
        return xmlHttpObj;
    }
    catch (e){        
        try{
            xmlHttpObj = new ActiveXObject("Msxml2.XMLHTTP");                   
            return xmlHttpObj; 
        }
        catch (e){           
            try{
                xmlHttpObj = new ActiveXObject("Microsoft.XMLHTTP");                      
                return xmlHttpObj;      
            }
            catch (e)
            {        
                alert("Sorry, Your browser does not support AJAX!");        
                return null;        
            }     
        }   
    }     
} 

function fillrecyclemobile(spnId, ctlId, manu){ 
	var xmlHttprecyclemobile;
	var url = wsUrl + "ajax/fillrecycle.asp";
	url=url + "?ctlId="+ctlId;
    url=url + "&manu="+manu;
    url = url + "&rnd=" + Math.random();
	//alert(url);
	xmlHttprecyclemobile = GetHttpObject(); 
    xmlHttprecyclemobile.onreadystatechange = function(){StateChangedrecyclemanu(xmlHttprecyclemobile, spnId)};
	xmlHttprecyclemobile.open("GET", url , true);
	xmlHttprecyclemobile.send(null);
}
function StateChangedrecyclemanu(xmlHttprecyclemobile, spnId) { 
	if (xmlHttprecyclemobile.readyState == 4 || xmlHttprecyclemobile.readyState == "complete"){
		document.getElementById(spnId).innerHTML = xmlHttprecyclemobile.responseText;	 
	}else{// For Loading...		
	}
} 

function recylefill(manu){ 
	var xmlHttpmanu;
	var url = wsUrl + "ajax/fillrecycle.asp";
	url=url + "?manu="+manu;
	//alert(url);
    url = url + "&rnd=" + Math.random();
	xmlHttpmanu = GetHttpObject(); 
    xmlHttpmanu.onreadystatechange = function(){StateChangedrecycle(xmlHttpmanu)};
	xmlHttpmanu.open("GET", url , true);
	xmlHttpmanu.send(null);
}

function StateChangedrecycle(xmlHttpmanu) { 
	if (xmlHttpmanu.readyState == 4 || xmlHttpmanu.readyState == "complete"){
		document.getElementById("spnRecycleModel").innerHTML = xmlHttpmanu.responseText;	 
	}else{// For Loading...		
	}
} 
function valid(){
	if (document.frm.manu.value==""){
		alert("Please select manufacturer");
		document.frm.manu.focus();
		return false;}
if (document.frm.model.value==""){
		alert("Please select model");
		document.frm.model.focus();
		return false;}
	return true;
	}
	x = 20;
y = 70;
function setVisible(obj)
{ //alert(obj);
	obj = document.getElementById(obj);
	obj.style.visibility = (obj.style.visibility == 'visible') ? 'hidden' : 'visible';
}
