// JavaScript Document
 //document.captureEvents(Event.MOUSEDOWN); 

function Formatear(mnt) { 
mnt = mnt.toFixed(4)
return (mnt);
}


function Calcular(){
  var valor;
  
  valor = document.getElementById('voltios').value;
  
  if (isNaN(valor)){
    alert("El valor del campo ha de ser numérico");
	Limpiar();
  }
  else
  {
	solucion = Formatear(valor*valor/ 3.77);
	document.getElementById('watios').value = solucion;
	
  }
}
  
function prueba(){
	
	
tecla=(document.all) ? event.keyCode : event.which;
if(tecla==13)
  	Calcular();

	
}



function Limpiar(){
   
  document.getElementById('voltios').value = "";
  document.getElementById('watios').value = "";

}




	
				

