original version from http://www.geodata.soton.ac.uk/software/php_clearsilver/