// JavaScript Document

var xmlHttp = new XMLHttpRequest();

function swapOut(elm,str) {
	if (str.length==0) { 
		document.getElementById(elm).innerHTML="";
		return;
	}
	
	if (xmlHttp==null)	{
		alert ("Browser does not support HTTP Request");
		return;
	} 

	xmlHttp.open("GET",str,true);
	
	xmlHttp.onreadystatechange = function() {
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { 
			document.getElementById(elm).innerHTML=xmlHttp.responseText;
			xmlHttp.onreadystatechange = function() { };			
		} else {
			document.getElementById(elm).innerHTML="Loading..."+xmlHttp.readyState;
		}
	}
	xmlHttp.send(null);
	
} 


