/* Titlepic generation equipment (random images at top of lessons) ===================================================================*/ function getRandomNumber(max) {return (Math.floor(Math.random()*max))+1;} function getTitlePic(tutorial,lesson) { thisPic = getRandomNumber(14); // Number of pics available. Make sure the number here matches the quantity available below! There's no error checking. //thisPic = 14; //testing WIDTH HEIGHT if (thisPic == 1) { titlepicInfo = new Array("titlepic01.gif", "left", "150", "292"); } else if (thisPic == 2) { titlepicInfo = new Array("titlepic02.gif", "right", "201", "155"); } else if (thisPic == 3) { titlepicInfo = new Array("titlepic03.gif", "left", "187", "246"); } else if (thisPic == 4) { titlepicInfo = new Array("titlepic04.gif", "right", "230", "212"); } else if (thisPic == 5) { titlepicInfo = new Array("titlepic05.gif", "left", "228", "193"); } else if (thisPic == 6) { titlepicInfo = new Array("titlepic06.gif", "right", "273", "181"); } else if (thisPic == 7) { titlepicInfo = new Array("titlepic07.gif", "left", "195", "211"); } else if (thisPic == 8) { titlepicInfo = new Array("titlepic08.gif", "right", "215", "219"); } else if (thisPic == 9) { titlepicInfo = new Array("titlepic09.gif", "right", "172", "266"); } else if (thisPic == 10) { titlepicInfo = new Array("titlepic10.gif", "right", "174", "216"); } else if (thisPic == 11) { titlepicInfo = new Array("titlepic11.gif", "left", "198", "196"); } else if (thisPic == 12) { titlepicInfo = new Array("titlepic12.gif", "right", "202", "214"); } else if (thisPic == 13) { titlepicInfo = new Array("titlepic13.gif", "right", "210", "144"); } else if (thisPic == 14) { titlepicInfo = new Array("titlepic14.gif", "right", "164", "266"); } // Lesson 1 is always the pointing teacher if(lesson == "Lesson 1") { titlepicInfo = new Array("titlepic00.gif", "left", "277", "229"); } titlepicName = titlepicInfo[0]; titlepicSide = titlepicInfo[1]; titlepicWidth = titlepicInfo[2]; titlepicHeight = titlepicInfo[3]; if(tutorial == "So, you want to make a Web Page!") { textSizeLine1 = "4"; textSizeLine2 = "6"; } else { textSizeLine1 = "6"; textSizeLine2 = "4"; } if (titlepicSide == "left") { tpline1 = "
"; tpline2 = ""; tpline3 = ""; tpline5 = "
" + tutorial + "
"; tpline4 = " \ \;" + lesson + "
"; } else // we assume it's right { tpline1 = "
"; tpline2 = ""; tpline4 = ""; tpline5 = "
" + tutorial + "
"; tpline3 = " \ \;" + lesson + "
"; } tpline6 = "
"; return tpline1 + tpline2 + tpline3 + tpline4 + tpline5 + tpline6; }