as i said just use the same script you are using except use a different dir like http://yoursite.com/theme1
and just link them together at bottom of index.php for example using this
echo "<a href=\"http://yoursite.com/theme1/index.php&sid=$sid\">theme name goes here</a>
";
echo "<a href=\"http://yoursite.com/theme2/index.php&sid=$sid\">theme name goes here</a>
";
or something like that anyway thats the easiest way i can think of