/* Released Under GNU3 */
/* Simple Javascript Image Rotator Copyright © 2009 Kris Jonasson www.krisjaydesigns.com */

var images=[ '<a href="http://freemarc.ca" target="_blank"><img src="http://krisjaydesigns.com/wp-content/uploads/2010/08/freemarc.png" alt="Free Marc Emery!" class="latest_img"/></a>', '<a href="http://longbeachrecords.com" target="_blank"><img src="http://krisjaydesigns.com/wp-content/uploads/2010/01/longbeach.records.125px.png" alt="Long Beach Records" class="latest_img"/></a>' ];

function quikChanger( imgArray )

                  {

    var quikMatches, lastImage, newImage, cookieSearch=/myImage=(\d+)/;

      if( typeof( document.cookie )!='undefined' && (quikMatches=document.cookie.match( cookieSearch )) && quikMatches.length>1 )

      if( isNaN( lastImage=parseInt( quikMatches[1], 10) ) ) 

    lastImage = -1;

       while( (newImage=Math.floor(Math.random() * imgArray.length)) == lastImage ); 

       document.cookie="myImage="+newImage;

     return imgArray[ newImage ];

  }
