
<!--------------BANNERAD define images and link----------------------
   	var bannerAD=new Array();
   	var bannerADlink=new Array();
  	var adNum=0;
   	//bannerAD[0]="images/inniskillin.jpg";
   	//bannerADlink[0]="http://www.inniskillin.com";
	bannerAD[0]="images/ARC_home_11jan07.jpg";
   	bannerADlink[0]="http://www.arc2007.com";
   	bannerAD[1]="images/190x538_purewhite.jpg";
   	bannerADlink[1]="http://www.esteelauder.com";
	//bannerAD[2]="images/EL_pleasures_190x5381.jpg";
   	//bannerADlink[2]="http://www.esteelauder.com";
   	bannerAD[2]="images/Fabris_lane_ani_mar07.gif";
   	bannerADlink[2]="http://www.moodiereport.com/fabrislane_page_2006.htm";
   	bannerAD[3]="images/Hendricks_8.JPG";
   	bannerADlink[3]="http://www.hendricksgin.com";

<!--------------BANNERAD 2 define images and link---------------------
	var bannerAD2=new Array();
   	var bannerADlink2=new Array();
   	var adNum2=0;
   	bannerAD2[0]="images/190x538_purewhite.jpg";
   	bannerADlink2[0]="http://www.esteelauder.com";
   	bannerAD2[1]="images/PE_Moodie_A07-0220.gif";
   	bannerADlink2[1]="http://www.pellericewine.com/";

<!-------------BANNERAD controll function------------------------------
   var preloadedimages=new Array();
   for (i=1;i<bannerAD.length;i++)
   {
      preloadedimages[i]=new Image();
      preloadedimages[i].src=bannerAD[i];
   }



	function setTransition()
	{
   		if (document.all)
		{
      		bannerADrotator.filters.revealTrans.Transition=Math.floor(5);
      		bannerADrotator.filters.revealTrans.apply();
   		}
	}


	function playTransition()
	{
   		if (document.all)
     		 bannerADrotator.filters.revealTrans.play();
	}

	function nextAd()
	{
		//if(adNum<bannerAD.length-1)adNum++ ;
      	//else adNum=0;
		
		adNum	=	get_random( bannerAD.length );
		//alert( adNum );
   		setTransition();
		document.images.bannerADrotator.src=bannerAD[adNum];
   		playTransition();
   		theTimer=setTimeout("nextAd()", 15000);
	}


	function jump2url()
	{
  		jumpUrl=bannerADlink[adNum];
		jumpTarget='_blank';
   			if (jumpUrl != '')
			{
				 if (jumpTarget != '')window.open(jumpUrl,jumpTarget);
				 else location.href=jumpUrl;
			 }
	}

	function displayStatusMsg()
	{ 
  		status=bannerADlink[adNum];
   		document.returnValue = true;
	}

	function get_random( length )
	{
    	var ranNum= Math.floor(Math.random()*length);
    	return ranNum;
	}


<!------------BannerAD 2 Controll Function----------------------------------





   var preloadedimages2=new Array();

   for (i=1;i<bannerAD2.length;i++){

      preloadedimages2[i]=new Image();

      preloadedimages2[i].src=bannerAD2[i];

   }



function setTransition2(){

   if (document.all){

//      bannerADrotator.filters.revealTrans.Transition=Math.floor(Math.random()*23);

      bannerADrotator2.filters.revealTrans.Transition=Math.floor(5);

      bannerADrotator2.filters.revealTrans.apply();
   }

}
function playTransition2(){
   if (document.all)
      bannerADrotator2.filters.revealTrans.play()
}

function nextAd2(){
   if(adNum2<bannerAD2.length-1)adNum2++ ;
      else adNum2=0;
  setTransition2();
   document.images.bannerADrotator2.src=bannerAD2[adNum2];
   playTransition2();
   theTimer2=setTimeout("nextAd2()", 10000);
}

function jump2url2(){
   jumpUrl2=bannerADlink2[adNum2];
   jumpTarget2='_blank';
   if (jumpUrl2 != ''){
      if (jumpTarget2 != '')window.open(jumpUrl2,jumpTarget2);
      else location.href=jumpUrl2;
   }
}
function displayStatusMsg2() { 
   status2=bannerADlink2[adNum2];
   document.returnValue = true;
}

//-->

<!-----------Ticker Controll----------------------------------
	var theCharacterTimeout = 50;
	var theStoryTimeout     = 5000;
	var theWidgetOne        = "_";
	var theWidgetTwo        = "-";
	var theWidgetNone       = "";
	
	//News Ticker variable
	var theLeadString       = "LATEST:&nbsp;";
	var theSummaries = new Array();
	var theSiteLinks = new Array();
	var theItemCount = 4;
	
	//Stock Ticker variables
	var theLeadStringStock      = "STOCK:&nbsp;";
	var theSummariesStock 		= new Array();
	var theSiteLinksStock 		= new Array();
	var theStorySummaryStock	=	new Array();
	var theItemCountStock 		= 10;
	
	
<!-------------------------------------------------------------


function startTicker()
{
	// Define run time values
	theCurrentStory     = -1;
	theCurrentLength    = 0;
	// Locate base objects
	if (document.getElementById) {	
		    theAnchorObject     = document.getElementById("tickerAnchor");
			runTheTicker();   	
		 }
	else {
            document.write("<style>.ticki{display:none;}.ticko{border:0px; padding:0px;}</style>");
            return true;
	}
}

// Ticker main run loop
function runTheTicker()
{
	var myTimeout;  
	// Go for the next story data block
	if(theCurrentLength == 0)
	{
		theCurrentStory++;
		theCurrentStory      = theCurrentStory % theItemCount;
		theStorySummary      = theSummaries[theCurrentStory].replace(/&quot;/g,'"');		
		theTargetLink        = theSiteLinks[theCurrentStory];
		theAnchorObject.href = theTargetLink;
		thePrefix 	     = "<span class=\"latest\">" + theLeadString + "</span>";
	}
	// Stuff the current ticker text into the anchor
	theAnchorObject.innerHTML = thePrefix + 
	theStorySummary.substring(0,theCurrentLength) + whatWidget();
	// Modify the length for the substring and define the timer
	if(theCurrentLength != theStorySummary.length)
	{
		theCurrentLength++;
		myTimeout = theCharacterTimeout;
	}
	else
	{
		theCurrentLength = 0;
		myTimeout = theStoryTimeout;
	}
	// Call up the next cycle of the ticker
	setTimeout("runTheTicker()", myTimeout);
}

// Widget generator
function whatWidget()
{
	if(theCurrentLength == theStorySummary.length)
	{
		return theWidgetNone;
	}

	if((theCurrentLength % 2) == 1)
	{
		return theWidgetOne;
	}
	else
	{
		return theWidgetTwo;
	}
}

//Stock Ticker Function 

function startTickerStock()
{
	// Define run time values
	theCurrentStoryStock     = -1;
	theCurrentLengthStock    = 0;
	// Locate base objects
	if (document.getElementById) {	
		    theAnchorObjectStock     = document.getElementById("tickerAnchorStock");
			runTheTickerStock();   	
			
		 }
	else {
            document.write("<style>.ticki{display:none;}.ticko{border:0px; padding:0px;}</style>");
            return true;
	}
}


function runTheTickerStock()
{
	var myTimeoutStock;  
	// Go for the next story data block
	if(theCurrentLengthStock == 0)
	{
		theCurrentStoryStock++;
		theCurrentStoryStock      = theCurrentStoryStock % theItemCountStock;
		if(isset(theSummariesStock[theCurrentStoryStock])){
			theStorySummaryStock      = theSummariesStock[theCurrentStoryStock].replace(/&quot;/g,'"');	
		}else{
			theStorySummaryStock		= '';
		}
		
			theTargetLinkStock        = theSiteLinksStock[theCurrentStoryStock];
		if( theAnchorObjectStock != null)
		 theAnchorObjectStock.href = theTargetLinkStock;
		
		thePrefixStock 	     = "<span class=\"bluetxtlnknormhover\">" + theLeadStringStock + "</span>";
	}
	// Stuff the current ticker text into the anchor
	if( theAnchorObjectStock != null){
		theAnchorObjectStock.innerHTML = thePrefixStock + 
		theStorySummaryStock.substring(0,theCurrentLengthStock) + whatWidgetStock();
	}
	// Modify the length for the substring and define the timer
	if(theCurrentLengthStock != theStorySummaryStock.length)
	{
		theCurrentLengthStock++;
		myTimeoutStock = theCharacterTimeout;
	}
	else
	{
		theCurrentLengthStock = 0;
		myTimeoutStock = theStoryTimeout;
	}
	// Call up the next cycle of the ticker
	setTimeout("runTheTickerStock()", myTimeoutStock);
}

function isset(varname)  {
	  if(typeof( window[ varname ] ) != "undefined") return true;
	  else return false;
	}

function whatWidgetStock()
{
	if(theCurrentLengthStock == theStorySummaryStock.length)
	{
		return theWidgetNone;
	}

	if((theCurrentLengthStock % 2) == 1)
	{
		return theWidgetOne;
	}
	else
	{
		return theWidgetTwo;
	}
}










