var message="Desabilitado"; 

function init(){
	try{
		topoSWF_DoFSCommand("dthr", "");
	}
	catch(e){}
}

function click(e) {
  if (document.all) {
    if (event.button == 2) {
      alert(message);
      return false;
    }
  }

  if (document.layers) {
    if (e.which == 3) {
      alert(message);
      return false;
    }
  }
}

if (document.layers) {
  document.captureEvents(Event.MOUSEDOWN);
}


function abrirSistema(URL, W, H) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open('" + URL + "', '" + id + "', 'toolbar=no,scrollbars=no,location=no,status=yes,menubar=no,resizable=no,width=" + W + ",height=" + H + ",left = " + (screen.width - W) / 2 + ",top = " + (screen.height - H) / 2 + "');");
}

<!-- document.onmousedown=click;


function FormataParaMoeda(campo,tammax,teclapres,decimal) {
                var tecla = teclapres.keyCode;
                vr = LimparMoeda(campo.value,"0123456789");
                tam = vr.length;
                dec = decimal;
                
                if (tam < tammax && tecla != 8){ 
                               tam = vr.length + 1 ; 
                }
                
                if (tecla == 8 ){ 
                               tam = tam - 1 ; 
                }
                
                if ( tecla == 8 || (tecla >= 48 && tecla <= 57) || (tecla >= 96 && tecla <= 105)){
                
                               if ( tam <= dec ){ 
                                               campo.value = vr ; 
                               }
                               
                               if ( (tam > dec) && (tam <= 5) ){
                                               campo.value = vr.substr( 0, tam - 2 ) + "," + vr.substr( tam - dec, tam ) ; 
                               }
                               
                               if ( (tam >= 6) && (tam <= 8) ){
                                               campo.value = vr.substr( 0, tam - 5 ) + "." + vr.substr( tam - 5, 3 ) + "," + vr.substr( tam - dec, tam ) ; 
                               }

                               if ( (tam >= 9) && (tam <= 11) ){
                                               campo.value = vr.substr( 0, tam - 8 ) + "." + vr.substr( tam - 8, 3 ) + "." + vr.substr( tam - 5, 3 ) + "," + vr.substr( tam - dec, tam ) ; 
                               }
                               
                               if ( (tam >= 12) && (tam <= 14) ){
                                               campo.value = vr.substr( 0, tam - 11 ) + "." + vr.substr( tam - 11, 3 ) + "." + vr.substr( tam - 8, 3 ) + "." + vr.substr( tam - 5, 3 ) + "," + vr.substr( tam - dec, tam ) ; 
                               }
                               
                               if ( (tam >= 15) && (tam <= 17) ){
                                               campo.value = vr.substr( 0, tam - 14 ) + "." + vr.substr( tam - 14, 3 ) + "." + vr.substr( tam - 11, 3 ) + "." + vr.substr( tam - 8, 3 ) + "." + vr.substr( tam - 5, 3 ) + "," + vr.substr( tam - 2, tam ) ;
                               }
                } 
}


function soMoeda(obj){
                qtd = obj.value.length;
                valor = obj.value.replace(/[^0-9.,$]/gi, '');
                if(qtd > 0 && valor == ""){
                               alert('Digite um valor válido.');
                               obj.value = '';
                               obj.focus();
                               return (false);
                }
                else{
                               //obj.value = valor;
                               return (true);
                               
                }
}
