function loadContent(ele, url)
{  
	var xmlHttp;
	try{   
		xmlHttp=new XMLHttpRequest();
	}catch (e){       
		try{     
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");      
		}catch (e){      
			try{        
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");        
			}catch (e){        
				alert("Your browser does not support AJAX!");        
				return false;        
			}
		}    
	}

	xmlHttp.onreadystatechange=function(){
		if(xmlHttp.readyState==4){
			if(xmlHttp.status==200){
				document.getElementById(ele).innerHTML=xmlHttp.responseText;
			} else {
				document.getElementById(ele).innerHTML='Error'+xmlHttp.status;
			}
		} else {
			document.getElementById(ele).innerHTML="Loading...";
		}
	}

	xmlHttp.open("GET",url,true);
	xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8'); 
	xmlHttp.send(null);  
}

function loadContentToEle(ele, url, ctr)
{  
	var xmlHttp;
	try{   
		xmlHttp=new XMLHttpRequest();
	}catch (e){       
		try{     
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");      
		}catch (e){      
			try{        
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");        
			}catch (e){        
				alert("Your browser does not support AJAX!");        
				return false;        
			}
		}    
	}

	xmlHttp.onreadystatechange=function(){
		if(xmlHttp.readyState==4){
			if(xmlHttp.status==200){
				if(ctr){
					var ctrid = Math.floor(Math.random()*99999);					
					tempdiv = document.createElement("div");
					tempdiv.id="ctr_"+ctrid;
					tempdiv.innerHTML=xmlHttp.responseText;
					ele.appendChild(tempdiv);
				} else {
					ele.innerHTML=xmlHttp.responseText;
				}
			} else {
				alert(xmlHttp.status);
			}
		}
	}

	xmlHttp.open("GET",url,true);
	xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8'); 
	xmlHttp.send(null);  
}
