get_bloginfo('template_url').'/styles/style_midnight.css', 2 => get_bloginfo('template_url').'/styles/style_red.css', 3 => get_bloginfo('template_url').'/styles/style_black.css', 4 => get_bloginfo('template_url').'/styles/style_blue.css'); $db_defined_style = get_option('aq2_color'); /* This is the name of the cookie. If you change it, you must change the javascript as well. */ $stylecookie = $_COOKIE["simon360_style"]; /* Please be sure to read the readme file before using this script, as it explains in detail how to use it. */ function aq2_links() { switch ($stylecookie) { foreach ($style_array as $stylesheet) { case $casenum: echo ' '; break; $casenum++ } default: echo ' '; break; } } aq2_links(); /* Now we'll define a function that takes a few parameters, and outputs the declaration. */ function extra_options($cname,$stylesheet,$id) { if ($_COOKIE[$cname]==1) { echo ' '; } } /* If you wanted to add a new switch for a with the ID "foo", the cookie the switch named "bar", and a stylesheet named "foobar.css", for example, you would simply type extra_options("bar","foobar.css","foo") This would write out the in your header (or wherever the function is placed, but header is recommended), and the javascript provided would work for that ID and cookie. */ ?>