
function googleToolbarFix()
{
	var i = window.setInterval (
		function ()
		{
			var elems = document.getElementsByTagName('input');
			for (var e = 0; e < elems.length; e++)
				if (elems[e].className == 'textbox') elems[e].style.backgroundColor = 'rgb(30,30,30)';
			window.clearInterval(i);
		}, 500);
}

function ajaxUpdater(id, url) {new Ajax.Updater(id,url,{asynchronous:true});} 

function ajaxRequest(url, data, response) 
{    
    new Ajax.Request(
		url, 
		{  
			method: 'get',   
			parameters: data,   
			onComplete: response,
			onFailure: function(e) { alert('Failed on AJAX request!'); }
		}
	);  
}  

function log(text)
{
	try
	{
		console.log(text);
	}
	catch(e) { /* no debugging */ }
}

function LZ(n) {
    return (n != null && n < 10 && n >= 0 ? "0" : "") + n;
}

function LZZ(n) {
    return n != null && n < 100 && n >= 0 ? "0" + LZ(n) : "" + n;
}
