Bugfix to use skin variable
Use global $body_onload_func variable to set function to header