Moved code out of doc ready into functions

Moved the code to prevent return from submitting forms and the code to calculate the diameter on the fly to thier own functions that are called from document ready. The functions are: "preventFormSubmitWithReturn()" and "circumferanceToDiameter()".