1. Is there some php code to detect in the correct way? as I understand <?php echo $_SERVER['DOCUMENT_ROOT']; ?> will always work from PHP 4.1.0 version. The script above depends on "register_globals" being "On" (in that case you'd better turn it Off) Is this true? 2. How to set class or ID attribute of that element in the correct way?