<!-- put in head section -->
<!-- CALL TO SIFR STUFF-->
<link rel="stylesheet" href="/sifr/sIFR-screen.css" type="text/css" media="screen" />
<link rel="stylesheet" href="/sifr/sIFR-print.css" type="text/css" media="print" />
<script src="/sifr/sifr.js" type="text/javascript"></script>
<script src="/sifr/sifr-addons.js" type="text/javascript"></script>

<!-- MAIN STYLE SHEET -->
<link rel="stylesheet" href="<?php echo get_settings('siteurl'?>/wp-content/themes/themname/style.css" type="text/css" media="screen" />
<?php 

if (isset($_COOKIE["color"]))
// if the color cookie is set, grab the appropriate style sheet for it
    
{
    if (
$_COOKIE["color"] =="BLUE") {
    
?>
    <link rel="stylesheet" href="<?php echo get_settings('siteurl'?>/wp-content/themes/themename/blue.css" type="text/css" media="screen" />
    <?php
    
} else if ($_COOKIE["color"] =="GREEN") {
    
?>
    <link rel="stylesheet" href="<?php echo get_settings('siteurl'?>/wp-content/themes/themename/green.css" type="text/css" media="screen" />
    <?php
    
    
} else if ($_COOKIE["color"] =="PINK") {
    
?>
    <link rel="stylesheet" href="<?php echo get_settings('siteurl'?>/wp-content/themes/themename/pink.css" type="text/css" media="screen" />
    <?php
    
}
        
    } else {
//the color cookie isn't set, so let's randomly choose
$server get_settings('siteurl');
#this is your file
$file $server."/wp-content/themes/themename/colors.txt";
#open the file
$fp file($file);
#generate a random number
srand((double)microtime()*1000000);
#get one of the entries in the file

$random_color $fp[array_rand($fp)];
$random_color str_replace("%0A"""$random_color);
#display the entry
// which color are we going to use for the color cookie
if (strstr($random_color"BLUE")) 
    
$make_color "BLUE";
if (
strstr($random_color"GREEN")) 
    
$make_color "GREEN";
if (
strstr($random_color"PINK")) 
    
$make_color "PINK";
    
$GLOBALS[$jscript_color] = $random_color;

// set the color cookie color
setcookie("color"$make_color);
//echo $make_color;

// set initial colors based on the random color we just set as the style sheet won't load until next time
if (strstr($random_color"BLUE")) 
    
$change_color "06a1c9"
else if (
strstr($random_color"GREEN")) 
    
$change_color "9dac00"
else if (
strstr($random_color"PINK")) 
    
$change_color "cf175e";
    

?>
    <style type="text/css">
        body { background: #<?php echo $change_color?>; }
        h1 { color: #<?php echo $change_color?>; }    
        h3 { color: #<?php echo $change_color?>; }
        h3 a { color: #<?php echo $change_color?>; }
        h3 a:visited { color: #<?php echo $change_color?>; }
        a { color: #<?php echo $change_color?>; } 
        a:visited { color: #<?php echo $change_color?>; }
        a:hover { color: #<?php echo $change_color?>; }
        .meta a { color: #<?php echo $change_color?>; }
        .feedback a { color: #<?php echo $change_color?>; }
    </style>
<?php
    
}
?>
<!-- end put in head section -->

<!-- place at bottom of page before /body tag -->
<script type="text/javascript">
            //<![CDATA[
            /* Replacement calls. Please see documentation for more information. */
<?php
    
if (isset($_COOKIE["color"]))
// if the color cookie is set, grab the appropriate style sheet for it
    
{
    if (
$_COOKIE["color"] =="BLUE") {
    
?>
    if(typeof sIFR == "function"){
            sIFR.replaceElement(named({sSelector:"body h1", sFlashSrc:"http://www.yoursitenamehere/sifr/sifr.swf", sColor:"#06a1c9", sLinkColor:"#06a1c9", sBgColor:"#000000", sHoverColor:"#CCCCCC", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left&offsetTop=0"}));    
            };
    <?php
    
} else if ($_COOKIE["color"] =="GREEN") {
    
?>
    if(typeof sIFR == "function"){
            sIFR.replaceElement(named({sSelector:"body h1", sFlashSrc:"http://www.yoursitenamehere/sifr/sifr.swf", sColor:"#9dac00", sLinkColor:"#9dac00", sBgColor:"#000000", sHoverColor:"#CCCCCC", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left&offsetTop=0"}));    
            };
    <?php
    
    
} else if ($_COOKIE["color"] =="PINK") {
    
?>
    if(typeof sIFR == "function"){
            sIFR.replaceElement(named({sSelector:"body h1", sFlashSrc:"http://www.yoursitenamehere/sifr/sifr.swf", sColor:"#cf175e", sLinkColor:"#cf175e", sBgColor:"#000000", sHoverColor:"#CCCCCC", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left&offsetTop=0"}));    
            };
    <?php
    
}
        
    } else {
    
$random_color $GLOBALS[$random_color];
    
    if (
strstr($random_color"BLUE")) 
    
$change_color "06a1c9"
else if (
strstr($random_color"GREEN")) 
    
$change_color "9dac00"
else if (
strstr($random_color"PINK")) 
    
$change_color "cf175e";
    
?>
    if(typeof sIFR == "function"){
            sIFR.replaceElement(named({sSelector:"body h1", sFlashSrc:"http://www.yoursitenamehere/sifr/sifr.swf", sColor:"<?php echo $change_color;?>", sLinkColor:"<?php echo $change_color;?>", sBgColor:"#000000", sHoverColor:"#CCCCCC", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left&offsetTop=0"}));    
    };
    <?
    
    
}
    
?>        
            //]]>
    </script>
    <!-- end place at bottom of page before /body tag -->