// JavaScript Document
//FORMULÁRIOS
function setText(obj,text){
	document.getElementById(obj).innerHTML = text;
}

function formato(src, mask) 
{
	var i = src.value.length;
	var saida = mask.substring(0,1);
	var texto = mask.substring(i)
	if (texto.substring(0,1) != saida) 
	{
		src.value += texto.substring(0,1);
	}
}

function Resize(){
	if(navigator.appName!="Microsoft Internet Explorer"){
		window.moveTo(0,0);
		window.resizeTo(screen.width-1,screen.height-1);
		window.resizeTo(screen.width,screen.height);
	}
}

function centrar(obj){
	chor = screen.width/2;
	cver = screen.height/2;
	wobj = $(obj).offsetWidth;
	hobj = $(obj).offsetHeight;
	
	mhor = chor-(wobj/2);
	mver = cver-(hobj/2);
		
	$(obj).style.position="absolute";
	$(obj).style.top = mver+"px";
	$(obj).style.left = mhor+"px";
}

function Maximo(txarea,total,displayRestante) 
{ 
	tam = txarea.value.length; 
	str=""; 
	str=str+tam; 
	//  Digitado.innerHTML = str; 
	document.getElementById(displayRestante).innerHTML  = total;
	document.getElementById(displayRestante).innerHTML  = total - str;  
	if (tam > total)
	{ 
		aux = txarea.value; 
		txarea.value = aux.substring(0,total); 
		//	  	Digitado.innerHTML = total 
		document.getElementById(displayRestante).innerHTML = 0 
	} 
}