//Ajax error handling 


window.onerror = function(msg, code_url, ln) {

	var POSTData = 'msg=' + escape(msg) + '&code_url=' + code_url + '&page_url=' + window.location + '&line=' + ln + '&browser=' + navigator.userAgent;
	//console.log(POSTData);
	new Ajax.Request('/js_error/log_error.php',
	{
		method: 'post', postBody : POSTData
	});
	
	setTimeout('if(typeof clicky != "undefined") clicky.log("' + window.location + '", "JS Error");', 2000);
	
};