function calc(input) {
var txt="";
var aa=(input.a.value);
var bb=(input.b.value);
if (input.a.value == "" && input.b.value == "") {
txt = "";
input.a.value = txt;
input.b.value = txt;
}

if (input.a.value != "" && input.b.value == "") {
var txt = parseInt((1/aa)*1000000)/100
input.b.value = txt;
}

if (input.a.value == "" && input.b.value != "") {
var txt = parseInt((1/bb)*100000)/10
input.a.value = txt;
}
}

function clrtxt(input) {
	input.a.value="";	
	input.b.value="";
}


var xx="";
var commandstring="";
function showframe(xx)  {
	if (xx == 3) {
	commandstring = "restore orientation; center; frame 7; vibration scale 0.4; vibration on;"
}else{
	if (xx == 2) {
	commandstring = "restore orientation; center; frame 6; vibration scale 0.4; vibration on;"
}else{
	if (xx == 5) {
	commandstring = "restore orientation; center; frame 5; vibration scale 0.8; vibration on;"
}else{
	if (xx == 4) {
	commandstring = "restore orientation; center; frame 4; vibration scale 0.4; vibration on;"
}else{
	if (xx == 6) {
	commandstring = "restore orientation; center; frame 2; rotate y 70; vibration scale 0.4; vibration on;"
}else{
	if (xx == 7) {
	commandstring = "restore orientation; center; frame 3; vibration scale 0.4; vibration on;"
}else{
	if (xx == 10) {
	commandstring = "wireframe 50; spacefill 90; "
}else{
	if (xx == 11) {
	commandstring = "spacefill 70%"
}else{
	if (xx == 12) {
	commandstring = " spacefill 1% "
}else{
	if (xx == 13) {
	commandstring = "vibration off"

}}}}}}}}}}

	document.jmol.script(commandstring);		
	}

