/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

if (navigator.appName.indexOf('Microsoft') != -1){
	clientNavigator = "IE";
}else{
	clientNavigator = "Other";
}

function formataData(input, evnt){
	if (input.value.length == 2 || input.value.length == 5){
 		if(clientNavigator == "IE"){
 			input.value += "/";
		}else{
			if(evnt.keyCode == 0){
				input.value += "/";
			}
		}
	}
	return Bloqueia_Caracteres(evnt);
}

function Bloqueia_Caracteres(evnt){
	if (clientNavigator == "IE"){
		if (evnt.keyCode < 48 || evnt.keyCode > 57){
			return false
		}
	}else{
		if ((evnt.charCode < 48 || evnt.charCode > 57) && evnt.keyCode == 0){
			return false
		}
	}
}

function versaoImpressa(){
  window.open('versaoImpressa.php', 'Impressão', 'toolbar=no, location=no, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=yes, width=800, height=600');
  return false;
}

function descricaoEventos(obj, local){
	if(local == 1 && obj.value == 'Descrição'){
		obj.value = '';
	}else if(local == 0 && obj.value.length <= 0){
		obj.value = 'Descrição';
	}
}