function startX() {
	
	if (typeof xajax_updateMails == 'function') {
		xajax_updateMails();
	}
	
	if (typeof xajax_updateAdmin == 'function') {
		xajax_updateAdmin();
	}
}

function setmytimeout (xajax, timeout, timer) {
	
	window.clearTimeout(window[timer])
	window[timer]=""
	if(timeout!=0){
		window[timer] = setTimeout(xajax,timeout)
	}
}

function ClearMessage(whattoclear) {
	whattoclear.value = ""
}

function popitup(url, whatwindow) {
	window[whatwindow]=window.open(url,whatwindow,'height=600,width=500,status=0,location=0,toolbar=0,menubar=0,resizable=0,scrollbars=0,directories=0');
	if (window.focus) {window[whatwindow].focus()};
	return false;
}

function ChatPing(receiver) {
	xajax_UpdateChat(receiver);
	var chattimer = setTimeout("ChatPing()",5000);
	return false;
}

function targetopener(mylink, closeme, closeonly) {
	if (! (window.focus && window.opener))return true;
	window.opener.focus();
	if (! closeonly)window.opener.location.href=mylink.href;
	if (closeme)window.close();
	return false;
}

var OnKeyRequestBuffer = 
{
    bufferText: false,
    bufferTime: 500,
        
    modified : function(strId)
   {
        setTimeout('OnKeyRequestBuffer.compareBuffer("'+strId+'","'+xajax.$(strId).value+'");', this.bufferTime);
    },
        
    compareBuffer : function(strId, strText)
   {
        if (strText == xajax.$(strId).value && strText != this.bufferText)
       {
            this.bufferText = strText;
            OnKeyRequestBuffer.makeRequest(strId);
        }
    },
       
    makeRequest : function(strId)
    {
        xajax_Update(strId, xajax.$(strId).value);
    }
}

