i have an aplicattion with two forms, both forms use the same function to calculate some values, and same variables too.

1.- Where and how i can define the function
2.- Where and how i can declare a variable for two forms



TIA