home *** CD-ROM | disk | FTP | other *** search
- var currentPage = 0;
-
- // articles array -- holds the order in which to present the articles
-
- var articles = new Array();
- articles[0] = "../index/welcome.htm";
- articles[1] = "../articles/intro.htm";
- articles[2] = "../articles/start.htm";
- articles[3] = "../articles/obp.htm";
- articles[4] = "../articles/introrev.htm";
- articles[5] = "../examples/intro.htm";
- articles[6] = "../articles/var.htm";
- articles[7] = "../articles/declvar.htm";
- articles[8] = "../articles/error.htm";
- articles[9] = "../articles/statemnt.htm";
- articles[10] = "../articles/varrev.htm";
- articles[11] = "../examples/var.htm";
- articles[12] = "../articles/operator.htm";
- articles[13] = "../articles/unary.htm";
- articles[14] = "../articles/compnd.htm";
- articles[15] = "../articles/compare.htm";
- articles[16] = "../articles/if.htm";
- articles[17] = "../articles/preced.htm";
- articles[18] = "../articles/oprev.htm";
- articles[19] = "../examples/op.htm";
- articles[20] = "../articles/loop.htm";
- articles[21] = "../articles/while.htm";
- articles[22] = "../articles/for.htm";
- articles[23] = "../articles/break.htm";
- articles[24] = "../articles/arrays.htm";
- articles[25] = "../articles/looprev.htm";
- articles[26] = "../examples/loop.htm";
- articles[27] = "../articles/functs.htm";
- articles[28] = "../articles/whatfunc.htm";
- articles[29] = "../articles/scope.htm";
- articles[30] = "../articles/return.htm";
- articles[31] = "../articles/where.htm";
- articles[32] = "../articles/layout.htm";
- articles[33] = "../articles/funcrev.htm";
- articles[34] = "../examples/function.htm";
- articles[35] = "../articles/recurs.htm";
- articles[36] = "../articles/factorl.htm";
- articles[37] = "../articles/io.htm";
- articles[38] = "../articles/tdown.htm";
- articles[39] = "../articles/recrev.htm";
- articles[40] = "../examples/recurs.htm";
- articles[41] = "../articles/frames.htm";
- articles[42] = "../articles/frmset.htm";
- articles[43] = "../articles/noframe.htm";
- articles[44] = "../articles/frme.htm";
- articles[45] = "../articles/target.htm";
- articles[46] = "../articles/morewin.htm";
- articles[47] = "../articles/usewin.htm";
- articles[48] = "../articles/usename.htm";
- articles[49] = "../articles/usefrset.htm";
- articles[50] = "../articles/jsproto.htm";
- articles[51] = "../articles/framerev.htm";
- articles[52] = "../examples/frames.htm";
- articles[53] = "../articles/event.htm";
- articles[54] = "../articles/evntprog.htm";
- articles[55] = "../articles/formobj.htm";
- articles[56] = "../articles/crtform.htm";
- articles[57] = "../articles/iepain.htm";
- articles[58] = "../articles/navobj.htm";
- articles[59] = "../articles/eventrev.htm";
- articles[60] = "../examples/event.htm";
- articles[61] = "../articles/oop.htm";
- articles[62] = "../articles/objexamp.htm";
- articles[63] = "../articles/argv.htm";
- articles[64] = "../articles/addmeth.htm";
- articles[65] = "../articles/objprops.htm";
- articles[66] = "../articles/useobj.htm";
- articles[67] = "../articles/finalobj.htm";
- articles[68] = "../articles/objrev.htm";
- articles[69] = "../examples/object.htm";
- articles[70] = "../articles/cookies.htm";
- articles[71] = "../articles/whatckie.htm";
- articles[72] = "../articles/useckie.htm";
- articles[73] = "../articles/expires.htm";
- articles[74] = "../articles/illegal.htm";
- articles[75] = "../articles/retrieve.htm";
- articles[76] = "../articles/cookrev.htm";
- articles[77] = "../examples/cookies.htm";
- articles[78] = "../articles/abstract.htm";
- articles[79] = "../articles/details.htm";
- articles[80] = "../articles/complex.htm";
- articles[81] = "../articles/ctrad.htm";
- articles[82] = "../articles/src.htm";
- articles[83] = "../articles/header.htm";
- articles[84] = "../articles/lgproj.htm";
- articles[85] = "../articles/result.htm";
- articles[86] = "../articles/abstrev.htm";
- articles[87] = "../examples/abstract.htm";
-
- // viewByReview variable for searching by review articles
- var viewByReview = false;
-
- // move() function
- // if viewByReview is true, skip to previous (or next) review or example (in order)
-
- function move(direction) {
- if(viewByReview) {
- if(direction==1) {
- if(currentPage<4)
- currentPage=4;
- else if(currentPage<5)
- currentPage=5;
- else if(currentPage<10)
- currentPage=10;
- else if(currentPage<11)
- currentPage=11;
- else if(currentPage<18)
- currentPage=18;
- else if(currentPage<19)
- currentPage=19;
- else if(currentPage<25)
- currentPage=25;
- else if(currentPage<26)
- currentPage=26;
- else if(currentPage<33)
- currentPage=33;
- else if(currentPage<34)
- currentPage=34;
- else if(currentPage<39)
- currentPage=39;
- else if(currentPage<40)
- currentPage=40;
- else if(currentPage<51)
- currentPage=51;
- else if(currentPage<52)
- currentPage=52;
- else if(currentPage<59)
- currentPage=59;
- else if(currentPage<60)
- currentPage=60;
- else if(currentPage<68)
- currentPage=68;
- else if(currentPage<69)
- currentPage=69;
- else if(currentPage<76)
- currentPage=76;
- else if(currentPage<77)
- currentPage=77;
- else if(currentPage<86)
- currentPage=86;
- else if(currentPage<87)
- currentPage=87;
- }
- else {
- if(currentPage>87)
- currentPage=87;
- else if(currentPage>86)
- currentPage=86;
- else if(currentPage>77)
- currentPage=77;
- else if(currentPage>76)
- currentPage=76;
- else if(currentPage>76)
- currentPage=76;
- else if(currentPage>69)
- currentPage=69;
- else if(currentPage>68)
- currentPage=68;
- else if(currentPage>60)
- currentPage=60;
- else if(currentPage>59)
- currentPage=59;
- else if(currentPage>52)
- currentPage=52;
- else if(currentPage>51)
- currentPage=51;
- else if(currentPage>40)
- currentPage=40;
- else if(currentPage>39)
- currentPage=39;
- else if(currentPage>34)
- currentPage=34;
- else if(currentPage>33)
- currentPage=33;
- else if(currentPage>26)
- currentPage=26;
- else if(currentPage>25)
- currentPage=25;
- else if(currentPage>19)
- currentPage=19;
- else if(currentPage>18)
- currentPage=18;
- else if(currentPage>11)
- currentPage=11;
- else if(currentPage>10)
- currentPage=10;
- else if(currentPage>5)
- currentPage=5;
- else
- currentPage=4;
- }
- this.page.location.href = articles[currentPage];
- setCookie("lastPage", currentPage);
- } else { // not viewByReview
-
- currentPage += direction;
-
- if(currentPage == -1)
- currentPage = 0;
- else if(currentPage >= articles.length)
- currentPage = articles.length -1;
-
- this.page.location.href = articles[currentPage];
- setCookie("lastPage", currentPage);
- }
- }