created a java script function page