	var isWorking = false;
    function makeRequest(url, type, asynch) {
	    if (isWorking) {return true;}
        var http_request = false;

        if (window.XMLHttpRequest) { // Mozilla, Safari, IE7 ...
            http_request = new XMLHttpRequest();
            if (http_request.overrideMimeType) {
                http_request.overrideMimeType('text/xml');
                // See note below about this line
            }
        } else if (window.ActiveXObject) { // IE
            try {
                http_request = new ActiveXObject("Msxml2.XMLHTTP");
            } catch (e) {
                try {
                    http_request = new ActiveXObject("Microsoft.XMLHTTP");
                } catch (e) {}
            }
        }

        if (!http_request) {
            alert('Giving up :( Cannot create an XMLHTTP instance');
            return false;
        }

		timerNotReached = true;
		isWorking = true;

        http_request.onreadystatechange = function() { acceptReturn(http_request, type); };
        http_request.open('GET', url, asynch);
        http_request.send(null);
		return true;
    }

	var timerID = 0;
	var tStart  = null;
	var timerFailsAt = 0;
	var timerFailFunc = null;
	var timerNotReached = true;
	function StopTimer() {
	   	if(timerID) {
		  	clearTimeout(timerID);
		  	timerID  = 0;
	   	}
	   	tStart = null;
	}
	function UpdateTimer() {
	   	if(timerID) {
		  	clearTimeout(timerID);
		  	clockID  = 0;
	   	}
		if(!tStart)
		  	tStart   = new Date();
	
	   	var tDate = new Date();
	   	var tDiff = tDate.getTime() - tStart.getTime();
	   	tDate.setTime(tDiff);
	    if(tDate.getSeconds() > timerFailsAt)  {
			isWorking = false;
			timerNotReached = false;
			eval(timerFailFunc)();
			StopTimer();
		} else {
	   		timerID = setTimeout("UpdateTimer()", 5000);
		}
	}
	function startTimer(timeInSeconds, returnFunc) {
		timerFailFunc = returnFunc;
		timerFailsAt = timeInSeconds;
	   	tStart   = new Date();	
	   	timerID  = setTimeout("UpdateTimer()", 5000);
	}

