new js script for switcher.php script