// Copyright (c) 2008. www.englishblinds.co.uk
function numberonly(evt) {
var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode > 31 && (charCode < 48 || charCode > 57))
return false;
return true;
}
function roundit(which){
return Math.round(which*100)/100
}
function mmconvertwidth(){
with (document.getaprice){
widthcm.value=roundit(widthmm.value/10);
widthinch.value=roundit(widthmm.value*0.0393700787);
}
}
function cmconvertwidth(){
with (document.getaprice){
widthmm.value=roundit(widthcm.value*10);
widthinch.value=roundit(widthcm.value/2.54);
}
}
function inchconvertwidth(){
with (document.getaprice){
widthcm.value=roundit(widthinch.value*2.54);
widthmm.value=roundit(widthinch.value*25.4);
}
}
function mmconvertdrop(){
with (document.getaprice){
dropcm.value=roundit(dropmm.value/10);
dropinch.value=roundit(dropmm.value*0.0393700787);
}
}
function cmconvertdrop(){
with (document.getaprice){
dropmm.value=roundit(dropcm.value*10);
dropinch.value=roundit(dropcm.value/2.54);
}
}
function inchconvertdrop(){
with (document.getaprice){
dropcm.value=roundit(dropinch.value*2.54);
dropmm.value=roundit(dropinch.value*25.4);
}
}

