/********************************************* ** This script written by: ** Michael L. Curry, Web-Data Internet Services ** mlc@web-data.org, http://www.web-data.org ** (C) Copyright 1999, All rights reserved ** This script may be used only by students ** of JavaScript programming taught by the author. ** You are required to credit the author if you ** Incorporate this script into other pages. ***********************************************/ /********************************************* ** Generic DHTML is designed to work as follows ** ** 1. A frameset file references *this* script ** 2. The script writes html to the "main" frame ** 3. The pages are connected linearly (1-6) ** 4. Next and Back buttons cycle the pages ** 5. You can modify the frame any way you like ** Except: name the main window "main" ** And: put ** between the and tag ***********************************************/ /*******************Next is variables************************/ /* ** to change the default page, edit the next lines */ default_page = 'dhtmlFrame.htm' /** to change the image files, edit the next lines */ next = 'images/next.gif' back = 'images/back.gif' background = 'images/leaf.gif' /** Edit these lines to adjust fade ** See extensive fade notes below in fader() ** ** fade out from document BG color ** (lt blue) to dk blue */ fadeOut = 'fade(51,204,255,51,0,51,100)' /* fade from dk blue back to lt blue ** Ending rgb color should match the ** got page 1 ') parent.main.document.writeln('Some text text text text text ') /* Stop here!!!!!!!!!!!!!!!!!!!!! */ end_html() } function page2() { start_html() navigation(2) /* replace these lines with the dhtml you want to appear */ parent.main.document.writeln('

got page 2

') parent.main.document.writeln(' ') parent.main.document.writeln(' ') /* Stop here!!!!!!!!!!!!!!!!!!!!! */ end_html() } function page3() { start_html() navigation(3) /* replace these lines with the dhtml you want to appear */ parent.main.document.writeln('

got page 3

') parent.main.document.writeln(' ') parent.main.document.writeln(' ') /* Stop here!!!!!!!!!!!!!!!!!!!!! */ end_html() } function page4() { start_html() navigation(4) /* replace these lines with the dhtml you want to appear */ parent.main.document.writeln('

got page 4

') parent.main.document.writeln(' ') parent.main.document.writeln(' ') /* Stop here!!!!!!!!!!!!!!!!!!!!! */ end_html() } function page5() { start_html() navigation(5) /* replace these lines with the dhtml you want to appear */ parent.main.document.writeln('

got page 5

') parent.main.document.writeln(' ') parent.main.document.writeln(' ') /* Stop here!!!!!!!!!!!!!!!!!!!!! */ end_html() } function page6() { start_html() navigation(6) /* replace these lines with the dhtml you want to appear */ parent.main.document.writeln('

got page 6

') parent.main.document.writeln(' ') parent.main.document.writeln(' ') /* Stop here!!!!!!!!!!!!!!!!!!!!! */ end_html() } function start_html() { /* ** This function sets up the page color and table tags ** it also references this file as it's script */ parent.main.document.open() parent.main.document.writeln('Dynamic Template\ ') //make the page fade in to our bgcolor fader() parent.main.document.writeln('\
\ ') } /* ** This function gets called at the bottom of each page. It adds the back and ** next buttons as well as the javascript "events" to go forward and backward *************************************************/ function navigation(currentPage) { var pg_back = new Number(currentPage - 1) var pg_fwd = new Number(currentPage + 1) parent.main.document.writeln('
\ \

\ Back\ \ \ \ \ Next

') } function end_html() { parent.main.document.writeln('
') parent.main.document.close() } /*********** Fade functions ************************** ** This code was ported from http://builder.com/ ** ** Example: //fade from black to white fade(0,0,0,255,255,255,150); ** Play with the seven numbers. ** The first three are the red, green, and blue values for the starting RGB color; the next three are the same for the finishing color. The final number tells the function how many steps to take from the first color to the last. The higher this number, the slower and more gradual the fade. So the existing numbers tell the page to fade from black (0,0,0) to white (255,255,255) in 150 gradations. ******************************************************/ function fader() { parent.main.document.writeln('') }