///////////////////////////
///////help script for ////
///////primes.html/////////
///////////////////////////
///////©/digsby wyscher///
///////mmiv////////////////
function helper(helpnum) {

if (helpnum!=22) {maintext="";
destination=output1HTML;
magiccontents();}

var buggerme=helpnum;
if (eg) {
eg=false;maintext="";destination=exampleHTML;magiccontents();exampleLyr.visibility="hidden";}
 
if (buggerme==100 || buggerme==99 || buggerme==1 ) {

if (queryLyr.visibility.indexOf('hid') == 0) 
{queryLyr.visibility='visible';
clipLayer(queryLyr,queryclipArray,1);}
indexLyr.visibility="visible";
contactLyr.visibility="hidden";
}


if (buggerme==100 || buggerme==1) 
{
maintext=thefontsize+'<blockquote><font color=cyan><b>Help Menu</b></font><blockquote><!font color=white><b>help is available for:</b><br><br><table><tr><td><a href=javascript:helper(10); return false;>'+thefontsize+'browser performance</a></td><td><a href=javascript:helper(10); return false;>'+thefontsize+'<font color=chartreuse>1</a></td></tr><tr><td><a href=javascript:helper(2); return false;>'+thefontsize+'error messages and browser issues</a></td><td><a href=javascript:helper(2); return false;>'+thefontsize+'<font color=chartreuse>2</a></td></tr><tr><td><a href=javascript:helper(3); return false;>'+thefontsize+'graph types</a></td><td><a href=javascript:helper(3); return false;>'+thefontsize+'<font color=chartreuse>3</a></td></tr><tr><td><a href=javascript:helper(4); return false;>'+thefontsize+'prime distributions</a></td><td><a href=javascript:helper(4); return false;>'+thefontsize+'<font color=chartreuse>4</a></td></tr><tr><td><a href=javascript:helper(5); return false;>'+thefontsize+'labels and identifying primes</font></a>'+thefontsize+'&nbsp;&nbsp;</td><td><a href=javascript:helper(5); return false;>'+thefontsize+'<font color=chartreuse>5</a></td></tr><tr><td><a href=javascript:helper(6); return false;>'+thefontsize+'further reading</a></td><td><a href=javascript:helper(6); return false;>'+thefontsize+'<font color=chartreuse>6</a></td></tr><tr><td><a href=javascript:helper(7); return false;>'+thefontsize+'useful links and credits</a></td><td><a href=javascript:helper(7); return false;>'+thefontsize+'<font color=chartreuse>7</a></td></tr><tr><td><a href=javascript:helper(8); return false;>'+thefontsize+'development and design</a></td><td><a href=javascript:helper(8); return false;>'+thefontsize+'<font color=chartreuse>8</a></td></tr><tr><td><a href=javascript:helper(23); return false;>'+thefontsize+'<b>contact details</b></a></td><td><a href=javascript:helper(23); return false;>'+thefontsize+'<font color=chartreuse>9</a></td></tr><tr><td><a href=javascript:helper(99); return false;>'+thefontsize+'index</a></td><td><a href=javascript:helper(99); return false;>'+thefontsize+'<font color=chartreuse>10</a></td></tr></table></font>';

subsection='';}


if (buggerme==10){
maintext=thefontsize+'<blockquote><!font color=white><b>Browser Performance</b><blockquote><p align=justify>Generating prime numbers using javascript can be a very labour intensive business for your humble browser.<blockquote><p align=justify><b>WARNING:</b> if you request very large ranges, your browser is liable to hang, (or at least give the appearance of doing so) - a request for all primes up to 100000 using NS4 on an old PC (M571 motherboard, 96M RAM, screen: 16 bit; 800x600) took about two hours. <b>To increase overall performance: get a faster hard drive, reduce colour resolution, screen size & prime range.</b></blockquote>Searching for all the primes is more processor / stack hungry than searching for pairs or quads, and hence takes longer. Any sizeable search with a range over 250,000 will involve making several cups of tea and possibly a short trip down the shops...<br>see also:<a href=javascript:helper(2); return false;>individual browser issues</a>'+endbit;

subsection='';}

if (buggerme==2) 
{
maintext=thefontsize+"<blockquote><!font color=white><b>Browser issues and errors</b>";

if (document.all) {maintext=maintext+"<blockquote><b>Internet Explorer users only</b><br>when handling large ranges of primes, up to 5,000,000 recursive statements per page can be executed (just under 20,000 searched primes) prior to the following timeout dialog box appearing:<br><center><img src="+image3.src +" border=0 alt=a&nbsp;script&nbsp;on&nbsp;this&nbsp;page&nbsp;is&nbsp;causing&nbsp;Internet&nbsp;Explorer&nbsp;to&nbsp;run&nbsp;slowly.&nbsp;If&nbsp;it&nbsp;continues&nbsp;to&nbsp;run&nbsp;your&nbsp;computer&nbsp;may&nbsp;become&nbsp;unresponsive><br><b>***only if you choose 'no' will the script continue to process***</b></center><b>NB</b> Netscape users do not experience this problem<br>To alter MSIE's threshold limit, it is necessary to edit the system registry, as described in detail on the <a href=http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q175/5/00.ASP&NoWebContent=1 target=blank>microsoft support site</a> <br><br>see also:<a href=javascript:helper(10); return false;>browser performance</a>"+endbit;}
else

if (document.layers) {maintext=maintext+"<blockquote><b>Netscape users only</b><br><br>As well as not generating tiresome timeout dialog boxes, Netscape in general performs slightly better than MSIExplorer.<br><P align=justify>But, despite a better handling of large number recursions, Netscape generates more problems between <a href=javascript:helper(102); return false;>fonts and layers</a> (resulting in a more complicated <a href=javascript:helper(11); return false;>Document Object Model</a> in DHTML for &quot;child&quot; layers), and complains bitterly when writing large numbers of layers consecutively into the page, a process necessary for generating the graphs...</p><br>see also:<a href=javascript:helper(10); return false;>browser performance</a>"+endbit;
}

else
{
maintext=maintext+"<blockquote><b>Mozilla / Firefox users only</b><br>When handling large ranges of primes, only a certain number of recursive statements per page can be executed prior to the following timeout dialog box appearing:<br><center><img src="+image4.src +" border=0 alt=a&nbsp;script&nbsp;on&nbsp;this&nbsp;page&nbsp;is&nbsp;causing&nbsp;Mozilla&nbsp;to&nbsp;run&nbsp;slowly.&nbsp;If&nbsp;it&nbsp;continues&nbsp;to&nbsp;run&nbsp;your&nbsp;computer&nbsp;may&nbsp;become&nbsp;unresponsive><br><br><b>***only if you choose 'cancel' will the script continue to process***</b></center><br>To stop this message occuring, type 'about:config' into the address bar, scroll down to the entry: <b>dom.max_script_run_time</b> and change the value to something considerably larger. Please note that we cannot guarantee that this might not effect the overall performance of your browser in other, perhaps detrimental, ways."+endbit;
}

subsection='';}

if (buggerme==3) 
{
maintext=thefontsize+"<blockquote><!font color=white><b>Graph Types</b><blockquote><blockquote><p align=justify>By using the <i>single/multi</i> switch in the top left-hand corner of the screen, it is possible to switch between a single graph representing the chosen prime distribution, or a composite graph containing that prime distribution, and any subsequent distributions, in the following order:<blockquote><font color=maroon>all (single primes)  <img src=blob1.gif border=0 alt='tag for all primes'><br>&nbsp;&nbsp;&nbsp;&nbsp;pairs  <img src=blob.gif border=0 alt='tag for primes pairs'><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;quads  <img src=blob2.gif border=0 alt='tag for prime quads'></font></blockquote>when selecting a composite graph, the y-axis scale is determined by the pre-selected prime distribution.</p></blockquote>see also:<a href=javascript:helper(4); return false;>prime distributions</a>"+endbit;
subsection='';}

if (buggerme==4) 
{
maintext=thefontsize+"<blockquote><!font color=white><b>Prime distributions</b><blockquote>By using the <i>pairs/quads/all</i> switch in the top left-hand corner of the screen, it is possible to rotate between three distinct distributions of prime numbers:<br><font color=black><b>1.&nbsp;&nbsp;&nbsp;&nbsp;PAIRS</b></font>  <img src=blob.gif border=0 alt='tag for prime pairs'><br>a list of 'twin primes', that is pairs of primes only separated by two. For example, in this sequence of primes<font color=black> [1, 2, 3, 5, 7, 11],</font> <b>3 & 5</b>, and <b>5 & 7</b> are both pairs of primes<br><font color=black><b>2.&nbsp;&nbsp;&nbsp;&nbsp;QUADS</b></font>  <img src=blob2.gif border=0 alt='tag for prime quads'><br>a list of three primes spanning six integers; that is a pair of primes separated from another prime by two. For example, in this sequence of primes<font color=black> [5, 7, 11, 13, 17, 19, 23, 29],</font> <b>5, 7 & 11</b>, <b>11, 13 & 17</b>, <b>13, 17 & 19</b>, and <b>17, 19 & 23</b> are all prime quads<br><font color=black><b>3.&nbsp;&nbsp;&nbsp;&nbsp;ALL PRIMES</b></font>  <img src=blob1.gif border=0 alt='tag for all primes'><br>a complete list of primes.<br><br>each result is represented by a small tag like this: <img src=blob.gif border=0 alt='tag for prime pairs'>, this <img src=blob2.gif border=0 alt='tag for prime quads'> or this: <img src=blob1.gif border=0 alt='tag for all primes'><br>see also:<a href=javascript:helper(5); return false;>identifying primes</a>"+endbit;
subsection='';}

if (buggerme==5) 
{
maintext=thefontsize+"<blockquote><!font color=white><b>Identifying Primes</b><blockquote>There are two methods of identifying individual primes.<br><br><font color=black>1.&nbsp;&nbsp;&nbsp;mouseover: </font>by running the mouse pointer slowly over an individual point on the graph, the value of the prime number pops up on the screen next to it.<br><br><font color=black>2.&nbsp;&nbsp;&nbsp;labels: </font>by using the <i>blank/label</i> switch in the top left-hand corner of the screen, it is possible to toggle on and off individual labels for each prime represented. Each distribution type has its own colour:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=black>ALL - black  <img src=blob1.gif border=0 alt='tag for all primes'></font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=blue>PAIRS - blue  <img src=blob.gif border=0 alt='tag for prime pairs'></font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=brown>QUADS - brown  <img src=blob2.gif border=0 alt='tag for prime quads'></font><blockquote><b>WARNING </b>if a large range is selected, the large volume of labels will make the graph appear very &quot;cluttered&quot;.</blockquote>see also:<a href=javascript:helper(3); return false;>graph types</a>"+endbit;
subsection='';}

if (buggerme==6) 
{
maintext=thefontsize+"<blockquote><!font color=white><b>Recommended further reading:</b><blockquote><b>Apostrolos Doxiadis</b> - Uncle Petros and GoldBach's Conjecture <i>(faber and faber 1992)</i><br>&nbsp;&nbsp;&nbsp;&nbsp;<b>Paul Hoffman</b> - The Man who Loved Only Numbers <i>(fourth estate 1998)</i><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Simon Singh</b> - Fermat's Last Theorem <i>(fourth estate 1997)</i><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Ed Regis</b> - Who Got Einstein's Office <i>(penguin 1987)</i><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Douglas Hofstadter</b> - Gödel, Escher, Bach <i>(vintage 1980)</i><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Karl Sabbagh</b> - Dr Riemann's Zeros <i>(atlantic 2002)</i>"+endbit;
subsection='';}

if (buggerme==7) 
{
maintext=thefontsize+"<blockquote><!font color=white><b>Useful links and credits:<blockquote>The following individuals and sites have provided invaluable assistance with the construction of this webspace:</b><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the truly inspirational DHTML Guru site - <a href=http://www.htmlguru.com target=blank>www.htmlguru.com</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;comprehensive javascript archives - <a href=http://forums.devshed.com/archive/1 target=blank> http://forums.devshed.com/archive</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;microsoft support for internet explorer timeout problems - <a href=http://support.microsoft.com:80/support/kb/articles/Q175/5/00.ASP&NoWebContent=1 target=blank>here</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;how to overcome some problems associated with large recursions - <a href=http://www.siteexperts.com/tips/functions/ts20/page1.asp target=blank> here</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;outlining prime number theory - <a href=http://www.maths.ex.ac.uk/~mwatkins/zeta/tutorial.htm target=blank>here</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;large site dedicated to all things prime - <a href=http://primes.utm.edu target=blank>http://primes.utm.edu</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a rather useful least squares regression equation generator - <a href=http://people.hofstra.edu/faculty/Stefan_Waner/RealWorld/utilsindex.html target=blank>here</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Thanks to geedee and <a href=http://www.netregistry.com.au target=blank> NetRegistry</a> for their support and server space, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mr T for his lovely monitor,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;and a heartfelt thanks to my brother Nick for showing me how to do it properly."+endbit;subsection='';}


if (buggerme==8) 
{maintext=thefontsize+"<blockquote><!font color=white><b>Development and Design - Overview</b><blockquote><p align=justify>Every object on this web page (table, image, button, block of text or point on a graph) is created by generating an individual layer for that object, each with a precise location on the page, and containing the relative text, image or table etc. In the case of graph rendering, as primes are found, a new layer is created and added into a pre-existing single string which is subsequently written to another layer, producing the graph.<br><br><a href=javascript:helper(44); return false;>design rationale</a><br><br>&nbsp;&nbsp;&nbsp;Six main areas are highlighted is this design:<center><table width=60%><tr><td width=5%><bR></td><td>" +thefontsize+"<font color=white><a href=javascript:helper(9); return false;>cross-browser compatibility</a><br><a href=javascript:helper(14); return false;>content control for all objects - images, fonts, graphs etc</a><br><a href=javascript:helper(21); return false;>preloading and delay busters</a><br><a href=javascript:helper(241); return false;>interactive buttons</a><br><a href=javascript:helper(31); return false;>status messages and counters</a><br><a href=javascript:helper(34); return false;>dynamic graphs</a></font></font></td></tr></table></center>"+endbit;
subsection='';}


if (buggerme==9) 
{maintext=thefontsize+"<blockquote><!font color=white><b>Development and Design</b><blockquote><b>Cross Browser Compatibility</b><br><br>For this site to perform consistently across divers browser technologies, a variety of scripts have been developed to cater for the different ways in which browsers handle web-page content. Most discrepancies arise from the different ways browsers approach the handling of a layer\'s attributes via the Document Object Model:<br><a href=javascript:helper(17); return false;>A Basic DOM switch</a> - defines how javascript resolves the basic differences between common browsers.<br>There are also various site-specific extensions to this basic DOM:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=javascript:helper(102); return false;>layerwriter<i>()</i></a> - writing any content (tables, text, graphics etc) into individual layers<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=javascript:helper(11); return false;>&lt;DIV&gt; vs &lt;LAYER&gt;</a> - parent.child DOM structure easily corrupts in Netscape<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=javascript:helper(13); return false;>Dimension control switch</a> - browsers use different values for page dimensions<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=javascript:helper(12); return false;>Capture events</a> - carriage return keystroke handling<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=javascript:helper(28); return false;>Clipping Layers</a> - controlling the location of a clipped layer<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=javascript:helper(33); return false;>Controlling Loops</a> - pausing the write process"+endbit;
subsection='<a href=javascript:helper(8); return false;>[up one level]</a>&nbsp;&nbsp;<a href=javascript:helper(14); return false;>[content control]</a>';}

if (buggerme==102) 
{
maintext=thefontsize+"<blockquote><!font color=white><b>Development and Design</b><blockquote><b>Cross Browser Compatibility - The layerwriter<i>()</i> Function</b><br><br>To write a <a href=javascript:helper(15); return false;>string of HTML</a> <font class=lesser color=black>'output'</font> as the contents of a &quot;parent&quot; layer called <font class=lesser color=black>'backgroundIMG'</font> use:<br><table width=75% cellspacing=0 border=0><tr ><td width=15%><br></td><td>"+thefontsize+"<font class=lesser color=black><br>function layerwriter() {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(document.layers) {<font color=cyan>//Netscape component</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;backgroundIMG.open();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;backgroundIMG.write(output);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;backgroundIMG.close();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {<br>eval('backgroundIMG.innerHTML = output');}<font color=cyan>//MIE component</font><br>}</font></font><br></td></tr></table><br><b>NB</b> When writing &quot;child&quot; layers into &quot;parent&quot; layers, the DOM structure for the &quot;child&quot; layers is different from the standard &quot;parent&quot; <a href=javascript:helper(17); return false;>DOM</a> structure...<br>see also: <a href=javascript:helper(11); return false;>&lt;DIV&gt; vs &lt;LAYER&gt; - parent.child DOM structure</a>"+endbit;
subsection='<a href=javascript:helper(9); return false;>[up one level]</a>';}

if (buggerme==11) 
{
maintext=thefontsize+'<blockquote><!font color=white><b>Development and Design</b><blockquote><b>Cross Browser Compatibility - DIV vs LAYER & parent.child DOM structure</b><br><br>When Netscape attempts to write &quot;child&quot; layers (as a succession of <font class=lesser color=black>&lt;DIV&gt;s</font> in the string <font class=lesser color=black>\'output\'</font>) into a &quot;parent&quot; <font class=lesser color=black>&lt;DIV&gt;</font>, the style sheet properties of the newly created &quot;child&quot; <font class=lesser color=black>&lt;DIV&gt;s</font> go awry (especially the <font class=lesser color=black>&lt;FONT&gt;</font> settings).<br><br>As a consequence, in Netscape, all new &quot;child&quot; layers abandon the standard <a href=javascript:helper(17); return false;>DOM</a> structure, and instead must be created using the <font class=lesser color=black>&lt;LAYER&gt;</font> tag, as opposed to the <font class=lesser color=black>&lt;DIV&gt;</font> tag. Unfortunately, Explorer doesn\'t recognise <font class=lesser color=black>&lt;LAYER&gt;</font> STYLE properties, so for MIE the standard <font class=lesser color=black>&lt;DIV&gt;</font> structure is maintained:<br><br><table width=75% cellspacing=0 border=0><tr><td width=7%></td><td >'+thefontsize+'<font class=lesser color=black>ouput=\'&lt;DIV id="anylayer" STYLE="position: absolute;"&gt;&lt;img src=apoint.gif border=0 &gt;&lt;/DIV&gt;\';<font color=cyan>//standard setup</font><br>if (document.layers) {<font color=cyan>//Netscape switch</font><bR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;output=\'&lt;LAYER id="anylayer"&gt;&lt;img src=apoint.gif border=0&gt;&lt;/LAYER&gt;\';}</font></font></td></tr></table>'+endbit;

subsection='<a href=javascript:helper(9); return false;>[up one level]</a>&nbsp;&nbsp;<a href=javascript:helper(20); return false;>[graphs - parent.child creation]</a>&nbsp;&nbsp;<a href=javascript:helper(34); return false;>[dynamic graphs]</a>';}


if (buggerme==12) 
{
maintext=thefontsize+'<blockquote><!font color=white><b>Development and Design</b><blockquote><b>Cross Browser Compatibility - Capture Events</b><br><br>To submit the form from anywhere on the page, it is necessary to capture all keystrokes:<br><center><table width=65% cellspacing=1 border=0><tr ><td align=center >'+thefontsize+'<b>netscape</b></font></td><td align=center>'+thefontsize+'vs</font></td><td align=center >'+thefontsize+'<b>internet explorer</b></font></td></tr><tr><td>'+thefontsize+'<font class=lesser color=black>document.captureEvents(Event.KEYPRESS);<br>document.onKeyPress = checkreturn;</font></font></td><td></td><td>'+thefontsize+'<font class=lesser color=black>document.onkeydown = checkreturn;</font></font></td></tr></table></center>Then, direct them through a script <font class=lesser color=black>checkreturn(e)</font> which checks for \'enters\' or carriage returns and calls a \'form submit\' script <font class=lesser color=black>"subform()"</font> on their detection:<table width=85% border=0 cellspacing=5><tr><td>'+thefontsize+'<font class=lesser color=black>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function checkreturn(e) { <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (document.layers) {if (e.which == 13) {subform();}}<font color=cyan>//checks for Netscape carriage return</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (document.all) {if (event.keyCode == 13) {subform();}}<font color=cyan>//checks for MIE carriage return</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return true;}</font></font></td></tr></table></font>'+endbit;

subsection='<a href=javascript:helper(9); return false;>[up one level]</a>';}

if (buggerme==13) 
{
maintext=thefontsize+'<blockquote><!font color=white><b>Development and Design</b><blockquote><b>Cross Browser Compatibility - Dimension Control Switch</b><blockquote><p align=justify>To position all objects with consistent accuracy onto the webpage, it is essential to know the exact x and y dimensions of the browser application\'s window. Netscape and Explorer capture these values in slightly different ways:<br><br><center><table width=45% cellspacing=1 border=0><tr ><td align=center >'+thefontsize+'<b>netscape</b></font></td><td align=center>'+thefontsize+'vs</font></td><td align=center >'+thefontsize+'<b>internet explorer</b></font></td></tr><tr><td>'+thefontsize+'<font class=lesser color=black>available_width=innerWidth;<br>available_height=innerHeight;</font></font></td><td></td><td>'+thefontsize+'<font class=lesser color=black>available_width=document.body.clientWidth;<br>available_height=document.body.clientHeight;</font></font></td></tr></table></center></p></blockquote>see also:<a href=javascript:helper(14); return false;>content control</a>'+endbit;

subsection='<a href=javascript:helper(9); return false;>[up one level]</a>&nbsp;&nbsp;<a href=javascript:helper(32); return false;>[status messages]</a>&nbsp;&nbsp;<a href=javascript:helper(36); return false;>[graph dimensions]</a>';}

if (buggerme==14) 
{
maintext='<blockquote>'+thefontsize+'<!font color=white><b>Development and Design</b><blockquote><b>Content Control</b><br><p align=justify>The dimensions and locations of all images, text, tables, buttons, forms and graphs (objects) are defined in proportion to the available dimensions (width and height) of the user\'s screen (for information about determining these dimensions, see: <a href=javascript:helper(13); return false;>dimension control switch</a>). Despite the many combinations of different window and screen sizes employed by different users across the world, here the window contents re-size and realign themselves to any window size. <b>Therefore, the page layout and proportions appear identical, independent of any individual computer\'s screen dimensions.</b></p><b>Setup and control varies for different object-types - select from:</b><br><table height=1 cellpadding=0 cellspacing=0 width=85% border=0><tr><td width=5%><br></td><td>'+thefontsize+'<a href=javascript:helper(15); return false;>images</a><br><a href=javascript:helper(18); return false;>fonts and text</a><br><a href=javascript:helper(19); return false;>tables</a></font></td><td>'+thefontsize+'<a href=javascript:helper(20); return false;>graphs</a><br><a href=javascript:helper(26); return false;>buttons</a><br><font color=white>or</font>&nbsp;<a href=javascript:helper(16); return false;>STYLE attributes for all properties and objects</a></font></font></td></tr></table>see also:<a href=javascript:helper(17); return false;>DOM switch</a>'+endbit;
subsection='<a href=javascript:helper(8); return false;>[up one level]</a>';}


if (buggerme==15) 
{
maintext=thefontsize+'<blockquote><!font color=white><b>Development and Design</b><blockquote><b>Content Control - Objects - Images</b><br><br>The background image for this screen, <font class=lesser color=black>background.gif</font> is written to the page as a string of HTML called <font class=lesser color=black>output.</font> By changing <a href=javascript:helper(13); return false;>variables</a> in this string, the image\'s dimensions are controlled relative to the page.</p><blockquote><font class=lesser color=black>output=\'&lt;table width=100% height=\'+(available_height)+\' border=0 cellspacing=0 cellpadding=0&gt;&lt;tr&gt;&lt;td valign=top&gt;&lt;img src=background.gif border=0 width=\' + available_width + \' height=\'+ available_height +\'&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;\';</blockquote>output</font> is then written to the layer <font class=lesser color=black>backgroundIMG</font> by using the <a href=javascript:helper(102); return false;>layerwriter<i>()</i></a> function.<br>The position and visibility of <font class=lesser color=black>backgroundLYR</font> and hence also its contents can now be adjusted by changing the various <a href=javascript:helper(16); return false;>STYLE attributes</a> of the layer.<br><br>see also:<a href=javascript:helper(17); return false;>DOM switch</a>'+endbit;

subsection='<a href=javascript:helper(14); return false;>[up one level]</a>&nbsp;&nbsp;<a href=javascript:helper(18); return false;>[fonts and text]</a>&nbsp;&nbsp;<a href=javascript:helper(19); return false;>[tables]</a>&nbsp;&nbsp;<a href=javascript:helper(21); return false;>[preloading]</a>';}



if (buggerme==16) 
{
maintext=thefontsize+'<blockquote><!font color=white><b>Development and Design</b><blockquote><b>Content Control - Objects - STYLE attributes</b><br><br>Every layer in the page has both a \'style\' and \'content\' component, as defined by the <a href=javascript:helper(17); return false;>DOM switch</a> in the onload process.<br><br>The \'style\' <font class=lesser color=black>backgroundLYR</font> component controls the properties of the layer: size, positioning, visibility etc., while the \'content\' <font class=lesser color=black>backgroundIMG</font> component refers to the "space" where the <a href=javascript:helper(102); return false;>layerwriter<i>()</i></a> script posts the <font class=lesser color=black>output</font> string - the objects within the layer.<br><br>This script positions the layer <font class=lesser color=black>backgroundLYR</font> in the top left corner of the screen, and makes it visible.<font class=lesser color=black><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;backgroundLYR.left=0;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;backgroundLYR.top=0;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;backgroundLYR.visibility="visible";</font>'+endbit;

subsection='<a href=javascript:helper(14); return false;>[up one level]</a>&nbsp;&nbsp;<a href=javascript:helper(15); return false;>[images]</a>&nbsp;&nbsp;<a href=javascript:helper(18); return false;>[fonts and text]</a>&nbsp;&nbsp;<a href=javascript:helper(19); return false;>[tables]</a>'}

if (buggerme==17) 
{
maintext=thefontsize+'<blockquote><!font color=white><b>Development and Design</b><blockquote><b>Cross Browser Compatibility - A simple DOM Switch</b><br><br>each layer is created in HTML:<br><FONT CLASS=LESSER color=black>&lt;DIV ID="anyname" STYLE="position: absolute; visibilty:hidden;"&gt;<br>&lt;img name=Image1 border=0 src=background.gif&gt;&lt;/DIV&gt;<br><br></font>and evaluated as a string using this Javascript component:<table width=59% cellspacing=0 border=0><tr><td width=8%></td><td align=center >'+thefontsize+'<b>netscape</b></font></td><td align=center>'+thefontsize+'vs</font></td><td align=center >'+thefontsize+'<b>internet explorer</b></font></td></tr><tr><td width=8%></td><td>'+thefontsize+'<font class=lesser color=black>if (document.layers)&nbsp;&nbsp;&nbsp;<font color=cyan>//Netscape</font><BR>&nbsp;{doc = "document";<br>&nbsp;sty = "";<br>&nbsp;htm = ".document}"</font></font></td><td></td><td>'+thefontsize+'<font class=lesser color=black>if (document.all)&nbsp;&nbsp;&nbsp;<font color=cyan>//MIE</font><BR>&nbsp;{doc = "document.all";<br>&nbsp;sty = ".style";<br>&nbsp;htm = ".document";}</font></font></td></tr></table><FONT CLASS="LESSER" color=black>anyIMG = eval(doc + \'["anyname"]\' + htm);</font> - refers to the <a href=javascript:helper(15); return false;>contents</a> or objects within the layer.<br><FONT CLASS="LESSER" color=black>anyLYR = eval(doc + \'["anyname"]\' + sty);</font> - refers to the <a href=javascript:helper(16); return false;>style attributes</a>, or properties of the layer.'+endbit;

subsection='<a href=javascript:helper(9); return false;>[up one level]</a>&nbsp;&nbsp;<a href=javascript:helper(14); return false;>[content control]</a>&nbsp;&nbsp;<a href=javascript:helper(102); return false;>[layerwriter<i>()</i> function]</a>';}


if (buggerme==18) 
{
maintext='<blockquote>'+thefontsize+'<!font color=white><b>Development and Design</b><blockquote><b>Content Control - Objects - Fonts and Text</b><br><BR>Using the <a href=javascript:helper(15); return false;>same principle</a> as with the page\'s images, text is written to the page as a string of HTML.<blockquote><font class=lesser color=black>var thefontsize = parseInt(available_width/240);<font color=cyan>//sets \'thefontsize\' proportional to screen size</font><br>if (thefontsize<4) {thefontsize="&lt;font class=smallish&gt;";}<br>if (thefontsize>3) {thefontsize="&lt;font class=biggish&gt;";}<br>output=thefontsize+\'please don\'t read this&lt;/font&gt;\';</font><br>where the variable <font class=lesser color=black>thefontsize</font> is defined by the <a href=javascript:helper(13); return false;>screen\'s dimensions</a>:<br> and the .CSS style sheet settings are:<br><font class=lesser color=black>.biggish {font-weight: 335; font-size: 11pt;color: darkmagenta;}<br>.smallish {font-size: 9.5pt; color: purple;}</font></blockquote></font>'+endbit;

subsection='<a href=javascript:helper(14); return false;>[up one level]</a>&nbsp;&nbsp;<a href=javascript:helper(19); return false;>[tables]</a>&nbsp;&nbsp;<a href=javascript:helper(16); return false;>[positioning layers]</a>&nbsp;&nbsp;<a href=javascript:helper(21); return false;>[preloading]</a>';}


if (buggerme==19) 
{
maintext=thefontsize+'<blockquote><!font color=white><b>Development and Design</b><blockquote><b>Content Control - Objects - Tables</b><br><br>Again, as with the page\'s <a href=javascript:helper(15); return false;>images</a> and <a href=javascript:helper(18); return false;>text</a>, tables are written to the page as a strings of HTML:</p><blockquote><font class=lesser color=black>output=\'&lt;table bgcolor=darkpink width=\'+(available_width/6)+\' height=\'+(available_height/6)+\' border=1 cellspacing=0 cellpadding=0&gt;&lt;tr&gt;&lt;td valign=center align=center&gt;\'+thefontsize+\'don\'t read this&lt;/font&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;\';<br>output</font> is written to the layer <font class=lesser color=black>tableIMG</font> using a variation of the <a href=javascript:helper(102); return false;>layerwriter<i>()</i> script</a>.</blockquote>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Positioning the layer:<br><font class=lesser color=black>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tableLYR.left=(available_width*0.8);tableLYR.top=(available_height*0.75);</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;places the table at the bottom of the right side of the page.<br><font class=lesser color=black>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tableLYR.visibility="visible";</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;makes it visible. Click <a href=javascript:elayvis(2); return false;>here</a> to show the table.'+endbit;

subsection='<a href=javascript:helper(14); return false;>[up one level]</a>&nbsp;&nbsp;<a href=javascript:helper(16); return false;>[styles]</a>';
}


if (buggerme==20) 
{
maintext=thefontsize+'<blockquote><!font color=white><b>Development and Design</b><blockquote><b>Content Control - Objects - Graphs and Point Generation</b><br><br>The <a href=javascript:helper(102); return false;>layerwriter<i>()</i></a> script can create graphs in HTML. Every point on the graph has its own layer, represented by the string <font class=lesser color=black>buffer</font>. Each time the script loops, another layer is added to <font class=lesser color=black>output:<blockquote>var whatever=500;for (x = 1; x <= whatever; x++) {<font color=cyan>//loops upto \'whatever\' - in this case 500</font><br>y=available_height-x;<br>var buffer=\'&lt;DIV STYLE="position: absolute; top:\'+y+\'px; left:\'+x+\'px; visibilty:visible;"&gt;<br>&lt;img border=0 src=anypoint.gif&gt;&lt;/DIV&gt;\';<font color=cyan>//buffer counts as a single point on the graph</font><br>output=output+buffer;}<font color=cyan>//adds the point to the final output string and loops again<br>//NB <u>&lt;LAYER&gt; rather than &lt;DIV&gt; must be used for Netscape graph creation</u> - see <a href=javascript:helper(11); return false;>[here]</a></font></font><br></blockquote><font color=black>x</font> and <font color=black>y</font> are variables defined by the function of the graph and the screen\'s dimensions. This script draws a straight line containing 500 individual points, from the bottom left corner towards the top right corner of the screen.'+endbit;

subsection='<a href=javascript:helper(14); return false;>[up one level]</a>&nbsp;&nbsp;<a href=javascript:helper(11); return false;>[&lt;DIV&gt; vs &lt;LAYER&gt;]</a>&nbsp;&nbsp;<a href=javascript:helper(16); return false;>[positioning layers]</a>&nbsp;&nbsp;<a href=javascript:helper(34); return false;>[dynamic graphs]</a>';}

if (buggerme==21) 
{
maintext='<blockquote>'+thefontsize+'<!font color=white><b>Development and Design</b><blockquote><b>Preloading and "Delay Busters"</b><br><p align=justify>To browse through any website, the content of the website\'s homepage is first downloaded from the "server" to the user\'s browser. Most browsing relies on HTML <font class=lesser color=black>&lt;A HREF&gt;</font> links, where the user or "client" clicks on a link, the browser sends a request to the "server" to send more content, the user waits, the request is slowly processed and new content eventually appears.<br><br><b>To accelerate the entire browsing process, when <u>this</u> home page loads, all the rest of its pages are loaded "behind-the-scenes" as <a href=javascript:helper(15); return false;>individual strings</a>. When the user executes a link, "client-based" javascript instantly writes these strings into their designated layers, <u>causing</u> <u>text</u> <u>and</u> <u>images</u> <u>to</u> <u>appear</u> <u>without</u> <u>any</u> <u>delay</u>. By manipulating the visibility of these layers via links and buttons, the user seamlessly jumps from page to page.</b></p>'+endbit;

subsection='<a href=javascript:helper(8); return false;>[up one level]</a>&nbsp;&nbsp;<a href=javascript:helper(14); return false;>[content control]</a>&nbsp;&nbsp;<a href=javascript:helper(241); return false;>[interactive buttons]</a>';}

if (buggerme==22) {
maintext='<font color=papayawhip><center><b>Prime Number Generator</b><br><br>welcome<br><br></center></font>'+thefontsize+'<!font color=ghostwhite><blockquote>This website functions as a basic prime number generator, using javascript in combination with DHTML, enabling cross-browser compatibility - many of its features are still nascent web technologies<blockquote>The generator works remarkably well for small ranges of primes, but performance and response times deteriorate with larger requests<blockquote>Just enter the range of numbers to search in the fields at the top of the screen, select<b> pairs</b> or <b>quads</b> or <b>all primes</b> using the button in the top left-hand corner, hit <b>GO</b> or press <b>\'ENTER\'</b> and the search will start<blockquote>For further information, development or contact details, use the other \'toggle\' buttons in the top left-hand corner or click <a href=javascript:helper(100); return false;>here</a>.</font></font>';

subsection='';}


if (buggerme==23) {
maintext='<center><b><u>contacting the author</u></b><br><br>'+thefontsize+'<!font color=ghostwhite>all correspondence, suggestions, criticisms or witticisms welcome and gratefully accepted via email at:<br><a href=mailto:digsby@sonik-systems.com?subject=prime&nbsp;numbers>digsby@sonik-systems.com</a><br><br>alternatively, you can leave a voice message at:<br><b><font color=chartreuse>+44 (0) 7763 217437</font></b><br><br>thank you for your attention<br><br>"may a star shine brightly on our meeting" <br><br><br>to exit from this help screen, click <a href=javascript:cntct=true;contact(); return false;>[here]</a><br><br><font class=tinitiny><font color=cyan>digsby wyscher - ©mmiv</font></font></font></center>';

subsection='';}

if (buggerme==24) 
{
maintext='<blockquote>'+thefontsize+'<!font color=white><b>Development and Design</b><blockquote><b>Interactive Buttons - Overview</b><p align=justify>As all content is <a href=javascript:helper(21); return false;>preloaded</a>, buttons and links instantly either replace objects within layers, or change the visibility or position of layers. Both processes are "client-based" - once all web-site content has downloaded to the user\'s browser, no further communication is necessary between server and user for the site to work.<br><Br>A standard javascript button usually relies on an "onclick" event handler which swaps two pre-loaded images on the button face. <u>But</u>, some browsers still occasionally replace these preloaded images, resulting in a delay as the browser\'s responses slow to download the image again from the server.<br><br>To avoid this, here buttons are created using a single image containing all the button\'s faces which, placed within a "clipped" layer, is moved around to generate a switch or interactive button...</p>'+endbit;

subsection='<a href=javascript:helper(241); return false;>[up one level]</a>&nbsp;&nbsp;<a href=javascript:helper(25); return false;>[button creation]</a>';}

if (buggerme==241) 
{
maintext='<blockquote>'+thefontsize+'<!font color=white><b>Development and Design</b><blockquote><b>Interactive Buttons - Contents</b><p align=justify>Button functionality, which involves redefining a layer\'s position and clip properties, is subdivided into the following sections:<br><br><table width=75% cellspacing=0 border=0><tr ><td width=15%><br></td><td>'+thefontsize+'<a href=javascript:helper(24); return false;>Overview</a><br><a href=javascript:helper(25); return false;>Button creation - Clipping</a><br><a href=javascript:helper(26); return false;>Button creation - Set up</a><br><a href=javascript:helper(27); return false;>Button creation - the clipValues<i>()</i> function</a><br><a href=javascript:helper(28); return false;>Button functionality - clipLayers<i>()</i> function</a><br><a href=javascript:helper(29); return false;>Button functionality - notes on clipLayers<i>()</i></a><br><a href=javascript:helper(30); return false;>Button functionality - Basic Button Script</a><br></font></td></tr></table><br></p>'+endbit;

subsection='<a href=javascript:helper(8); return false;>[up one level]</a>';}


if (buggerme==25) 
{
maintext='<blockquote>'+thefontsize+'<!font color=white><b>Development and Design</b><blockquote><b>Interactive Buttons - Button Creation - an outline to clipping</b><p align=justify>Each button comprises a clipped layer containing a button image embedded within a link. The button image is of two button faces, \'ON\' and \'OFF\'; the layer is clipped to half the size of this image - only half of the underlying button image can be seen at a time through the clip, revealing a single button face.<br><br><b>Whenever the link is requested, it\'s event handler calls a function which moves this entire layer one button width to the left. As the layer moves to the left, it takes its clip values with it, so the same function then simultaneously establishes a new clip position for the layer one button-width to the right of its original clip position. Result: the clip position remains in the same relative position on the page, but now reveals the other button face.</b> No downloads, no image swapping, zero response time - an instant switch.<center><font color=firebrick><b>NB the source code for the clipLayers and clipValues functions has been adapted from the excellent DHTML Guru site - <a href=http://www.htmlguru.com target=blank>www.htmlguru.com</a></b></font></center>'+endbit;

subsection='<a href=javascript:helper(241); return false;>[up one level]</a>&nbsp;&nbsp;<a href=javascript:helper(26); return false;>[button setup]</a>';}


if (buggerme==26) 
{
maintext='<blockquote>'+thefontsize+'<!font color=white><b>Development and Design</b><blockquote><b>Interactive Buttons - Button Creation - setup</b><br>Design a button face eg:"button.gif" <img src=sample_button.gif border=0 align=bottom alt=button.gif: ><br>Create the clipped button layer in HTML:<br><font class=lesser color=black>&lt;DIV ID="buttonlayer" STYLE="position: absolute; width: 48px; height: 19px;  clip: rect(0px 24px 19px 0px);"&gt;<br>&lt;a href=javascript:switch();return false;&gt;&lt;IMG border=0 src=button.gif alt="on and off"&gt;&lt;/a&gt;&lt;/div&gt;</font><br><br>Define the <a href=javascript:helper(17); return false;>button layer</a> and establish a "clip" array for the button using the javascript <a href=javascript:helper(27); return false;>clipValues<i>()</i></a> function:<br><font class=lesser color=black>button=eval(doc+\'["buttonlayer"]\'+sty);<br>button.left=8;<br>buttonclipArray=new&nbsp;Array();<br>buttonclipArray[0]&nbsp;=new&nbsp;clipValues(24,0,parseInt(button.left));<br>buttonclipArray[1]&nbsp;=new&nbsp;clipValues(48,24,parseInt(button.left)-24);<br><br>Array[0]</font> corresponds to the  button\'s original \'OFF\' position, <font class=lesser color=black>Array[1]</font> the \'ON\' position.'+endbit;

subsection='<a href=javascript:helper(25); return false;>[up one level]</a>&nbsp;&nbsp;<a href=javascript:helper(27); return false;>[clipValues<i>()</i>]</a>&nbsp;&nbsp;<a href=javascript:helper(28); return false;>[switching faces - clipLayers<i>()</i>]</a>';}



if (buggerme==27) 
{
maintext='<blockquote>'+thefontsize+'<!font color=white><b>Development and Design</b><blockquote><b>Interactive Buttons - Button Creation - the clipValues<i>()</i> Function</b><p align=justify>For each button layer, using the values defined in <a href=javascript:helper(26); return false;>button setup</a>, an array is generated where each member comprises of a set of data relating to how far the layer should be moved, and what the layer\'s clip values should be when the button is clicked:<br><br><font class=lesser color=black>function clipValues(right,left,move) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.right = right;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.left = left;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.move = move;}</font><br><br>Once each array member has been populated, their values are used by the <a href=javascript:helper(28); return false;>clipLayer<i>()</i></a> function to change the button\'s appearance by manipulating it\'s clipping and positional <a href=javascript:helper(16); return false;>STYLE attributes</a> as described in the section on <a href=javascript:helper(25); return false;>clipping</a>.'+endbit;

subsection='<a href=javascript:helper(26); return false;>[up one level]</a>&nbsp;&nbsp;<a href=javascript:helper(28); return false;>[switching faces - clipLayers<i>()</i>]</a>';}

if (buggerme==28) 
{
maintext='<blockquote>'+thefontsize+'<!font color=white><b>Development and Design</b><blockquote><b>Interactive Buttons - Button Functionality - the clipLayers<i>()</i> Function</b><BR><BR>A call to this function with the following format results in the button face being switched off or on:<br><font class=lesser color=black>clipLayers(button,buttonclipArray,1);</font>   ON or   <font class=lesser color=black>clipLayers(button,buttonclipArray,0);</font>   OFF<font class=lesser color=black><br><br>function clipLayers(layer,array,index) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var cRight = array[index].right;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var cLeft = array[index].left;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;layer.left = array[index].move;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(document.layers) {<font color=cyan>//Netscape component</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;layer.clip.right = cRight;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;layer.clip.left =  cLeft;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {<font color=cyan>//MIE component</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;layer.clip = \'rect(0 \' + cRight + \' 19 \' + cLeft + \')\';}}</font><br><br>see also:<a href=javascript:helper(29); return false;>notes on the clipLayers<i>()</i> function</a>'+endbit;

subsection='<a href=javascript:helper(26); return false;>[up one level]</a>&nbsp;&nbsp;<a href=javascript:helper(30); return false;>[basic button script]</a>&nbsp;&nbsp;<a href=javascript:helper(27); return false;>[clipValues<i>()</i>]</a>';}

if (buggerme==29) 
{
maintext='<blockquote>'+thefontsize+'<!font color=white><b>Development and Design</b><blockquote><p align=justify><b>Interactive Buttons - Button Functionality - the clipLayers<i>()</i> Function - notes</b><BR><BR>Using <font class=lesser color=black>clipLayers(button,buttonclipArray,1);</font> and <font class=lesser color=black>buttonclipArray[1]&nbsp;=new&nbsp;clipValues(48,24,parseInt(button.left)-24);</font> for this example, the script has two stages - firstly, it moves the layer defined in Array <font color=black>[1]</font> twenty four pixels to the left.<br><br>Previously discussed under <a href=javascript:helper(25); return false;>clipping</a>, when the layer initially moves, the clip moves the corresponding distance. So, depending on the browser-type, a small DOM switch moves the position of the clip twenty four pixels to the right relative to the new layer position (Netscape and Explorer manipulate layer clipping STYLE properties in their own "individual" ways - as the vertical position of the button remains constant, Netscape only requires the new <b>x-axis</b> left and right locations, while Explorer needs all four components of the clip - left, top, right, bottom redefined). <font class=lesser color=black></font><br><br>see also:<a href=javascript:helper(30); return false;>a basic button script</a>'+endbit;

subsection='<a href=javascript:helper(26); return false;>[up one level]</a>&nbsp;&nbsp;<a href=javascript:helper(27); return false;>[clipValues<i>()</i>]</a>&nbsp;&nbsp;<a href=javascript:helper(28); return false;>[clipLayers<i>()</i> function]</a>';}

if (buggerme==30) 
{
maintext='<blockquote>'+thefontsize+'<!font color=white><b>Development and Design</b><blockquote><b>Interactive Buttons - Button Functionality - a Basic Button Script - buttonswitch<i>()</i></b><p align=left>By assigning <font class=lesser color=black>TRUE</font> or <font class=lesser color=black>FALSE</font> to a variable <font class=lesser color=black>buttonon</font> inside the script, when the script is called, whatever the value of <font class=lesser color=black>buttonon</font>, the value is swapped (true to false, false to true), the button appearance switches accordingly and the visibility of <font class=lesser color=black>backgroundLYR</font> is changed:<br><br><font class=lesser color=black>function buttonswitch() {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (buttonon) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;buttonon=false;clipLayers(button,buttonclipArray,0);backgroundLYR.visibility="hidden";}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{buttonon=true;clipLayers(button,buttonclipArray,1);backgroundLYR.visibility="visible";}}</font><br><br><b>As with the "primes" button at the top left of the screen, further clipArrays can be assigned to a button, and the equivalent <font class=lesser color=black>buttonon</font> variables can have many possible values, creating a multi-switch button, adding considerable variety to any website.</b>'+endbit;

subsection='<a href=javascript:helper(26); return false;>[up one level]</a>&nbsp;&nbsp;<a href=javascript:helper(27); return false;>[clipValues<i>()</i>]</a>&nbsp;&nbsp;<a href=javascript:helper(28); return false;>[clipLayers<i>()</i>]</a>';}



if (buggerme==31) 
{
maintext='<blockquote>'+thefontsize+'<!font color=white><b>Development and Design</b><blockquote><b>Status Messages and Counters - Overview</b><p align=justify>Constant active updates can be sent to the screen {while the browser continues to process information in the background) by creating a script call within the active process that continuously rewrites a <a href=javascript:helper(19); return false;>table</a> into a layer using the <a href=javascript:helper(102); return false;>layerwriter<I>()</I> function</a>.<br><br>Each time another step in the process is completed, the table is re-written, and a variable reflecting the incremental change in the process is represented either as text within - or a change to the properties of - the table (or both).<br><br>When the final step in the process is reached, the properties or text of the table can change again to indicate the process complete...</p>'+endbit;

subsection='<a href=javascript:helper(8); return false;>[up one level]</a>&nbsp;&nbsp;<a href=javascript:helper(32); return false;>[status message loop]</a>';}

if (buggerme==32) 
{
maintext='<blockquote>'+thefontsize+'<!font color=white><b>Development and Design</b><blockquote><b>Status Messages and Counters - Status Message Loop</b><br><BR>The regular output string for the table is subdivided into three string fragments, two constant - <font class=lesser color=black>table_top, table_bottom</font> - and one variable - <font class=lesser color=black>table_middle.</font> As the loop cycles, this variable changes and the table itself is re-written to the appropriate layer. The <a href=javascript:helper(33); return false;>pause(0);</a> script call is necessary otherwise Explorer will complete the whole task before showing the results.<br><br><font class=lesser color=black>var table_top=\'&lt;table bgcolor=darkpink width=\'+(available_width/6)+\' height=\'+(available_height/6)+\' border=1 cellspacing=0 cellpadding=0&gt;&lt;tr&gt;&lt;td valign=center align=center&gt;\';<br>var table_bottom=\'&lt;/font&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;\';<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (n = 1; n <= 100; n++) {<font color=cyan>//loops from 1 to 100</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;table_middle=\'+thefontsize+\'numbers \' + n + \' to 100\';<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;output=table_top+table_middle+table_bottom;<font color=cyan>//combine the fragments of the table into one string</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (document.all) {pause(0);} <font color=cyan>//additional control for MIE</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;layerwriter();}<font color=cyan>//write to the layer then loop again until complete</font><br></font><i>Click <a href=javascript:elayvis(1); return false;>[here]</a> to see this in action</i>'+endbit;

subsection='<a href=javascript:helper(31); return false;>[up one level]</a>&nbsp;&nbsp;<a href=javascript:helper(33); return false;>[pause<I>()</I> function]</a>&nbsp;&nbsp;<a href=javascript:helper(102); return false;>[layerwriter<I>()</I>]</a>&nbsp;&nbsp;<a href=javascript:helper(13); return false;>[dimension control]</a>';}

if (buggerme==33) 
{
maintext='<blockquote>'+thefontsize+'<!font color=white><b>Development and Design</b><blockquote><b>Status Messages and Counters - Controlling Loops - pause<i>()</i> function</b><p align=justify>When Netscape is processing any function, and a call is made to write output into a layer, this call is completed before the main script progresses. The same <b>does not</b> occur for Explorer - instead, the process completes prior to the output being written to the layer. <b>This is unsuitable for actively updating the browser to indicate the status of "work in progress"</b>.<br><br>For Explorer, a small script is called to stagger the process and allow <a href=javascript:helper(102); return false;>layerwriter<i>()</i></a> to write the layers for each step:</p><font class=lesser color=black>function pause(numberMillis)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{var dialogScript = \'window.setTimeout(\' + \'function() {window.close(); }, \' + numberMillis + \');\';<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var result =  window.showModalDialog( \'javascript:document.writeln(\' + \'"&lt;script&gt;\' + dialogScript + \'&lt;\' + \'/script&gt;")\');}</font>'+endbit;

subsection='<a href=javascript:helper(31); return false;>[up one level]</a>&nbsp;&nbsp;<a href=javascript:helper(32); return false;>[status message loop]</a>';}

if (buggerme==34) 
{
maintext='<blockquote>'+thefontsize+'<!font color=white><b>Development and Design</b><blockquote><b>Dynamic Graphs - Contents</b><p align=justify>Graph creation, which involves writing a combination of different object-types into various layers located around the screen, is subdivided into the following sections:<br><br><table width=75% cellspacing=0 border=0><tr ><td width=7%><br></td><td>'+thefontsize+'<a href=javascript:helper(35); return false;>Overview</a><br><a href=javascript:helper(36); return false;>Graph dimensions</a><br><a href=javascript:helper(37); return false;>Horizontal line - creation</a><br><a href=javascript:helper(39); return false;>Horizontal lines - labels and location</a><br><a href=javascript:helper(41); return false;>Horizontal axes</a><br></td><td>'+thefontsize+'<a href=javascript:helper(40); return false;>Estimating and predicting totals - using regression</a><br><a href=javascript:helper(38); return false;>Vertical lines and axes</a><br><a href=javascript:helper(20); return false;>Point generation</a><br><a href=javascript:helper(42); return false;>Label generation</a><br><a href=javascript:helper(43); return false;>Popup labels</a><br></font></td></tr></table>'+endbit;

subsection='<a href=javascript:helper(8); return false;>[up one level]</a>';}


if (buggerme==35) 
{
maintext='<blockquote>'+thefontsize+'<!font color=white><b>Development and Design</b><blockquote><b>Dynamic Graphs - Overview</b><p align=justify>This DHTML/javascript graph generator works by writing different objects (images, tables or text) into layers on the screen, each with an exact screen location and size as defined in proportion to the total graph size.<br><br>Every image or block of text within the graph; points, labels, x and y-axes or horizontal lines - embedded within their own layers - can be placed in precise, pixel-accurate, positions.<br><br>When the function of the graph generates each new x,y co-ordinate as a plot on the graph, a new layer is created at those co-ordinates containing an image of a point and a label referring to that point\'s particular value. This layer is resolved as a string and added to an expanding string: <font class=lesser color=black>output</font> that contains the entire series of points on the graph, each as an individual layer, generated so far.</p>'+endbit;

subsection='<a href=javascript:helper(34); return false;>[up one level]</a>&nbsp;&nbsp;<a href=javascript:helper(36); return false;>[graph size]</a>';}

if (buggerme==36) 
{
maintext='<blockquote>'+thefontsize+'<!font color=white><b>Development and Design</b><blockquote><b>Dynamic Graphs - Graph Dimensions</b><blockquote><p align=justify>Using values collected by <a href=javascript:helper(13); return false;>dimension control</a>, the graph width and height values are set at ¾ of the total page size:<br><br><table width=75% cellspacing=0 border=0><tr ><td width=15%><br></td><td>'+thefontsize+'<font class=lesser color=black>graph_width=(available_width*0.75);<br>graph_width=parseInt(graph_width);<br>graph_height=(available_height*0.75);<br>graph_height=parseInt(graph_height);<br></font></font></td></tr></table><br>The <font class=lesser color=black>graph_width</font> and <font class=lesser color=black>graph_height</font> variables are used to control the position and size of all other elements of the graph.</p>'+endbit;

subsection='<a href=javascript:helper(34); return false;>[up one level]</a>&nbsp;&nbsp;<a href=javascript:helper(37); return false;>[horizontal lines]</a>&nbsp;&nbsp;<a href=javascript:helper(38); return false;>[vertical lines]</a>&nbsp;&nbsp;<a href=javascript:helper(20); return false;>[point generation]</a>';}


if (buggerme==37) 
{
maintext='<blockquote>'+thefontsize+'<!font color=white><b>Development and Design</b><blockquote><b>Dynamic Graphs - Horizontal Lines</b><p align=justify>The length of a horizontal line, defined under <a href=javascript:helper(36); return false;>graph dimensions</a>, is set at<font class=lesser color=black> graph_width</font>. All plain horizontal lines on the graph are created by taking a small coloured square, 4x4 pixels in size, and extending this image\'s width so that it is stretched to equal the graph\'s width.<br><br><b>NB</b> As discussed under <a href=javascript:helper(11); return false;>parent.child</a> browser compatibility issues, Netscape and MIE interpret changes to layer attributes differently, and hence a DOM switch is included here to generate a plain baseline for the graph:<table width=75% cellspacing=0 border=0><tr><td width=7%><br></td><td>'+thefontsize+'<font class=lesser color=black>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;output=\'&lt;DIV STYLE="position: absolute; z-index:0; top:\' + Math.round(available_height-30) + \'px;"&gt;&lt;font color=white size="-4"&gt;&lt;b&gt;0 &lt;/b&gt;&lt;img src=small_square.gif border=0 height=4 width=\' + (table_width)+\'&gt;&lt;/DIV&gt;\';<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (document.layers) { <font color=cyan>//Netscape switch</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;output=\'&lt;LAYER top=\' + Math.round(available_height-30) + \'&gt;&lt;font color=white size="-4"&gt;&lt;b&gt;0 &lt;/b&gt;&lt;img src=small_square.gif border=0 height=4 width=\' + (table_width)+\'&gt;&lt;/LAYER&gt;\';}</font></font></td></tr></table>'+endbit;

subsection='<a href=javascript:helper(36); return false;>[up one level]</a>&nbsp;&nbsp;<a href=javascript:helper(39); return false;>[labelling the lines]</a>&nbsp;&nbsp;<a href=javascript:helper(41); return false;>[horizontal axis]</a>&nbsp;&nbsp;<a href=javascript:helper(38); return false;>[vertical lines]</a>';}

if (buggerme==38) 
{
maintext='<blockquote>'+thefontsize+'<!font color=white><b>Development and Design</b><blockquote><b>Dynamic Graphs - Vertical Axes and Lines</b><center><br><b>The indices for the vertical axis are generated as<br><a href=javascript:helper(39); return false;>horizontal line labels</a></b></center><p align=justify>The height of the vertical axis, defined under <a href=javascript:helper(36); return false;>graph dimensions</a>, is set at<font class=lesser color=black> graph_height</font>. Again, a plain vertical line is created by taking a small coloured square, 4x4 pixels in size, and extending this image\'s height so that it is stretched to equal the graph\'s height.<br><br><b>NB</b> Again, see <a href=javascript:helper(11); return false;>parent.child</a> browser compatibility issues for details about the Netscape switch:<table width=75% cellspacing=0 border=0><tr><td width=2%><br></td><td>'+thefontsize+'<font class=lesser color=black>output=\'&lt;DIV STYLE="position: absolute; z-index:0; top:\' +(available_height-table_height-30)+ \'px;"&gt;&lt;img src=small_square.gif border=0 width=4 height=\' + (table_height)+\'&gt;&lt;/DIV&gt;\';<br>&nbsp;&nbsp;&nbsp;if (document.layers) { <font color=cyan>//Netscape switch</font><br>&nbsp;&nbsp;&nbsp;output=\'&lt;LAYER top=\' +(available_height-table_height-30)+ \'&gt;&lt;img src=small_square.gif border=0 width=4 height=\' + (table_height)+\'&gt;&lt;/LAYER&gt;\';}</font></font></td></tr></table>'+endbit;

subsection='<a href=javascript:helper(36); return false;>[up one level]</a>&nbsp;&nbsp;<a href=javascript:helper(39); return false;>[vertical axis indices]</a>&nbsp;&nbsp;<a href=javascript:helper(37); return false;>[horizontal lines]</a>&nbsp;&nbsp;<a href=javascript:helper(41); return false;>[horizontal axis]</a>';}

if (buggerme==39) 
{
maintext='<blockquote>'+thefontsize+'<!font color=white><b>Development and Design</b><blockquote><b>Dynamic Graphs - Labelling and Positioning Horizontal Lines</b><p align=left>The position and label for any particular horizontal line are resolved by manipulating two variables in the string <font class=lesser color=black>output</font> that generates the line. See <a href=javascript:helper(37); return false;>[here]</a> for original <font class=lesser color=black>output</font> string.<br><br>To alter the <b>vertical position</b> the <font class=lesser color=black>\'top\'</font> variable changes so that it now reads:<font class=lesser color=black><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Math.round((available_height-30)-(table_height*x))</font><br>while to change the <b>labels</b> (the <a href=javascript:helper(38); return false;>vertical axis</a> indices), the text in the layer now reads:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class=lesser color=black>&lt;font color=white size="-4"&gt;&lt;b&gt;\'+(predictedvalue*x)+\'&lt;/b&gt;</font><br>where <font class=lesser color=black>x</font> is a value between <b>0 - 1</b>, and <font class=lesser color=black>predictedvalue</font> is discussed <a href=javascript:helper(40); return false;>[here]</a>.<br><br>If five horizontal lines are wanted, then, using an adapted version of the looped process outlined in <a href=javascript:helper(20); return false;>graph control</a>, <font class=lesser color=black>x</font> will have values <b>0.2, 0.4, 0.6, 0.8 </b>and <b>1</b>.<br><br></p>'+endbit;

subsection='<a href=javascript:helper(37); return false;>[up one level]</a>&nbsp;&nbsp;<a href=javascript:helper(41); return false;>[horizontal axis]</a>&nbsp;&nbsp;<a href=javascript:helper(38); return false;>[vertical lines]</a>&nbsp;&nbsp;<a href=javascript:helper(40); return false;>[estimated totals]</a>';}

if (buggerme==40) 
{
maintext='<blockquote>'+thefontsize+'<!font color=white><b>Development and Design</b><blockquote><b>Dynamic Graphs - var Predictedvalue - using regression</b><p align=justify>The y-axis indices and the scaling factor used in accurately distributing the points on the graph are both determined by the total number of products or values there are of the function of the graph.<br><br>The dilemma is that, until the function has finished running, it is impossible to determine the exact number of products there will be. Result: no scaling factor = no accurate graph.<br><br>To side-step this issue, an predicted number of products for a function within any range is made. This estimation comes from an equation generated by running a simple regression analysis on a large set of results gleaned from the original function (in this case, three separate prime number generators).<br><br>Click <a href=http://people.hofstra.edu/faculty/Stefan_Waner/RealWorld/utilsindex.html target=blank>here</a> for a least-square equation generator'+endbit;

subsection='<a href=javascript:helper(34); return false;>[up one level]</a>&nbsp;&nbsp;<a href=javascript:helper(37); return false;>[horizontal lines]</a>&nbsp;&nbsp;<a href=javascript:helper(38); return false;>[vertical axis]</a>&nbsp;&nbsp;<a href=javascript:helper(20); return false;>[point generation]</a>';}

if (buggerme==41) 
{
maintext='<blockquote>'+thefontsize+'<!font color=white><b>Development and Design</b><blockquote><b>Dynamic Graphs - The Horizontal Axis</b><p align=left>This axis is created using principles adapted from ideas outlined in the section on <a href=javascript:helper(19); return false;>table control</a>. By generating a single row, six column table with each cell containing a value equivalent to a 20% increment on the total range of the function, the axis values change according to the range selected by the user.<br><br>Here\'s an example of the third cell in this table:<br><font class=lesser color=black>\'&lt;td align=center width= \' + ((table_width)/5)+ \' &gt;\'+thefontsize+\'&lt;font color=white&gt;\'+Math.round(bottomvalue-1+((topvalue-bottomvalue+1)*0.4))+\'&lt;/font&gt;&lt;/font&gt;&lt;/td&gt;\'</font><br><br>where <font class=lesser color=black>bottomvalue</font> is the lowest value of the range, and <font class=lesser color=black>topvalue</font> is the top value of the numbers selected.  In a range of 1 to 100, the value in this cell will be 40, in a range of 101 to 200, the value in this cell will be 140.'+endbit;

subsection='<a href=javascript:helper(39); return false;>[up one level]</a>&nbsp;&nbsp;<a href=javascript:helper(37); return false;>[horizontal lines]</a>&nbsp;&nbsp;<a href=javascript:helper(38); return false;>[vertical lines]</a>';}

if (buggerme==42) 
{
maintext='<blockquote>'+thefontsize+'<!font color=white><b>Development and Design</b><blockquote><b>Dynamic Graphs - Label Generation</b><p align=left>Creating individual labels for points on a graph uses a similar process as used for <a href=javascript:helper(20); return false;>writing points</a>. Here, text is inserted around a blank point image, and the results are written to a different layer, which can be superimposed over the graph output layer by using a <a href=javascript:helper(241); return false;>button</a> to toggle the layer\'s visibility on and off. In this case, the buffer variable looks like this:<br><font class=lesser color=black><br>var buffer=\'&lt;DIV STYLE="position: absolute; top:\'+ y +\'px; left:\'+ x +\'px; visibilty:visible;"&gt;\'+ thefontsize +\'result number:\'+ x + \'&lt;img border=0 src=blankpoint.gif&gt;&lt;/font&gt;&lt;/DIV&gt;\';</font><br>or this:<font class=lesser color=black><br>var buffer=\'&lt;LAYER top=\'+ y +\' left=\'+ x +\'&gt;\'+ thefontsize +\'result number:\'+ x + \'&lt;img border=0 src=blankpoint.gif&gt;&lt;/font&gt;&lt;/LAYER&gt;\';</font><br>Depending on the <a href=javascript:helper(11); return false;>browser switch</a>.'+endbit;

subsection='<a href=javascript:helper(34); return false;>[up one level]</a>&nbsp;&nbsp;<a href=javascript:helper(20); return false;>[point generation]</a>&nbsp;&nbsp;<a href=javascript:helper(43); return false;>[popup labels]</a>&nbsp;&nbsp;<a href=javascript:helper(37); return false;>[horizontal lines]</a>&nbsp;&nbsp;<a href=javascript:helper(38); return false;>[vertical lines]</a>';}

if (buggerme==43) 
{
maintext='<blockquote>'+thefontsize+'<!font color=white><b>Development and Design</b><blockquote><b>Dynamic Graphs - Label Generation</b><p align=left>Creating popup labels for the graph works on a very similar principle to the standard <a href=javascript:helper(42); return false;>label generation</a> process, except that rather than embedding the point image around the text, text is instead inserted directly into the \'alt\' statement of the &lt;IMG&gt; tag for the point image:<br><font class=lesser color=black><br>var buffer=\'&lt;DIV STYLE="position: absolute; top:\'+ y +\'px; left:\'+ x +\'px; visibilty:visible;"&gt;&lt;img border=0 src=blankpoint.gif alt=result number:\'+ x + \'&gt;&lt;/DIV&gt;\';</font><br>or this:<font class=lesser color=black><br>var buffer=\'&lt;LAYER top=\'+ y +\' left=\'+ x +\'&gt;&lt;img border=0 src=blankpoint.gif alt=result number:\'+ x + \'&gt;&lt;/font&gt;&lt;/LAYER&gt;\';</font><br>Again, depending on the <a href=javascript:helper(11); return false;>browser switch</a>.'+endbit;

subsection='<a href=javascript:helper(34); return false;>[up one level]</a>&nbsp;&nbsp;<a href=javascript:helper(42); return false;>[label generation]</a>&nbsp;&nbsp;<a href=javascript:helper(20); return false;>[point generation]</a>&nbsp;&nbsp;<a href=javascript:helper(37); return false;>[horizontal lines]</a>&nbsp;&nbsp;<a href=javascript:helper(38); return false;>[vertical lines]</a>';}




if (buggerme==44) 
{
maintext=thefontsize+'<blockquote><!font color=white><b>Development and Design - Overview<blockquote>Design Rationale - A Manifesto - 1</b><center><br><b>As far as the net goes, it\'s always best to keep ahead of the pack.</b></center><p align=justify>The main aim of this site is to address and attempt to narrow some of the margins (in both appearance and performance) between \'slick\' local (native or client) applications (eg computer software) and slow, inconsistant, internet (server-based) applications (eg any web page).<br><br><center><b>The design approach has been to create a javascript-driven DHTML site that can be used by all, irrespective of setup or browser, and that looks and behaves like locally stored software.</b></center><br>There are three key elements that are intrinsic to the differences between native and server applications, and they are all relevant to the design of this site. They are:<br><center><b>"user-friendliness",&nbsp;&nbsp;&nbsp;"performance"&nbsp;</b>and<b>&nbsp;&nbsp;"adaptability"</b></center>'+endbit;

subsection='<a href=javascript:helper(8); return false;>[up one level]</a>&nbsp;&nbsp;<a href=javascript:helper(45); return false;><font color=darkred>[next page]</font></a>&nbsp;&nbsp;';}


if (buggerme==45) 
{
maintext=thefontsize+'<blockquote><!font color=white><b>Development and Design - Overview<blockquote>Design Rationale - A Manifesto - 2</b><p align=justify><b>"User-friendliness":</b> Local applications have zero-response times - one click, and there\'s your result. Internet applications will always experience some internet delays - known as <b>"client-server delays"</b>.<br><br><b>"Performance":</b> A local application depends mainly on the computer and operating system it is loaded on. Web applications depend not only on this but also on the user\'s browser. As browsers rarely behave consistantly, web-applications suffer from <b>"cross-browser compatibility"</b> problems.<br><br><b>"Adaptability":</b> Local applications have a consistant appearance - they fill the application window, and maintain a constant proportional layout - no matter what screen set-up the user has. Web applications rarely cater for such <b>"client-side variation";</b> text is too small, the wrong colour or off the screen, images are too large, readable content on one screen either overflows or is unintelligible on another - what is good for the goose turns out to be far from acceptable for the gander.<center><a href=javascript:helper(46); return false;>go to the next page</a></center>'+endbit;

subsection='<a href=javascript:helper(8); return false;>[up one level]</a>&nbsp;&nbsp;<a href=javascript:helper(44); return false;><font color=darkolivegreen>[previous page]</font></a>&nbsp;&nbsp;<a href=javascript:helper(46); return false;><font color=darkred>[next page]</font></a>&nbsp;&nbsp;';}



if (buggerme==46) 
{
maintext=thefontsize+'<blockquote><!font color=white><b>Development and Design - Overview<blockquote>Design Rationale - A Manifesto - 3</b><p align=justify>These problems are addressed in the following three ways:<br><b><font color=black>1.</font>&nbsp;&nbsp;&nbsp;"Preloading"</b> - no client-server delays - by preloading all objects on the home page, all internal requests have a zero response time - browsing is instantaneous. <b>"Preloading"</b> also permits the control of the proportional size of all objects via <b>"autoscaling"</b>.<br><b><font color=black>2.&nbsp;&nbsp;&nbsp;</font></b>An extended <b>"Document Object Model"</b> deals with all cross-browser compatibility problems  by pinpointing and resolving all differences between browsers, and then creating coded "DOM-switches" to generate a consistant performance independent of browser technology.<br><b><font color=black>3.&nbsp;&nbsp;&nbsp;</font>"Autoscaling"</b> - without the "scroll" feature, the viewing area is restricted to the size of the browser window. To prevent content from overflow (on small screens), and to ensure images and text are readable (on large screens), <b>"preloading"</b> ensures that all objects on the page remain consistantly in proportion with the screen-size. Such "resizing" is also found in Macromedia\'s Flash, with one significant difference - a Flash site with this much content and functionality would require maybe 50 times as much space, and would create more bandwidth and delay issues than it solved.'+endbit;

subsection='<a href=javascript:helper(44); return false;>[up one level]</a>&nbsp;&nbsp;<a href=javascript:helper(45); return false;><font color=darkolivegreen>[previous page]</font></a>&nbsp;&nbsp;<a href=javascript:helper(47); return false;><font color=darkred>[next page]</font></a>&nbsp;&nbsp;';}



if (buggerme==47) 
{
maintext=thefontsize+'<blockquote><!font color=white><b>Development and Design - Overview<blockquote>Design Rationale - A Manifesto - 4</b><p align=justify>The site is divided into three areas - graph production, help screens and button control. All require the judicious use of the strategies discussed <a href=javascript:helper(46); return false;>above</a>.<br><br>The <b>graph component</b> makes a layer for each plot, adds all the layers together and writes the result to the screen. Here it is employed in visually expressing the properties of prime distributions - it can be equally be combined with any popular online database via SQL - its applications are endless.<br><br>The <b>"preloading"</b> feature supplies the immediate responses to user requests - all text on this site is loaded "behind-the-scenes" at the home page. Requested text is written directly from memory to the page, hence no internet delays. The advantages of this are, again, endless. How many browsing surfers loose interest in your site because of the delays between requests?<Center><BR><b>seamless, delay-free, consistant, user-friendly web-pages.<br>You saw them here first.</b></p>'+endbit;

subsection='<a href=javascript:helper(44); return false;>[up one level]</a>&nbsp;&nbsp;<a href=javascript:helper(46); return false;><font color=darkolivegreen>[previous page]</font></a>&nbsp;&nbsp;';}


/// Rendering and Autoscaling 

if (buggerme==99) 
{
maintext=thefontsize+'<blockquote><font color=cyan><b>Help Menu</b></font> - <!font color=white><b>index</b><table cols=3><tr><td valign=top width=33%>'+thefontsize+'<font class=lisser><a href=javascript:helper(2); return false;>browser issues</a><br><a href=javascript:helper(10); return false;>browser performance</a><br><a href=javascript:helper(30); return false;>buttons - basic script</a><br><a href=javascript:helper(25); return false;>buttons - clipping visible layers</a><br><a href=javascript:helper(241); return false;>buttons - contents</a><br><a href=javascript:helper(24); return false;>buttons - overview</a><br><a href=javascript:helper(26); return false;>buttons - set up</a><br><a href=javascript:helper(12); return false;>capture events</a><br><a href=javascript:helper(25); return false;>clipping - button layers</a><br><a href=javascript:helper(28); return false;>clipLayers<i>()</i> - button functionality</a><br><a href=javascript:helper(29); return false;>clipLayers<i>()</i> - notes</a><br><a href=javascript:helper(27); return false;>clipValues<i>()</i> function - button creation</a><br><a href=javascript:helper(23); return false;>contact details</a><br><a href=javascript:helper(100); return false;>contents</a><br><a href=javascript:helper(14); return false;>content control - contents / overview</a><br><a href=javascript:helper(33); return false;>controlling loops</a><br><a href=javascript:helper(31); return false;>counters</a><br><a href=javascript:helper(7); return false;>credits</a><br><a href=javascript:helper(9); return false;>cross-browser-compatibility</a><br><a href=javascript:helper(21); return false;>delays</a><br><a href=javascript:helper(44); return false;>design rationale 1 - 4</a></font></font></td><td valign=top  width=33%>'+thefontsize+'<font class=lisser><a href=javascript:helper(8); return false;>development and design - contents</a><br><a href=javascript:helper(8); return false;>development and design - overview</a><br><a href=javascript:helper(13); return false;>dimension control</a><br><a href=javascript:helper(36); return false;>dimensions - graphs</a><br><a href=javascript:helper(11); return false;>&lt;DIV&gt; vs &lt;LAYER&gt;</a><br><a href=javascript:helper(9); return false;>document object model</a><br><a href=javascript:helper(17); return false;>DOM switch - content control</a><br><a href=javascript:helper(2); return false;>error messages</a><br><a href=javascript:helper(40); return false;>estimating primes</a><br><a href=javascript:helper(18); return false;>fonts and text - content control</a><br><a href=javascript:helper(6); return false;>further reading</a><br><a href=javascript:helper(34); return false;>graphs - contents</a><br><a href=javascript:helper(35); return false;>graphs - overview</a><br><a href=javascript:helper(36); return false;>graphs - dimensions</a><br><a href=javascript:helper(41); return false;>graphs - horizontal axis</a><br><a href=javascript:helper(37); return false;>graphs - horizontal lines</a><br><a href=javascript:helper(39); return false;>graphs - horizontal line labels</a><br><a href=javascript:helper(42); return false;>graphs - label generator</a><br><a href=javascript:helper(20); return false;>graphs - point production</a><br><a href=javascript:helper(43); return false;>graphs - popup labels</a></font></font></td><td valign=top width=33% >'+thefontsize+'<font class=lisser><a href=javascript:helper(38); return false;>graphs - vertical lines</a><br><a href=javascript:helper(38); return false;>graphs - vertical axis</a><br><a href=javascript:helper(39); return false;>graphs - vertical axis indices</a><br><a href=javascript:helper(3); return false;>graph types</a><br><a href=javascript:helper(15); return false;>images - content control</a><br><a href=javascript:helper(5); return false;>labels and identifying primes</a><br><a href=javascript:helper(43); return false;>labels - graphs - popup </a><br><a href=javascript:helper(42); return false;>labels - graphs - visible</a><br><a href=javascript:helper(11); return false;>&lt;LAYER&gt; vs &lt;DIV&gt;</a><br><a href=javascript:helper(102); return false;>layerwriter<i>()</i></a><br><a href=javascript:helper(7); return false;>links</a><br><a href=javascript:helper(33); return false;>pause<i>()</i> function</a><br><a href=javascript:helper(40); return false;>predicting primes</a><br><a href=javascript:helper(21); return false;>preloading</a><br><a href=javascript:helper(4); return false;>prime distributions</a><br><a href=javascript:helper(40); return false;>regression & predicting prime values</a><br><a href=javascript:helper(31); return false;>status messages</a><br><a href=javascript:helper(32); return false;>status message loops</a><br><a href=javascript:helper(16); return false;>STYLE attributes - content control</a><br><a href=javascript:helper(19); return false;>tables - content control</a></font></font></td></tr></table>';


subsection='';}


if (buggerme>1) {
destination=outputHTML;magiccontents();

if (buggerme!=22) {maintext=presubsection+'<font color=white>'+subsection+'</font>'+postsubsection;
destination=linksHTML;
magiccontents();
linksLyr.visibility="visible";
linksbackLyr.visibility="visible"; }
}

if (buggerme<2){
if (outputLyr.visibility.indexOf('hid') == 0) 

{
if (buggerme==1) {
destination=outputHTML;magiccontents();
outputLyr.visibility="visible";
output1Lyr.visibility="visible";
blankLyr.visibility="visible";
clipLayer(queryLyr,queryclipArray,1);
indexLyr.visibility="visible";
contactLyr.visibility="hidden";
}
}

else
{
outputLyr.visibility="hidden";
output1Lyr.visibility="hidden";
linksLyr.visibility="hidden";
linksbackLyr.visibility="hidden";
blankLyr.visibility="hidden";
clipLayer(queryLyr,queryclipArray,0);
indexLyr.visibility="hidden";
contactLyr.visibility="visible";
}
}
}


function quickshadow() {
maintext='<font color=black><center><b>Prime Number Generator</b><br><br>welcome<br><br></center>'+thefontsize+'<!font color=ghostwhite><blockquote>This website functions as a basic prime number generator, using javascript in combination with DHTML, enabling cross-browser compatibility - many of its features are still nascent web technologies<blockquote>The generator works remarkably well for small ranges of primes, but performance and response times deteriorate with larger requests<blockquote>Just enter the range of numbers to search in the fields at the top of the screen, select <b>pairs</b> or <b>quads</b> or <b>all primes</b> using the button in the top left-hand corner, hit <b>GO</b> or press <b>\'ENTER\'</b> and the search will start<blockquote>For further information, development or contact details, use the other \'toggle\' buttons in the top left-hand corner or click here</font></font>';
destination=output1HTML;
magiccontents();
}