

	subject_id = '';
	loading_div = '';
	emptyDiv = false;

	function handleHttpResponse() {
		if (http.readyState == 4) {
			if (subject_id != '') {
				document.getElementById(subject_id).innerHTML = http.responseText;
			}
			if(isset(loading_div) && loading_div != "") {
				document.getElementById(loading_div).innerHTML = '';
			}
		}
	}



	function getHTTPObject() {
		var xmlhttp;
		/*@cc_on
		@if (@_jscript_version >= 5)
			try {
				xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
			} catch (e) {
				try {
					xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
				} catch (E) {
					xmlhttp = false;
				}
			}
		@else
		xmlhttp = false;
		@end @*/
		if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
			try {
				xmlhttp = new XMLHttpRequest();
			} catch (e) {
				xmlhttp = false;
			}
		}
		return xmlhttp;
	}



	function ajaxGet(script,div_id,content_id,content, empty, loading_id) {

			subject_id = div_id;
			emptyDiv = empty;
			loading_div = loading_id;

			if(isset(empty) && empty == true) {

				document.getElementById(subject_id).innerHTML = '';
			}

			if(isset(loading_div) && loading_div != "") {

				document.getElementById(loading_div).innerHTML = '<b><i>Loading...</i></b>';
			}

			if (content == false) {
				if (content_id == false) {
					content = '';
				}else{
					content = document.getElementById(content_id).value;
				}
			}
			http.open("GET", script + escape(content), true);
			http.onreadystatechange = handleHttpResponse;
			http.send(null);
	}


	//get value from dropdown object
	function showAjaxContent(url,object,div) {

  		id = object.value;
 		ajaxGet(url + id, div, false, false);
  		return false;
	}


	function ajaxDivContent(url,div) {

 		setTimeout('ajaxGet(url, div, false, false);', 1);
  		return false;
	}


	function isset(varname){
		  return(typeof(window[varname])!='undefined');
	}


	var http = getHTTPObject(); // We create the HTTP Object


