function fnNull() { };

function stateChanged(xmlHttp, divcontainer1, divcontainer2){
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
		var splitarray = xmlHttp.responseText.split('|**|');
		document.getElementById(divcontainer1).innerHTML= splitarray[0];
		document.getElementById(divcontainer2).innerHTML= splitarray[1];
		xmlHttp.onreadystatechange = fnNull;
	} else {
		//alert(xmlHttp.status);
	}
}

// Will populate data based on input
function htmlData(url, divcontainer1, divcontainer2){
	if (url.length==0){
		document.getElementById(divcontainer1).innerHTML="";
		document.getElementById(divcontainer2).innerHTML="";
		return;
	}
	var xmlHttp = createXmlHttpRequestObject();
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=function() { stateChanged(xmlHttp, divcontainer1, divcontainer2); };
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
	return xmlHttp;
}
