function loadScript(scriptURL)
{
	var newScript = document.createElement("script");
	newScript.src = scriptURL;
	document.body.appendChild(newScript);
}

function loadData(id,URL)
{

// Create the XML request  
	var xmlReq = false;
	if (window.XMLHttpRequest) {
		xmlReq = new XMLHttpRequest();
	} else if (window.ActiveXObject) {
    		// Try ActiveX
		try { 
			xmlReq = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e1) { 
			// first method failed 
			try {
				xmlReq = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e2) {
				 // both methods failed 
			} 
		}
 	}

	if(xmlReq==null) return; // Failed to create the request

// Anonymous function to handle changed request states
	xmlReq.onreadystatechange = function()
	{
		switch(xmlReq.readyState)
		{
		case 0: 	// Uninitialized
			break;
		case 1: // Loading
			break;
		case 2: // Loaded
			break;
		case 3: // Interactive
			break;
		case 4:	// Done!
		// Retrieve the data between the <quote> tags
			doSomethingWithData(id,xmlReq.responseXML.getElementsByTagName('quote')[0].firstChild.data);
			break;
		default:
			break;
		}
	}

// Make the request
	xmlReq.open ('GET', URL, true);
	xmlReq.send (null);
}

