var currClient = 0;
var maxClients = 11;
var elmHide = 0;

function showClient(n) {
	if (document.getElementById) {

		// n=1 is Next, n=0 is Previous
		currClient = currClient -1 + 2*n;
		if (currClient>maxClients) { currClient=1; }
		if (currClient<1) { currClient=maxClients; }

		elm = document.getElementById('client'+currClient);
		if (elmHide) { elmHide.style.display='none'; }
		elm.style.display='block';
		elmHide = elm;

		elPic = elm.getElementsByTagName('div')[0].firstChild;
		if (elPic!=null) {
			picSrc = elPic.getAttribute("href");
			if (picSrc.match(/[gif|jpg|png]$/)) {
				myImg = document.createElement("img");
				myImg.setAttribute("src",picSrc);
				myImg.setAttribute("width",500);
				myImg.setAttribute("height",250);
				elPic.parentNode.replaceChild(myImg,elPic);
			}
		}
		return false;
	}
	return true;
}
