<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1033120" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1033120</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/preloading-random-images-javascript#comment-1193784</link>
    <description> &lt;p&gt;Ok I see what you mean about load time!&lt;/p&gt;
&lt;p&gt;I see a potential for 2 different scripts here. One, you can code your homepage html to show a different employee image on each page load/refresh with a script like:&lt;/p&gt;
&lt;p&gt;&amp;lt;script language=&quot;JavaScript&quot; type=&quot;text/javascript&quot;&amp;gt;&lt;br /&gt;
var ic = 6; // Number of alternative images&lt;br /&gt;
var xoxo = new Array(ic); // Array to hold filenames&lt;br /&gt;
xoxo[0] = &quot;http://www.yoursite.com/graphic1.gif&quot;;&lt;br /&gt;
xoxo[1] = &quot;http://www.yoursite.com/graphic2.gif&quot;;&lt;br /&gt;
xoxo[2] = &quot;http://www.yoursite.com/graphic3.gif&quot;;&lt;br /&gt;
xoxo[3] = &quot;http://www.yoursite.com/graphic4.gif&quot;;&lt;br /&gt;
xoxo[4] = &quot;http://www.yoursite.com/graphic5.gif&quot;;&lt;br /&gt;
xoxo[5] = &quot;http://www.yoursite.com/graphic6.gif&quot;;&lt;br /&gt;
function pickRandom(range)&lt;br /&gt;
{ if (Math.random) return Math.round(Math.random() * (range-1));&lt;br /&gt;
else { var now = new Date(); return (now.getTime() / 1000) % range; } } // Write out an IMG tag using a randomly-chosen image name.&lt;br /&gt;
var choice = pickRandom(ic); // --&amp;gt; &amp;lt;/script&amp;gt;&lt;/p&gt;
&lt;p&gt;Then, you can &quot;post load&quot; the rollover images, or any other image your users will definitely need to load that they don&#039;t right away on the home page. This allows you to load all the images needed for people to view your home page, and only THEN start loading the rollover images after that&#039;s done:&lt;/p&gt;
&lt;p&gt;  function postLoad(){&lt;br /&gt;
    if(!window.name.match(/preLoad.complete/gi)){&lt;br /&gt;
     var images = new Array(&#039;images/yourimage1.gif&#039;,&lt;br /&gt;
				      &#039;images/yourimage2.jpg&#039;,&lt;br /&gt;
				      &#039;images/yourimage3.gif&#039;,&lt;br /&gt;
				      &#039;images/yourimage4.jpg&#039;); &lt;/p&gt;
&lt;p&gt;     var loader = new Array();&lt;br /&gt;
      for(var i=0; i&lt;/p&gt;
 </description>
     <pubDate>Tue, 21 Feb 2006 15:27:21 +0000</pubDate>
 <dc:creator>bgogol</dc:creator>
 <guid isPermaLink="false">comment 1193784 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/preloading-random-images-javascript#comment-1193768</link>
    <description> &lt;p&gt;I believe that, on your site, you should be able to just take out the function FP_preloadImgs() [That would be the line that says &#039;function FP_preloadImgs()&#039; and the three lines below it] as well as the call to that function in the body tag [in other words, you can delete onload=&quot;FP_preloadImgs(/*url*/&#039;Images/New%20Buttons/button15.jpg&#039;, /*url*/&#039;Images/New%20Buttons/button16.jpg&#039;, /*url*/&#039;Images/New%20Buttons/button1B.jpg&#039;, /*url*/&#039;Images/New%20Buttons/button1C.jpg&#039;, /*url*/&#039;Images/New%20Buttons/button1E.jpg&#039;, /*url*/&#039;Images/New%20Buttons/button1F.jpg&#039;, /*url*/&#039;Images/New%20Buttons/button21.jpg&#039;, /*url*/&#039;Images/New%20Buttons/button22.jpg&#039;, /*url*/&#039;Images/New%20Buttons/button24.jpg&#039;, /*url*/&#039;Images/New%20Buttons/button25.jpg&#039;, /*url*/&#039;Images/New%20Buttons/button27.jpg&#039;, /*url*/&#039;Images/New%20Buttons/button28.jpg&#039;, /*url*/&#039;Images/New%20Buttons/button2A.jpg&#039;, /*url*/&#039;Images/New%20Buttons/button2B.jpg&#039;, /*url*/&#039;Images/New%20Buttons/button2D.jpg&#039;, /*url*/&#039;Images/New%20Buttons/button2E.jpg&#039;)&quot;].&lt;/p&gt;
&lt;p&gt;I haven&#039;t tested it, but that should work.&lt;/p&gt;
 </description>
     <pubDate>Tue, 21 Feb 2006 13:25:40 +0000</pubDate>
 <dc:creator>timjpriebe</dc:creator>
 <guid isPermaLink="false">comment 1193768 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/preloading-random-images-javascript#comment-1193584</link>
    <description> &lt;p&gt;if you use dreamweaver to add rollover images, there will be a javascript for preload in the header and the onLoad command is in the  tag. When you remove all the rollover instances from your page, DW removes all the code.&lt;/p&gt;
 </description>
     <pubDate>Sat, 18 Feb 2006 06:57:55 +0000</pubDate>
 <dc:creator>DaveyBoy</dc:creator>
 <guid isPermaLink="false">comment 1193584 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
