if (!document.domain || (url.slice(7, document.domain.length) != document.domain && netscape && netscape.security && netscape.security.PrivilegeManager)) { 
if (!document.domain || (url.slice(7, document.domain.length + 7) != document.domain && netscape && netscape.security && netscape.security.PrivilegeManager)) { 
	this._doQuery = function(queryString, callback, transformer) {		_user_query = queryString;		if (_service._canRun()) {			try {				if (_method != 'POST' && _method != 'GET')					throw("HTTP methods other than GET and POST are not supported.");							var url = _method == 'GET' ? this.queryUrl() : this.service().endpoint();				var xhr = getXmlHttpRequest(url);				var content = null;				try {					if (!document.domain || (url.slice(7, document.domain.length) != document.domain && netscape && netscape.security && netscape.security.PrivilegeManager)) {						netscape.security.PrivilegeManager.enablePrivilege( "UniversalBrowserRead");						netscape.security.PrivilegeManager.enablePrivilege( "UniversalXPConnect"); 					}				} catch(e) {					alert("Cross-site requests prohibited. You will only be able to SPARQL the origin site: " + e);				}								xhr.open(_method, url, true /* async */);								// set the headers, including the content-type for POSTed queries				for (var header in this.requestHeaders())					xhr.setRequestHeader(header, this.requestHeaders()[header]);				if (_method == 'POST') {					xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');					content = this.queryParameters();				}					SPARQL.statistics.queries_sent++;				_service._markRunning(this);					var callbackData = {					scope:this, 					success: this._querySuccess, 					failure: this._queryFailure,					argument: {						transformer: transformer,						callback: callback					}				};								// I've seen some strange race-condition behavior (strange since normally				// JS is single-threaded, so synchronization conditions don't occur barring 				// reentrancy) with onreadystatechange. Instead, we poll asynchronously to				// determine when the request is done.				var token = window.setInterval(					function () {						if (xhr.readyState == 4) { // ready!							// clear this handler							window.clearInterval(token);							// we check the status to know which callback to call							if (xhr.status >= 200 && xhr.status < 300)								callbackData.success.apply(callbackData.scope, [xhr, callbackData.argument]);							else								callbackData.failure.apply(callbackData.scope, [xhr, callbackData.argument]);						}					},					200 /* maybe this should be customizable */				);								xhr.send(content);			} catch (e) {				alert("Error sending SPARQL query: " + e);			}		} else {			var self = this;			_service._queue(self, function() { self._doQuery(queryString, callback, transformer); }, _priority);		}	};
125	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/125/95af6aab9313ec6671ce8188c7e6902605911347/sparql.js/buggy/webapps/joseki/snorql/sparql.js