/** 
 *  Ajax requires access to a remote server
 *  That access can be restricted by browser settings
 *  This file
 *
 *  Requires: ajax.js
 */

// execute the test and issue warning if appropriate
ajaxdet_detect_warn();

function ajaxdet_detect_warn()
{
	var temp_xmlhttp = new ajax_getXmlHttp();
	if (temp_xmlhttp)
	{
		temp_xmlhttp.onreadystatechange = 
			function ()
			{
				// actual function code is not important here.
			}

		var errorcase = false;
		try
		{
			if (!temp_xmlhttp.open)
			{
				// only pop an error message if it's really important
				errorcase = true;
			} else {
				// don't actually need to try the open
				// xmlhttp.open(type,url,true);
			}
		} catch (e) {
			// catch the exception, but ignore it because IE6 is actually ok and we don't want a js_error_flag
			errorcase = false;
		}

		if (errorcase)
		{
			alert("Javascript is enabled, but your security settings are too high, in that they are currently restricting this page from requesting data.  Please enable 'Run ActiveX controls and plug-ins' and 'Script ActiveX controls marked safe for scripting' in order to view this page.");
			return(false);
		}
	}
	return(true);
}

