function MyAjaxRequest(target_div,file,check_div)
			{	
				var MyHttpRequest = false;
				var MyHttpLoading = '<p>Loading...</p>'; // or use an animated gif instead: var MyHttpLoading = '<img src="loading.gif" border="0" alt="running" />';
				var ErrorMSG = 'Sorry - No XMLHTTP support in your browser, buy a newspaper instead';
				if(check_div)
				{
				var check_value = document.getElementById(check_div).value;
				}
				else
				{
				var check_value = '';
				}
				if(window.XMLHttpRequest) // client use Firefox, Opera etc - Non Microsoft product
				{
				try
				{
				MyHttpRequest = new XMLHttpRequest();
				}
				catch(e)
				{
				MyHttpRequest = false;
				}
				}
				else if(window.ActiveXObject) // client use Internet Explorer
				{
				try
				{
				MyHttpRequest = new ActiveXObject("Msxml2.XMLHTTP");
				}
				catch(e)
				{
				try
				{
				MyHttpRequest = new ActiveXObject("Microsoft.XMLHTTP");
				}
				catch(e)
				{
				MyHttpRequest = false;
				}
				}
				}
				else
				{
				MyHttpRequest = false;
				}
				if(MyHttpRequest) // browser supports httprequest
				{
				var random = Math.random() * Date.parse(new Date()); // make a random string to prevent caching

				var file_array = file.split('.'); // prepare to check if we have a query string or a html/htm file
				if(file_array[1] == 'php') // no query string, just calling a php file
				{
				  var query_string = '?rand=' + random;
				}
				else if(file_array[1] == 'htm' || file_array[1] == 'html') // calling a htm or html file
				{
				  var query_string = '';
				}
				else // we have presumable a php file with a query string attached
				{
				  //var query_string = check_value + '&rand=' + random;
				  var query_string = check_value;
				}

				MyHttpRequest.open("GET",file + query_string, true); // <-- run the httprequest using GET


				// handle the httprequest
				MyHttpRequest.onreadystatechange = function ()
				{
				if(MyHttpRequest.readyState == 4) // done and responded
				{
				document.getElementById(target_div).innerHTML = MyHttpRequest.responseText; // display result
				}
				else
				{

				document.getElementById(target_div).innerHTML = MyHttpLoading; // still working
				}
				}
				MyHttpRequest.send(null);
				}
				else 
				{
				document.getElementById(target_div).innerHTML = ErrorMSG; // the browser was unable to create a httprequest
				}
				}
