var jObjhash = new Object();

function showJSON(jsonData) {
	var html_output = jsonData.html;
	var divname = jsonData.divname;
	var obj_id = jsonData.id;
	jObjhash[obj_id].removeScriptTag();
	writeToPrepsDiv(divname, html_output);
	}

function getJSON(serviceUrl) {
	var req = serviceUrl;
	var jObj = new JSONscriptRequest(req);
	jObj.buildScriptTag();
	jObj.addScriptTag();
	jObjhash[jObj.scriptId] = jObj;
	return jObj;
	}

function loadServiceContent(divname) {
	//var serviceReq = getNewXMLHttpRequest();
	serviceUrl = prepsDivMap[divname];
	html_output = getJSON(serviceUrl);
	}

function writeToPrepsDiv(divname, content) {
	theDiv = document.getElementById(divname);
	if (theDiv != undefined) {
		theDiv.innerHTML = content;
		}
	}

function processPrepsDivMap() {
	for (attr in prepsDivMap) {
		// call service
		loadServiceContent(attr);
		}
	}

processPrepsDivMap();
