t.getElementById("q3").value);
    }
    else if (inputMode == 2)
    {
        q = new THREE.Quaternion();
        var axis = new THREE.Vector3(document.getElementById("a0").value, 
            document.getElementById("a1").value,
            document.getElementById("a2").value);
        axis.normalize();
        q.setFromAxisAngle(axis, toRad(document.getElementById("a3").value));
    }
    else if (inputMode == 3)
    {
        var axis = new THREE.Vector3(document.getElementById("r0").value, 
          