function DFonlyThisChars(n,l,o,e){
	if(window.event)key=window.event.keyCode;
	else if(e)key=e.which;
	else return true;
	S=(o)?o:'';
	if(n)S+='0123456789';
	if(l)S+='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
	if(key==null||key==0||key==8||key==9||key==13||key==27)return true;
	else if(S.indexOf(String.fromCharCode(key))!=-1)return true;
	else return false;
}
function DFnotOnlyThisChars(S,e){
	if(window.event)key=window.event.keyCode;
	else if(e)key=e.which;
	else return true;
	if(!S)return false;
	else if(key==null||key==0||key==8||key==9||key==13||key==27)return true;
	else if(S.indexOf(String.fromCharCode(key))!=-1)return false;
	else return true;
}
function DFchangeField(o,e,d){
	if(window.event)key=window.event.keyCode;
	else if(e)key=e.which;
	else return true;
	if(key==9||key==2||key==16)return false;
	if(d<=2&&o.value.length==o.maxLength){
		for(var i=0;i<o.form.length;i++){
			if(o.form[i]==o&&o.form[i+1]){
				if (o.form[i+1].disabled)
				{
					if (o.form[i+1].name == "txtAno" && (self.location.href.toLowerCase().indexOf("usuario_novocartao") != -1 || self.location.href.toLowerCase().indexOf("cadastro_novocartao") != -1))
						o.form[i+3].focus();
				}
				if (!o.form[i+1].disabled)
				{
					o.form[i+1].focus();
					
					if (self.location.href.toLowerCase().indexOf("usuario_novocartao") != -1 || self.location.href.toLowerCase().indexOf("cadastro_novocartao") != -1)
						o.form[i+1].select();
				}
				break;
			}
		}
	}
	if(d>1&&o.value.length==0&&key==8){
		for(var i=0;i<o.form.length;i++){
			if(o.form[i]==o&&o.form[i-1]){
				o.form[i-1].focus();
				o.form[i-1].value=o.form[i-1].value;
				break;
			}
		}
	}
}