Custom corners use the technique from Roger Johansson. He describes how to build the graphices on his page "customising_custom_corners_and_borders"
The Moodle implementation does not use JavaScript as describd in Roger Johansson's documentation. Moodle adds all neccessary divs to the pages when the option "$THEME->customcorners = true;" is set in config.php.
A Moodle Theme from Urs Hunkler, unodo.