<?xml version="1.0" encoding="UTF-8"?>
<post>
  <body>Here its a very easy tutorial of how to make a image randomizer for your banner or even backgrounds i think.

I hope it helps someone.

CSS:

/* Start of CSS */

#tbanner {
width:800px; /* Set your width */
height:218px; /* Set your height */
display:block;
background-image:url(../images/yourimage.jpg); 
float:left; /* May or not be required */
}

/* End of CSS */

And your script inside the body tag of the html page:

&lt;img src="http://i37.tinypic.com/a3pd2r.jpg" /&gt;

&lt;img src="http://i38.tinypic.com/ws04y8.jpg" /&gt;

&lt;script type="text/javascript"&gt;

var banner= new Array()

banner[0]="http://www.yourpage.com/images/image0.jpg"
banner[1]="http://www.yourpage.com/images/image1.jpg"
banner[2]="http://www.yourpage.com/images/image2.jpg"
banner[3]="http://www.yourpage.com/images/image3.jpg"
banner[4]="http://www.yourpage.com/images/image4.jpg"
&lt;!-- You can add more images with the same format --&gt;
var random=Math.round(4*Math.random()); 

&lt;img src="http://i34.tinypic.com/2ngeykz.jpg" /&gt;

&lt;/script&gt;

&lt;img src="http://i38.tinypic.com/2ntk6ed.jpg" /&gt;

&lt;img src="http://i37.tinypic.com/a3pd2r.jpg" /&gt;


You can see the example here: &lt;a href="http://www.themetalhand.com/blog/"&gt;http://www.themetalhand.com/blog/&lt;/a&gt;

</body>
  <commented-at type="datetime">2009-10-08T16:56:02-04:00</commented-at>
  <comments-count type="integer">5</comments-count>
  <created-at type="datetime">2009-10-08T15:18:08-04:00</created-at>
  <disabled-at type="datetime" nil="true"></disabled-at>
  <flaggable type="boolean">true</flaggable>
  <flags-count type="integer">0</flags-count>
  <id type="integer">86451</id>
  <is-closed type="boolean">false</is-closed>
  <is-sticky type="boolean">false</is-sticky>
  <last-commenter-id type="integer">67</last-commenter-id>
  <person-id type="integer">6279</person-id>
  <post-category-id type="integer">1</post-category-id>
  <title>Banner or Background Randomizer</title>
  <updated-at type="datetime">2009-11-21T15:16:01-05:00</updated-at>
  <views-count type="integer">211</views-count>
  <comments type="array">
    <comment>
      <body>I don't know to much of javascript but it might be some things that you can edit from the code.</body>
      <commentable-id type="integer">86451</commentable-id>
      <commentable-type>Post</commentable-type>
      <created-at type="datetime">2009-10-08T15:26:56-04:00</created-at>
      <id type="integer">2783131</id>
      <person-id type="integer">6279</person-id>
      <updated-at type="datetime">2009-10-08T15:26:56-04:00</updated-at>
    </comment>
    <comment>
      <body>Sorry, uploaded this file with the code so it could be more easy:
&lt;a href="http://www.mediafire.com/?sharekey=e970850faa6fce2ab64026cfc0611236e04e75f6e8ebb871"&gt;Get Code Here&lt;/a&gt;

I have to go soon, but if you still got doubts email me.</body>
      <commentable-id type="integer">86451</commentable-id>
      <commentable-type>Post</commentable-type>
      <created-at type="datetime">2009-10-08T16:11:51-04:00</created-at>
      <id type="integer">2783461</id>
      <person-id type="integer">6279</person-id>
      <updated-at type="datetime">2009-10-08T16:12:47-04:00</updated-at>
    </comment>
    <comment>
      <body>I wrote one of these in php that all you have to do is upload the files you want to randomize into a folder. Yours works too though, just don't have to type out all the items of the array.

If anyone wants it let me know, I can zip it up and upload it.</body>
      <commentable-id type="integer">86451</commentable-id>
      <commentable-type>Post</commentable-type>
      <created-at type="datetime">2009-10-08T16:39:06-04:00</created-at>
      <id type="integer">2783831</id>
      <person-id type="integer">1140</person-id>
      <updated-at type="datetime">2009-10-08T16:39:06-04:00</updated-at>
    </comment>
    <comment>
      <body>&lt;blockquote&gt;&lt;cite&gt;a killer wombat said:&lt;/cite&gt; I wrote one of these in php that all you have to do is upload the files you want to randomize into a folder. Yours works too though, just don't have to type out all the items of the array.

If anyone wants it let me know, I can zip it up and upload it.&lt;/blockquote&gt;


That could be vey welcome :)</body>
      <commentable-id type="integer">86451</commentable-id>
      <commentable-type>Post</commentable-type>
      <created-at type="datetime">2009-10-08T16:49:31-04:00</created-at>
      <id type="integer">2783991</id>
      <person-id type="integer">6279</person-id>
      <updated-at type="datetime">2009-10-08T16:49:46-04:00</updated-at>
    </comment>
    <comment>
      <body>does anyone else keep reading "boner or background randomizer"?</body>
      <commentable-id type="integer">86451</commentable-id>
      <commentable-type>Post</commentable-type>
      <created-at type="datetime">2009-10-08T16:56:02-04:00</created-at>
      <id type="integer">2784061</id>
      <person-id type="integer">67</person-id>
      <updated-at type="datetime">2009-10-08T16:56:02-04:00</updated-at>
    </comment>
  </comments>
</post>
