function xwscrprev() { o=document.getElementById("xscreen"); if (o) { xphoto--; if (xphoto<1) xphoto=xscreenmax; o.src="pics/"+xwebimgs[xphoto]+""; xwsethref(xphoto); } } function xwscrnext() { o=document.getElementById("xscreen"); if (o) { xphoto++; if (xphoto>xscreenmax) xphoto=1; o.src="pics/"+xwebimgs[xphoto]+""; xwsethref(xphoto); } } function xnextscreen() { o=document.getElementById("xscreen"); if (o) { if (cxxc<=0) { var rr=xphoto; while (rr==xphoto) xphoto=Math.round((Math.random()*(xscreenmax-1)))+1; } else { xphoto++; if (xphoto>xscreenmax) xphoto=1; cxxc--; } o.src="pics/"+xwebimgs[xphoto]+""; xwsethref(xphoto); } } function xwsethref(xxphoto) { var oh=document.getElementById("xwurlhref"); var ot=document.getElementById("xwurltext"); if ((oh) && (ot)) { if (xwebtexts[xxphoto]) { oh.setAttribute("href",xweburls[xxphoto]); ot.innerHTML=xwebtexts[xxphoto]; } else { oh.setAttribute("href","#"); ot.innerHTML=""; } } }