//IE does not recognixe indexof so we are including this function so it works
if (!Array.prototype.indexOf)   
{   
  Array.prototype.indexOf = function(elt /*, from*/)   
  {   
    var len = this.length >>> 0;   
     var from = Number(arguments[1]) || 0;   
    from = (from < 0)   
         ? Math.ceil(from)   
         : Math.floor(from);   
    if (from < 0)   
      from += len;   
    for (; from < len; from++)   
    {   
      if (from in this &&   
          this[from] === elt)   
        return from;   
    }   
    return -1;   
  };   
}  



var numofcharALL=9999; /*initial length to shorten quote to normally 130.  must be set to 9999 for unlimited.*/
var numofchartempALL=numofcharALL;
var whichALL;
var quotenum=0;
var alreadyshown=[];


function rotateALL(){
		for(var t=Quotation.length-1; quotenum<=t; ) {
			   whichALL = Math.round(Math.random()*(Quotation.length - 1));
if(alreadyshown.indexOf('|'+whichALL+'|') == -1){
alreadyshown[quotenum]='|'+quotenum+'|'; 
		numofchartempALL=numofcharALL;
/*		for(var x=0; x==0; ) {
		if((Quotation[whichALL].charAt(numofchartempALL)==' ')&&(Quotation[whichALL].charAt(numofchartempALL-1)!=',')){
		x=1;
			}else{
		numofchartempALL--;
		 }
       }
*/
        document.getElementById('textrotatorALL'+quotenum).innerHTML = '<a name="'+whichALL+'"></a><div class="quote-wrap" style="background:none;"><blockquote cite="#"><q>' + Quotation[whichALL].substr(0,numofchartempALL) + '</q> &nbsp;<span class="closing-quote">&nbsp;</span><br /><span class="name" style="margin-top:3px;">' + QuotationName[whichALL] + '</span></blockquote></div>';
alreadyshown[quotenum]='|'+whichALL+'|';
quotenum++;
		/*alert(Quotation[whichALL].length + '    ' + numofchartempALL);*/
		}
		}
}
   
