
// CSS switcher to replace header background image

// This loads a random stylesheet from a series named "layout-header-x" where "x" is an integer
// generated by the 'RandCSS' function. For tis build I have included up to 8 random headers.
// Simply change the number in the function below to have less or more

// You need to place this javascript include after the stylesheet includes in the head area of the html
// <script language="JavaScript" src="/js/css_switcher.js" type="text/javascript"></script>

// Finally, make a series of CSS files in the /css directory equal to the number of random
// instances you wish to create, and point the background-image attribute to a different background
// image for each one (in /images/global/layout)

RandCSS()
function RandCSS() {
a = Math.round(Math.random() * 8 + 1)
if (a > 8) { RandCSS() } else { WriteCSS() }
}

function WriteCSS() {
document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"/css/layout-header-" + a + ".css\">")
}