﻿var howOften = 8; //how often (in seconds) to rotate
var current = 0;
var ns6 = document.getElementById&&!document.all;

// place images and text in corresponding arrays below
var images = new Array();
    images[0]="<img src='merchants/carribAmph_sm.jpg' alt='Caribbean Amphibian' width='127' height='126' border='0' />";
    images[1]="<img src='merchants/celticShop_sm.jpg' alt='Celtic Shop' width='127' height='126' border='0' />";
    images[2]="<img src='merchants/crescentMoon_sm.jpg' alt='Crescent Moon' width='127' height='126' border='0' />";
    images[3]="<img src='merchants/revolution9_sm.jpg' alt='Revolution 9' width='127' height='126' border='0' />";
    images[4]="<img src='merchants/youAreSunshine_sm.jpg' alt='You Are My Sunshine' width='127' height='126' border='0' />";
	images[5]="<img src='merchants/basicsGourmet_sm.jpg' alt='The Basics Gourmet Soul' width='127' height='126' border='0' />";
	images[6]="<img src='merchants/cfFootwear_sm.jpg' alt='Cape Fear Footwear' width='127' height='126' border='0' />";
	images[7]="<img src='merchants/caravanBeads_sm.jpg' alt='Caravan Beads' width='127' height='126' border='0' />";
	images[8]="<img src='merchants/downToEarth_sm.jpg' alt='Down To Earth' width='127' height='126' border='0' />";
	images[9]="<img src='merchants/elizabeths_sm.jpg' alt='Elizabeths Ladies Boutique' width='127' height='126' border='0' />";
	images[10]="<img src='merchants/emorys_sm.jpg' alt='Emorys Crystals' width='127' height='126' border='0' />";
	images[11]="<img src='merchants/fiddlers_sm.jpg' alt='Fidlers Gallery/Wrigleys Clocks' width='127' height='126' border='0' />";
	images[12]="<img src='merchants/fireSpice_sm.jpg' alt='Fire &amp; Spice' width='127' height='126' border='0' />";
	images[13]="<img src='merchants/germanCafe_sm.jpg' alt='The German Cafe' width='127' height='126' border='0' />";
	images[14]="<img src='merchants/goldenGallery_sm.jpg' alt='Golden Gallery' width='127' height='126' border='0' />";
	images[15]="<img src='merchants/hummingbird_sm.jpg' alt='Hummingbird Station' width='127' height='126' border='0' />";
	images[16]="<img src='merchants/javaDog_sm.jpg' alt='Java Dog' width='127' height='126' border='0' />";
	images[17]="<img src='merchants/justHolidays_sm.jpg' alt='Just for the Holidays' width='127' height='126' border='0' />";
	images[18]="<img src='merchants/occasions_sm.jpg' alt='Occcasions Just Write' width='127' height='126' border='0' />";
	images[19]="<img src='merchants/paddys_sm.jpg' alt='Paddys Hollow' width='127' height='126' border='0' />";
	images[20]="<img src='merchants/portCityPottery_sm.jpg' alt='Port City Pottery &amp; Fine Crafts' width='127' height='126' border='0' />";
	images[21]="<img src='merchants/pureLife_sm.jpg' alt='Pure Life Health' width='127' height='126' border='0' />";
	images[22]="<img src='merchants/tsBrown_sm.jpg' alt='TS Brown Jewelry' width='127' height='126' border='0' />";
	images[23]="<img src='merchants/topToad_sm.jpg' alt='Top Toad' width='127' height='126' border='0' />";
	images[24]="<img src='merchants/twoSisters_sm.jpg' alt='Two Sisters Bookery' width='127' height='126' border='0' />";
	images[25]="<img src='merchants/scoop_sm.jpg' alt='The Scoop' width='127' height='126' border='0' />";

    
var text = new Array();
    text[0]="<p>Carribean Amphibian</p><p><a href='merchants_caribAmph.asp'>view info &gt;</a></p>";    
    text[1]="<p>Celtic Shop</p><p><a href='merchants_celticShop.asp'>view info &gt;</a></p>";
    text[2]="<p>Crescent Moon</p><p><a href='merchants_crescentMoon.asp'>view info &gt;</a></p>";  
    text[3]="<p>Revolution 9</p><p><a href='merchants_rev9.asp'>view info &gt;</a></p>";  
    text[4]="<p>You Are My Sunshine</p><p><a href='merchants_youAreSunshine.asp'>view info &gt;</a></p>";
	text[5]="<p>The Basics Gourmet Soul</p><p><a href='merchants_basicGourmet.asp'>view info &gt;</a></p>";
	text[6]="<p>Cape Fear Footwear</p><p><a href='merchants_cfFootwear.asp'>view info &gt;</a></p>";
	text[7]="<p>Caravan Beads</p><p><a href='merchants_caravanBeads.asp'>view info &gt;</a></p>";
	text[8]="<p>Down to Earth</p><p><a href='merchants_downToEarth.asp'>view info &gt;</a></p>";
	text[9]="<p>Elizabeth's Ladies Boutique</p><p><a href='merchants_elizabeths.asp'>view info &gt;</a></p>";
	text[10]="<p>Emory's Crystals</p><p><a href='merchants_emorys.asp'>view info &gt;</a></p>";
	text[11]="<p>Fidler's Gallery/Wrigley's Clocks</p><p><a href='merchants_fidlers.asp'>view info &gt;</a></p>";
	text[12]="<p>Fire &amp; Spice</p><p><a href='merchants_fireSpice.asp'>view info &gt;</a></p>";
	text[13]="<p>The German Cafe</p><p><a href='merchants_germanCafe.asp'>view info &gt;</a></p>";
	text[14]="<p>Golden Gallery</p><p><a href='merchants_goldenGallery.asp'>view info &gt;</a></p>";
	text[15]="<p>Hummingbird Station</p><p><a href='merchants_hummingbird.asp'>view info &gt;</a></p>";
	text[16]="<p>Java Dog</p><p><a href='merchants_javaDog.asp'>view info &gt;</a></p>";
	text[17]="<p>Just for the Holidays</p><p><a href='merchants_justHolidays.asp'>view info &gt;</a></p>";
	text[18]="<p>Occasions...Just Write</p><p><a href='merchants_occasions.asp'>view info &gt;</a></p>";
	text[19]="<p>Paddy's Hollow</p><p><a href='merchants_paddys.asp'>view info &gt;</a></p>";
	text[20]="<p>Port City Pottery &amp; Fine Crafts</p><p><a href='merchants_pcPottery.asp'>view info &gt;</a></p>";
	text[21]="<p>Pure Life Health</p><p><a href='merchants_pureLife.asp'>view info &gt;</a></p>";
	text[22]="<p>T.S. Brown Jewelry</p><p><a href='merchants_tsBrown.asp'>view info &gt;</a></p>";
	text[23]="<p>Top Toad</p><p><a href='merchants_topToad.asp'>view info &gt;</a></p>";
	text[24]="<p>Two Sisters Bookery</p><p><a href='merchants_twoSisters.asp'>view info &gt;</a></p>";
	text[25]="<p>The Scoop</p><p><a href='merchants_scoop.asp'>view info &gt;</a></p>";

    
function rotater() {
    if(document.layers) {
        document.imageplaceholderlayer.document.write(images[current]);
        document.imageplaceholderlayer.document.close();
    
        document.textplaceholderlayer.document.write(text[current]);
        document.textplaceholderlayer.document.close();
    }
    if(ns6)document.getElementById("imageplaceholderdiv").innerHTML=images[current]
        if(document.all)
            imageplaceholderdiv.innerHTML=images[current];
         
    if(ns6)document.getElementById("textplaceholderdiv").innerHTML=text[current]
        if(document.all)
            textplaceholderdiv.innerHTML=text[current];

    current = (current==images.length-1) ? 0 : current + 1; //increment or reset
    setTimeout("rotater()",howOften*1000);
}
window.onload=rotater;