	function addLoadEvent(func){
		var oldonload = window.onload;
		if (typeof window.onload != 'function') {
			window.onload = func;
		} else {
			oldonload();
			if (func!=undefined){
				func();
			};
		};
	};

	function $(obj){
		return document.getElementById(obj);
	};
	function $n(obj){
		return document.getElementsByName(obj);
	};
	function $a(obj){
		return document.getElementsByTagName(obj);
	};

	String.prototype.Show = function(){ exibeDiv($(this));};
	Object.prototype.Show = function(){ exibeDiv(this);};
	Array.prototype.Show = function(){
		for (i = 0;i<this.length;i++)
		exibeDiv(this[i]);};
	String.prototype.Hide = function(){ ocultaDiv($(this));};
	Object.prototype.Hide = function(){ ocultaDiv(this);};
	Array.prototype.Hide = function(){
		for (i = 0;i<this.length;i++)
		ocultaDiv(this[i]);};

	function exibeDiv(obj) {
		if (obj!=null){
			var str = obj.className;
			if (str==null || str==""){
				str = "show";
			}else{
				if (str.indexOf('hidden')!=-1){
					str = str.replace('hidden','show');
				}else{
					str+= ' show';
				};
			};
			obj.className = str;
		}
	};

	function ocultaDiv(obj){
		if (obj!=null){
			var str = obj.className;
			if (str==null || str==""){
				str = "hidden";
			}else{
				if (str.indexOf('show')!=-1){
					str = str.replace('show','hidden');
				}else{
					str+= ' hidden';
				};
			};
			obj.className = str;
		}
	};

	function addCss(obj, css) {
		if (obj!=null){
			var str = obj.className;
			if (str==null || str==""){
				str = css;
			}else{
				if (str.indexOf(css)==-1){
					str+= ' show';
				};
			};
			obj.className = str;
		}
	};

	Object.prototype.Texto = function(){
		if (this.innerHTML == '' ){
			this.innerHTML = arguments[0];
		}else{
			var str = new String(this.innerHTML);
			if (str.indexOf('{0}')!=-1){
				for (i = 0;i<arguments.length;i++){
					str = str.replace('{'+i+'}',arguments[i]);
				};
			}else
				str = arguments[0];
			this.innerHTML = str;
		};
	};	