Adding function.js file
defining javascript function
a function to find the cartisean points distance