function getXMLHttpObject(){
	var xmlHttp=null;
	try{ // Firefox, Chrome, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	}
	catch (e){ // Internet Explorer
		try{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e){
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	return xmlHttp;
}

function doError(msg,url,ln) {
	var strValues = "errMsg=" + escape(msg);    strValues += "&errLine=" + ln;    strValues += "&queryString=" + escape(location.search);    strValues += "&Url=" + escape(location.pathname);    strValues += "&HTTPRef=" + escape(document.referrer);

	var objSave = getXMLHttpObject();
	objSave.open("GET", "/cfcpublic/errorhandling.cfc?method=handleJSException&exception="+msg+"&page="+url+"&line="+ln);
	objSave.send("");
}
function _handleAjaxError (objResponse, textStatus) {
	
	$('<div>DKBS har modtaget en besked herom.<br /><br />Genindl&aelig;s siden eller pr&oslash;v igen senere.</div>')
	.appendTo(document)
	.dialog({
		title: 'Der opstod en fejl',
		buttons: [
          {
              text: "Luk vindue",
              click: function() { $(this).dialog("close"); }
          }
		],
		modal: true,
		close: function(){
			$(this).remove();
		}
	})
	
	
}
