Call Javascript Function Before Page Load Complete