<HEAD> <TITLE>Example 2</TITLE> <SCRIPT LANGUAGE="JavaScript"> <!-- var p; function init(){ var i; p=new Array(3); for(i=0;i<3;i++) p[i]=false; return; } function clicked(x){ document.images[x].src=p[x]?"space.gif":"queen.gif"; p[x]=!p[x]; return; } //--> </SCRIPT> </HEAD> <BODY onLoad="init()"> <H1>Example 2</H1> <IMG SRC="space.gif" BORDER=0> <IMG SRC="space.gif" BORDER=0> <IMG SRC="space.gif" BORDER=0> <P> <A HREF="JavaScript:clicked(0)">0</A> <A HREF="JavaScript:clicked(1)">1</A> <A HREF="JavaScript:clicked(2)">2</A> </BODY>