
var t2= 0;
var t= 0;
var hidden= 'signupCycleLink';
var i= 0;

function cycleLink () {
  var signupE= document.getElementById('signupCycleLink');
  var loginE= document.getElementById('loginCycleLink');

  if ((!signupE)||(!loginE)) { clearInterval(t); return; }

  if (hidden=='signupCycleLink') {
    signupE.style.display= 'inline';
    loginE.style.display= 'none';
    hidden= 'loginCycleLink';
  } else {
    signupE.style.display= 'none';
    loginE.style.display= 'inline';
    hidden= 'signupCycleLink';
    if (i > 3) { clearInterval(t); }
  }
  i++;
}

function hoverMenu (e) { e.style.backgroundColor= "#eed7b5"; }
function hoverMenuOff (e) { e.style.backgroundColor= "#ffe4c7"; }
function popMenu (tabName,tab) {
  e= document.getElementById('topMenuRow');
  eArray= e.getElementsByTagName('td');
  for (i in eArray) {
    if (eArray[i].style) { eArray[i].style.backgroundColor= '#ffe4c7'; }
  }
  if (tab) { tab.style.backgroundColor= '#eed7b5'; }
  if (tabName) {
    document.getElementById('popMenu').style.display= 'block';
  } else {
    document.getElementById('popMenu').style.display= 'none';
  }
}


var hero= {};

hero.e= function () { return document.getElementById('indexDefault'); };
hero.array= new Array();
hero.page= 0;

hero.hoverButton= function (e, next) {
  if (next) {
    if (hero.page==3) { hero.page= 0; }
    else { hero.page++; }
  }
  var button= null;
  if (e) { button= e; clearInterval(t2); }
  else { button= document.getElementById('hero_'+hero.page); }
  if (button==null) { clearInterval(t2); return; }

  for (x=0;x<4;x++) {
    var id= 'hero_'+x;
    if (id==button.id) { hero.page= x; }
    document.getElementById(id).style.backgroundColor= "#DDDDDD";
  }

  button.style.backgroundColor="#555555";
  if (hero.array[hero.page]) {
    var he= hero.e();
    he.innerHTML= hero.array[hero.page];
  }
};

var cMt= 0;
var cMi= 1;
function cycleMenu () {
  cMi++;
  if (cMi > 6) { cMi= 1; }
  document.getElementById('topMenuImage').src= 'includes/templates/pns/images/shopbycat/'+cMi+'.gif';
}






function listCats () {
  e= dojo.byId('catListBox');

  if (dojo.style(e,'height') > 0) { end= 0; start= 450; }
  else { end= 450; start= 0; }

  dojo.animateProperty({
        node:e,
        duration: 700,
        //rate:300,
        properties: {
            height: {end:end, start:start}
        },
        onEnd: function() {

        }
  }).play();
}





