var imgsa = new Array("images/boardpic02a.jpg", "images/boardpic03a.jpg", "images/boardpic04a.jpg"),
imgsb = new Array("images/boardpic02b.jpg", "images/boardpic03b.jpg", "images/boardpic04b.jpg"), 
preloadimgsa = new Array(), preloadimgsb = new Array(),
showad=document.getElementById("idshowa"), showbd=document.getElementById("idshowb"),  n=-1;
var inf01d=document.getElementById("idinf01"), inf02d=document.getElementById("idinf02"),  inf03d=document.getElementById("idinf03"),
inf04d=document.getElementById("idinf04");
var boardstard=document.getElementById("idboardstar"), boardstartind = true, opcountboardstar=1, opvalboardstar=0, boardstartime, 
boardind=true, postar=300;
if (!ie)
{
document.write('<div><a href="#" onclick="boardstop()" title="\'Petzaway\' - Small Animal, Bird &amp; Reptile Boarding - Click to Stop/Start"><img id="idboardshowafg" src="images/boardpic01a.jpg" width="305" height="228" border="0" alt="\'Petzaway\' - Small Animal, Bird &amp; Reptile Boarding - Click to Stop/Start"></a></div><div><a href="#" onclick="boardstop()" title="\'Petzaway\' - Small Animal, Bird &amp; Reptile Boarding - Click to Stop/Start"><img id="idboardshowbfg" src="images/boardpic01b" width="304" height="228" border="0" alt="\'Petzaway\' - Small Animal, Bird &amp; Reptile Boarding - Click to Stop/Start"></a></div><div><img id="idboardshowan" src="images/boardpic01a.jpg" width="305" height="228" border="0" alt="\'Petzaway\' - Small Animal, Bird &amp; Reptile Boarding - Click to Stop/Start"></a></div><div><img id="idboardshowbn" src="images/boardpic01b" width="304" height="228" border="0" alt="\'Petzaway\' - Small Animal, Bird &amp; Reptile Boarding - Click to Stop/Start"></a></div>');
var showafgd=document.getElementById("idboardshowafg"), showand=document.getElementById("idboardshowan"),
showbfgd=document.getElementById("idboardshowbfg"), showbnd=document.getElementById("idboardshowbn");
}
if (nn)
{
document.write('<div><img id="idboardshowann" src="images/boardpic01a.jpg" width="305" height="228" border="0" alt="\'Petzaway\' - Small Animal, Bird &amp; Reptile Boarding - Click to Stop/Start"></a></div><div><img id="idboardshowbnn" src="images/boardpic01b" width="304" height="228" border="0" alt="\'Petzaway\' - Small Animal, Bird &amp; Reptile Boarding - Click to Stop/Start"></a></div>');
var showannd=document.getElementById("idboardshowann"), showbnnd=document.getElementById("idboardshowbnn");
showannd.src = "images/boardpic01a.jpg";
showbnnd.src = "images/boardpic01b.jpg";
}

boardstard.style.opacity = 0;

if (!ie)
{
   showad.style.visibility = 'hidden';
   showbd.style.visibility = 'hidden';
   showafgd.src = "images/boardpic01a.jpg";
   showbfgd.src = "images/boardpic01b.jpg";
   set_poshow();
}
set_posboard();
preloadshow();

function set_posboard()
{
  inf01d.style.left=posleft + 450 + "px";
  inf02d.style.left=posleft + 450 + "px";
  inf03d.style.left=posleft + 450 + "px";
  inf04d.style.left=posleft + 450 + "px";
}

function set_poshow()
{
   showafgd.style.left = posleft + 145 + "px";
   showbfgd.style.left = posleft + 450 + "px";
   showand.style.left = posleft + 145 + "px";
   showbnd.style.left = posleft + 450 + "px";
   showafgd.style.visibility = 'visible';
   showbfgd.style.visibility = 'visible';
   showand.style.visibility = 'visible';
   showbnd.style.visibility = 'visible';
   if (nn)
   {
      showannd.style.left = posleft + 145 + "px";
      showbnnd.style.left = posleft + 450 + "px";
      showannd.style.visibility = 'visible';
      showbnnd.style.visibility = 'visible';
   }
}

function boardre()
{
   window.onresize=set_posboardre;
}

function set_posboardre()
{
   set_pos();
   set_posboard();
   if (!ie)
       set_poshow();   
}

function preloadshow()
{
  for (var i = 0; i < imgsa.length; i++)
  {
    preloadimgsa[i] = new Image(); preloadimgsb[i] = new Image();
    preloadimgsa[i].src = imgsa[i];  preloadimgsb[i].src = imgsb[i];
  }
// showboardstar();
showboardpics(1, 8000, 6000, 25, .04, 15, .066);
}

function showboardstar()
{
   if (boardstartind)
   {
         if (postar != 300)
         {
         	postar = (postar == 150) ? 550 : 150;
	boardstard.style.top = 173 + "px";
             boardstard.style.left=posleft + postar + "px";
         }
         else
         {
             boardstard.style.left=posleft + 300 + "px";
	boardstard.style.visibility = "visible";
	postar = 0;
         }
         opvarboardstars(1);
   }
   else
         opvarboardstars(2);
}
function opvarboardstars(inboardstar)
{
    opcountboardstar = 1;
    (inboardstar == 1) ? opvarboardstar1() : opvarboardstar2();
}

function opvarboardstar1()
{
    if (opcountboardstar < 26)
    {
       opvalboardstar += .4;
       boardstard.style.opacity = opvalboardstar/10;
       boardstard.style.filter = 'alpha(opacity=' + opvalboardstar*10 + ')';
       opcountboardstar += 1;
       opvarboardstartime = setTimeout ("opvarboardstar1()", 0);
    }
    else
    {
       boardstartind = false;
       clearTimeout(opvarboardstartime);
       boardstard.style.opacity = 1;
       boardstard.style.filter = "alpha(opacity=100)";
       boardstartime = setTimeout ("showboardstar()", 7000);
    }
}
function opvarboardstar2()
{
    if (opcountboardstar < 31)
    {
       opvalboardstar = opvalboardstar - .31;
       boardstard.style.opacity = opvalboardstar/10;
       boardstard.style.filter = 'alpha(opacity=' + opvalboardstar*10 + ')';
       opcountboardstar += 1;
       opvarboardstartime = setTimeout ("opvarboardstar2()", 0);
    }
    else
    {
       boardstartind = true;
       clearTimeout(opvarboardstartime);
       boardstard.style.opacity = 0;
       boardstard.style.filter = "alpha(opacity=0)";
       boardstartime = setTimeout ("showboardstar()", 10000);
    }
}

function hidestar()
{
    clearTimeout(boardstartime);
    boardstard.style.visibility = "hidden";
}

function showboardpics(firstind, delayinit, delay, loop, valinc, loopnn, valincnn)
{
   if (firstind == 1)
   {
     delayst = delayinit;
     delayo = delay;
     loopo = loop;
     valinco = valinc;
     looponn = loopnn;
     valinconn = valincnn;
     showtime = setTimeout ("showboardpics(0, 0, 0, 0, 0, 0, 0)", delayst);
   }
   else
   {
       if (ie)
       {
          (n == (imgsa.length - 1)) ? n = 0: n++;
          showad.style.filter="blendTrans(duration=0.5)";
          showbd.style.filter="blendTrans(duration=0.5)";
          showad.filters.blendTrans.Apply();
          showbd.filters.blendTrans.Apply();
          showad.src= preloadimgsa[n].src;
          showbd.src= preloadimgsb[n].src;
          showad.filters.blendTrans.Play();
          showbd.filters.blendTrans.Play();
          showtime = setTimeout ("showboardpics(0, 0, 0, 0, 0, 0, 0)", delayo);
       }
       else
       {
          if (!nn)
          {
	(n == (imgsa.length - 1)) ? n = 0: n++;
	showand.src = preloadimgsa[n].src;
	showbnd.src = preloadimgsb[n].src;
             opboardvar();
          }
          else
             opboardvarnn();
       }
   }
}

function opboardvar()
{
    if (opcount < loopo)
    {
       opvalfg = opvalfg - valinco;
       opval = opval + valinco;
       showafgd.style.opacity = opvalfg;
       showbfgd.style.opacity = opvalfg;
       showand.style.opacity = opval;
       showbnd.style.opacity = opval;
       opcount +=  1;
       opvartime = setTimeout ("opboardvar()", 0);
    }
    else
    {
       showafgd.src = preloadimgsa[n].src;
       showbfgd.src = preloadimgsb[n].src;
       showafgd.style.opacity = 1;
       showbfgd.style.opacity = 1;
       showand.style.opacity = 0;
       showbnd.style.opacity = 0;
       clearTimeout(opvartime);
       opcount = 0;
       opvalfg = 1;
       opval = 0;
       optime = setTimeout ("showboardpics(0, 0, 0, 0, 0, 0, 0)", delayo);
    }
}

function opboardvarnn()
{
    if (opcount < looponn)
    {
       opvalfg = opvalfg - valinconn;
       opval = opval + valinconn;
       if (opcount == 1)
       {
	(n == (imgsa.length - 1)) ? n = 0: n++;
	showand.src = preloadimgsa[n].src;
	showbnd.src = preloadimgsb[n].src;
       }
       else
       if (opcount == looponn - 1)
       {
            showannd.src = preloadimgsa[n].src;
            showbnnd.src = preloadimgsb[n].src;
       }
       showafgd.style.opacity = opvalfg;
       showbfgd.style.opacity = opvalfg;
       showand.style.opacity = opval;
       showbnd.style.opacity = opval;
       opcount +=  1;
       opvartime = setTimeout ("opboardvarnn()", 0);
    }
    else
    {
       showafgd.src = preloadimgsa[n].src;
       showbfgd.src = preloadimgsb[n].src;
       showafgd.style.opacity = 1;
       showbfgd.style.opacity = 1;
       showand.style.opacity = 0;
       showbnd.style.opacity = 0;
       clearTimeout(opvartime);
       opcount = 0;
       opvalfg = 1;
       opval = 0;
       optime = setTimeout ("showboardpics(0, 0, 0, 0, 0, 0, 0)", delayo);
    }
}

function boardstop()
{
   if (boardind)
   {
      clearTimeout(showtime);
      boardind = false;
   }
   else
   {
      showboardpics();
      boardind = true;
   }
}

function showinf(infno)
{
   eval("inf0" + infno + "d.style.visibility='visible';");
}
function hideinf(infno)
{
   eval("inf0" + infno + "d.style.visibility='hidden';");
}