
function posaft(t) {
	var q = t.mypop.style;
	var x = 20;
	var y = t.offsetHeight+5;
	while (t) {
		x += t.offsetLeft;
		y += t.offsetTop;
		t = t.offsetParent;
	}
	q.left = x + 'px';
	q.top  = y + 'px';
}

function showpop() {
	var q = this.mypop.style;
	if (q.visibility != 'visible') {
		posaft(this);
		q.visibility = 'visible';
	} else {
		q.visibility = 'hidden';
	}
}

function killpop() {
		this.style.visibility = 'hidden';
}

function chpop() {
	for (i = 1; npop > i; i++) {
		posaft(document.getElementById('infobox' + i));
	}
}

function init() {
	for (i = 1; t = document.getElementById('infobox' + i); i++) {
		//t.onclick = showpop;
		t.onmouseover = showpop;
		t.onmouseout = showpop;
		p = document.getElementById('popup' + i);;
		//t.mypop = document.getElementById('popup' + i);
		t.mypop = p;
		p.onclick = killpop;
	}
	onresize = chpop;
	npop = i;
}


function imgSwap(index, flag) {
          if(document.images) {
            if(flag) {
              eval("document.images['mnu" + index + "']").src = onLit[index].src;
            } else {
              eval("document.images['mnu" + index + "']").src = offLit[index].src;
            } //endif
          }
        }


if(document.images) {
  var onLit = new Array();
  var offLit = new Array();

  onLit[0] = new Image();
  onLit[0].src = "/images/menu/my-account-hover.jpg";
  offLit[0] = new Image();
  offLit[0].src = "/images/menu/my-account.jpg";
  
  onLit[1] = new Image();
  onLit[1].src = "/images/menu/telephone-hover.jpg";
  offLit[1] = new Image();
  offLit[1].src = "/images/menu/telephone.jpg";
  
  onLit[2] = new Image();
  onLit[2].src = "/images/menu/internet-hover.jpg";
  offLit[2] = new Image();
  offLit[2].src = "/images/menu/internet.jpg";
  
  onLit[3] = new Image();
  onLit[3].src = "/images/menu/support-hover.jpg";
  offLit[3] = new Image();
  offLit[3].src = "/images/menu/support.jpg";
  
  onLit[4] = new Image();
  onLit[4].src = "/images/menu/company-hover.jpg";
  offLit[4] = new Image();
  offLit[4].src = "/images/menu/company.jpg";
  
} //endif  
