
	function ajax(request, target) {
		var xmlhttp=false; //Clear our fetching variable
		try {
			xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); //Try the first kind of active x object
		} catch (e) {
			try {
				xmlhttp = new
	      ActiveXObject('Microsoft.XMLHTTP'); //Try the second kind of active x object
	 		} catch (E) {
				xmlhttp = false;
	    }
	  }
	  if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	  	xmlhttp = new XMLHttpRequest(); //If we were able to get a working active x object, start an XMLHttpRequest
	  }
	  xmlhttp.open('GET', request, true);
	  xmlhttp.onreadystatechange=function() {
	  	if (xmlhttp.readyState==4) { //Check if it is ready to recieve data
	  		var content = xmlhttp.responseText; //Load content to js variable
	    	if( content ) {
	    		document.getElementById(target).innerHTML = content;
	    	}
	  	}
		}
		xmlhttp.send(null) //Nullify the XMLHttpRequest
		return;
	}

	function OpenCentered(psUrl, psName, piWidth, piHeight, psFlags) {
		var iX=(screen.width-piWidth-20)/2;
		var iY=(screen.height-piHeight-30)/2;
		open(psUrl, psName, 'width=' + piWidth + ',height=' + piHeight + ',scrollbars=1,left=' + iX + ',top=' + iY +  ',screenX=' + iX + ',screenY=' + iY + psFlags);
	}

	function fileUploadRename(filename) {
		ajax('http://www.expografic.es/dev/_srv/altMind/ajax.fileUploadRename.php?filename=' + escape(filename), 'fileUploadRenamed');
	}
