1*83a54b2fSSadaf Ebrahimi//**************************************************************** 2*83a54b2fSSadaf Ebrahimi// Writes a table data element to the document. If pHRef equals 3*83a54b2fSSadaf Ebrahimi// pCurrentPage then 'class="current"' is added to the td element. 4*83a54b2fSSadaf Ebrahimi// For example: 5*83a54b2fSSadaf Ebrahimi// writeTD("a.html", "a.html", "b") 6*83a54b2fSSadaf Ebrahimi// Would write 7*83a54b2fSSadaf Ebrahimi// <td class="current"><a href="a.html">b</a><td> 8*83a54b2fSSadaf Ebrahimi// 9*83a54b2fSSadaf Ebrahimi// @param pCurrentPage the current page. For example "index.html" 10*83a54b2fSSadaf Ebrahimi// @param pHRef the string that should apear in the href 11*83a54b2fSSadaf Ebrahimi// @param pValue the string that should apear as the value 12*83a54b2fSSadaf Ebrahimi//**************************************************************** 13*83a54b2fSSadaf Ebrahimifunction writeTD(pCurrentPage, pHRef, pValue) 14*83a54b2fSSadaf Ebrahimi{ 15*83a54b2fSSadaf Ebrahimi document.write(' <td') 16*83a54b2fSSadaf Ebrahimi document.write(pCurrentPage == pHRef ? ' class="current"' : '') 17*83a54b2fSSadaf Ebrahimi document.write('><a href="') 18*83a54b2fSSadaf Ebrahimi document.write(pHRef) 19*83a54b2fSSadaf Ebrahimi document.write('">') 20*83a54b2fSSadaf Ebrahimi document.write(pValue) 21*83a54b2fSSadaf Ebrahimi document.writeln('</a></td>') 22*83a54b2fSSadaf Ebrahimi} 23*83a54b2fSSadaf Ebrahimi 24*83a54b2fSSadaf Ebrahimi//****************************************************************** 25*83a54b2fSSadaf Ebrahimi// Writes the main menu to the document. 26*83a54b2fSSadaf Ebrahimi// @param pCurrentPage the current page. For example "index.html" 27*83a54b2fSSadaf Ebrahimi//****************************************************************** 28*83a54b2fSSadaf Ebrahimifunction displayMenu(pCurrentPage) { 29*83a54b2fSSadaf Ebrahimi document.writeln('<div id="topmenu">') 30*83a54b2fSSadaf Ebrahimi document.writeln(' <table width="100%">') 31*83a54b2fSSadaf Ebrahimi document.writeln(' <tr>') 32*83a54b2fSSadaf Ebrahimi writeTD(pCurrentPage, "index.html", "Welcome") 33*83a54b2fSSadaf Ebrahimi writeTD(pCurrentPage, "download.html", "Download") 34*83a54b2fSSadaf Ebrahimi writeTD(pCurrentPage,"documentation-main.html", "Documentation") 35*83a54b2fSSadaf Ebrahimi writeTD(pCurrentPage, "migrating.html", "Migrating from JUnit") 36*83a54b2fSSadaf Ebrahimi writeTD(pCurrentPage, "../javadocs/index.html", "JavaDoc") 37*83a54b2fSSadaf Ebrahimi writeTD(pCurrentPage, "selenium.html", "Selenium") 38*83a54b2fSSadaf Ebrahimi document.writeln(' </tr>') 39*83a54b2fSSadaf Ebrahimi document.writeln(' <tr>') 40*83a54b2fSSadaf Ebrahimi writeTD(pCurrentPage, "eclipse.html", "Eclipse") 41*83a54b2fSSadaf Ebrahimi writeTD(pCurrentPage, "idea.html", "IDEA") 42*83a54b2fSSadaf Ebrahimi writeTD(pCurrentPage, "maven.html", "Maven") 43*83a54b2fSSadaf Ebrahimi writeTD(pCurrentPage, "ant.html", "Ant") 44*83a54b2fSSadaf Ebrahimi writeTD(pCurrentPage, "misc.html", "Miscellaneous") 45*83a54b2fSSadaf Ebrahimi writeTD(pCurrentPage, "book.html", "Book") 46*83a54b2fSSadaf Ebrahimi writeTD(pCurrentPage, "http://beust.com/kobalt", "Kobalt") 47*83a54b2fSSadaf Ebrahimi document.writeln(' </tr>') 48*83a54b2fSSadaf Ebrahimi document.writeln(' </table>') 49*83a54b2fSSadaf Ebrahimi document.writeln(' </div>') 50*83a54b2fSSadaf Ebrahimi 51*83a54b2fSSadaf Ebrahimi} 52*83a54b2fSSadaf Ebrahimi 53