// JavaScript Document
xmlhttp = new Array();
function loadurl(dest,sendInfo,div,subscript) { 

	mydiv = div;
	
	if (document.getElementById(mydiv)){
		document.getElementById(mydiv).style.display='none';
	}
	
	if (document.getElementById(mydiv+'Loading')){
		document.getElementById(mydiv+'Loading').style.display='block';
	}
	
		try { 
			// Moz supports XMLHttpRequest. IE uses ActiveX.  
			// browser detction is bad. object detection works for any browser  
			xmlhttp[subscript] = window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("Microsoft.XMLHTTP"); 
		} 
		catch (e) { 
			alert("ERROR");
		} 
		
	// the xmlhttp object triggers an event everytime the status changes  
	// triggered() function handles the events  
	xmlhttp[subscript].onreadystatechange = function() { triggered(subscript , div); };
	xmlhttp[subscript].open("POST", dest+"?"+sendInfo); 
	xmlhttp[subscript].send(null); 
} 

function triggered(subscript, mydiv) { 
	if ((xmlhttp[subscript].readyState == 4) && (xmlhttp[subscript].status == 200)) { 
	
		if (document.getElementById(mydiv+'Loading')){
			document.getElementById(mydiv+'Loading').style.display='none';
		}

		if (document.getElementById(mydiv)){
			document.getElementById(mydiv).innerHTML = xmlhttp[subscript].responseText; 
			//document.getElementById(mydiv).style.display='block';	
			Effect.Appear(mydiv);
		}
	} 
}

function doNothing(){
	var x = "blah"
}