﻿// Java Script functions for displaying Stock Quotes in Public Footer page

function BuildStock(c,l,i,j){
      this.copy = c;
      this.link = l;
      this.img = i;
      this.title = j;
      this.write = writeStockInfo;
   }

function writeStockInfo(){
      var str = '';
      str += '<a href="'+'http://' + this.link +  '" Target=_blank title = '+ this.title +'>';
     str += this.copy ;
	  str += '<img border="0" src="' + 
         this.img.src + '"></a>';
      str +=  '<a href="'  +this.link + '">' + 
         '</a>';
      return str;
   }
var UpImg = new Image();
   UpImg.src = 'images/icons/StockQuoteUp.gif';
   var DownImg = new Image();
   DownImg.src = 'images/icons/StockQuoteDown.gif';
     var EvenImg = new Image();
   EvenImg.src = 'images/icons/Even-Line.gif';
   
  function PauseStockTicker() {
      if (timerID != null) {
         clearTimeout(timerID);
         timerID = null;
         
      }
   }
   
   function ResumeStockTicker() {
      if (timerID == null) {
         timerID = setTimeout('RotateStocks()', 1000);
      }
   }