<!--

/* +-------------------------+ */
/*        XMLHttp Object       */
/* +-------------------------+ */
function createXmlHttp() {
	var xmlHttp;
	try {
		xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	} catch (e) {
		try {
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			xmlHttp = new XMLHttpRequest();
		}
	}
	return xmlHttp;
}

/* +-------------------------+ */
/*         Send Request        */
/* +-------------------------+ */

function sendReq(action, value, identifier, responseID) {
	var url = 'functions/ajax.php?action='+action+'&value='+value+'&id='+indentifier+'&nocache='+Math.random();
	var responseID = (responseID==null) ? 'response' : responseID;
	var responseDiv = document.getElementById(responseID);
	var xmlHttp = createXmlHttp();
	xmlHttp.onreadystatechange = function() {
		if (xmlHttp.readyState==4 && xmlHttp.status==200) {
				responseDiv.innerHTML = xmlHttp.responseText;
		}
	}
	xmlHttp.open('GET', url);
	xmlHttp.send(null);
}

/* +-------------------------+ */
/*       Show/Hide Toggle      */
/* +-------------------------+ */

function toggleVis(elementId) {
	var elDisplay = document.getElementById(elementId).style.display;
	if (elDisplay == 'none') { // Show it
		elDisplay='block';
	} else { // Hide it
		elDisplay='none';
	}
}

//-->