	// Funcao de OnMouseOver e Click
	var elem = "TR"; // Object you want to affect: TR or TD
	var rClick;
	window.onload = function() {
		if (document.getElementsByTagName) {
			var el = document.getElementsByTagName(elem);
			for(var i=0; i<el.length; i++) {
				if (el[i].childNodes[0].tagName != "TH" && el[i].parentNode.parentNode.className.indexOf("tbl") != -1) {
					if (i%2 == 1) {
						el[i].className = "on";
						el[i].oldClassName = "on";
						el[i].onmouseout  = function() { this.className = "on"; }
					} else {
						el[i].className = "off";
						el[i].oldClassName = "off";
						el[i].onmouseout  = function() { this.className = "off"; }
					}
					el[i].onmouseover = function() {
						if (this.className == this.oldClassName) { this.className = "hover"; }
						if(this.onmouseout == null && this.className != "click") {
							this.onmouseout = function() { this.className = this.oldClassName; }
						}
					}
					el[i].onclick = function() {
						if(this.className != "click") {
							this.className = "click";
						} else {
							this.className = this.oldClassName;
						}
						this.onmouseout = null;
					}
				}
			}
		}
	}

	// Funcao de Busca do Registro
	function buscar(tr_num) {
		//var el = document.getElementsByTagName("TR")[0];
		var palavra = document.busca.palavra.value.toUpperCase();
		// Varrer a tabela em busca de valores
		var achou = false;
		for(var i=1; i<tr_num; i++) {
			var el = document.getElementById("linha_"+i);
			if (i%2 == 1) {
				el.className = "on";
			} else {
				el.className = "off";
			}
			for(var j=0; j<el.childNodes.length; j++) {
				if (el.childNodes[j].nodeType==1) {
					var aux = el.childNodes[j].innerHTML.toUpperCase();
					if (palavra==aux.substring(0,palavra.length)) {
						achou = true;
						el.className = "click";
					}
				}
			}
		}
		document.busca.palavra.focus();
		document.busca.palavra.select();
	}


<!-- Begin
// test variables
var myWidth = 400;
var myHeight = 350;
var isResizable = true;

	function createTarget(form) {
		_target = form.target;
		_colon = _target.indexOf(":");
		if(_colon != -1) {
			form.target = _target.substring(0,_colon);
			form.args = _target.substring(_colon+1);
		} else if(typeof(form.args)=="undefined") {
			form.args = "";
		}
		if(form.args.indexOf("{")!=-1) {
			_args = form.args.split("{");
			form.args = _args[0];
			for(var i = 1; i < _args.length;i++) {
				_args[i] = _args[i].split("}");
				form.args += eval(_args[i][0]) + _args[i][1];
			}
		}
		form.args = form.args.replace(/ /g,"");
		_win = window.open('',form.target,form.args);
		if(typeof(focus)=="function")
			_win.focus();
		return true;
	}
//  End -->
