window.onloadStack = [];

window.onloadAdd = function(evalString)
{
	this.onloadStack.push(evalString);
}

window.onload = function()
{
	for (var i in this.onloadStack) eval(this.onloadStack[i]);
}


function setTableRows(tbl_id, color_over, color_out, skip_first_row)
{
	if (color_out == undefined) color_out = '';
	if (skip_first_row == undefined) skip_first_row = true;


	var tbl = document.getElementById(tbl_id);
	if(tbl == undefined) return;

	var rows = tbl.getElementsByTagName('tr');
	for(var i=(skip_first_row ? 1 : 0); i<rows.length; i++)
	{
		rows[i].onmouseover = function(){ this.style.backgroundColor = color_over }

		rows[i].onmouseout = function(){ this.style.backgroundColor = color_out }
	}
}


function setBlur()
{
	var tagsArr = document.getElementsByTagName('A');
	var tagsTotal = tagsArr.length;
	for (var i=0; i<tagsTotal; i++) tagsArr[i].onfocus = function(){ this.blur() };

	tagsArr = document.getElementsByTagName('INPUT');
	tagsTotal = tagsArr.length;
	for (i=0; i<tagsTotal; i++)
	{
		var obj = tagsArr[i];
		if (obj.type != 'file' && obj.type != 'text' && obj.type != 'password') obj.onfocus = function(){ this.blur() };
	}
}


window.onloadAdd('setBlur();');
