// Provide hover and click effect to entire table rows.
// (removed click effect - it was annoying - mike 1/10/03)
// Usage:
// <table class="grid">
//   <tr href="somelink.jsp" onmouseover="rowHover(this)">
//   ...
function rowHover(row) {
	if (!row.href && row.getAttribute) row.href = row.getAttribute("href");
	if (!row.href) return;
	row.oldClassName = row.className;
	row.className = 'gridHover';
	row.onmouseout = function() {
		this.className = this.oldClassName;
	}
//	row.onclick = function() {
//		document.location.href = this.href;
//  }
}

function placeFocus() {
	var stopNow=false;
	for (var i=0; i < document.forms.length; i++) {
		var currSet=document.forms[i].elements;
		if (document.forms[i].name!='searchForm' && document.forms[i].name!='inline-commentform') {
			for (var i = 0; i < currSet.length; i++) {
				if (currSet[i].type=='text' || currSet[i].type=='password' || currSet[i].type=='textarea'){
					currSet[i].focus();
					stopNow=true;
					break;
				}
			}
		}
		if (stopNow)
			break;
	}
}


function Colorir(obj) {
  obj.oldClassName = obj.className;
  obj.className = 'gridHover';
  obj.onmouseout = function() {
    this.className = this.oldClassName;
  }
}

var myWindow;
function AbreJanelaCentralizada( url )
{
  var width = 600;
  var height = 400;
  var left = parseInt((screen.availWidth/2) - (width/2));
  var top = parseInt((screen.availHeight/2) - (height/2));
  var windowFeatures = "width=" + width + ",height=" + height +
      ", resizable=yes,status=no,menubar=no,scrollbars=yes,copyhistory=yes, left=" + left + ",top=" + top +
      ",screenX=" + left + "screenY=" + top;
  myWindow = window.open(url, "subWind", windowFeatures);
}