javascript Calculate Module