* indicates lines that have been replaced.

!< indicates lines that have been removed.

!> indicates lines that have been added.

Comparing:     [ 1 ] to [ 2 ]
[ 1 ] webtoolbox-test\htdocs\javascript\department_old.js
[ 2 ] webtoolbox-test\htdocs\javascript\department.js
------------------------------------------------------
=======
1       //// *********************************** ////
2       //// State of California master template ////
=======
3   *   ////             Version 1.20            ////
    *   ////             Version 1.30            ////
4   *   ////       Last Updated 03/23/2007       ////
    *   ////       Last Updated 07/30/2007       ////
=======
5       //// *********************************** ////
6       
7       function breadcrumbs()
8       {
9        if ((document.getElementById) && document.getElementById('breadcrumb_dynamic')) {    // Make sure browser supports getElementById and breadcrumb_dynamic exists
10         var wrkLocation = location.href;
=======
    !>     var wrkLength = wrkLocation.indexOf("#");    // Find the begining of any anchor reference
    !>     if(wrkLength != -1){
    !>       var wrkLocation = wrkLocation.substr(0,wrkLength);    // Extract the anchor reference
    !>     }	
    !>     var wrkLength = wrkLocation.indexOf("?");    // Find the begining of the query string
    !>     if(wrkLength != -1){
    !>       var wrkLocation = wrkLocation.substr(0,wrkLength);    // Extract the query string
    !>     }
=======
11 
=======
12   *     var arrURL=location.href.split("/");    // Array containing the current URL, split at the slashes
     *     var arrURL=wrkLocation.split("/");    // Array containing the current location, split at the slashes
=======
13         var output='Home';    // The string which will be output to the browser, starts with a link to the home page
14         var path = '';    // Link for the crumbs
15
16      // If last item is blank or index.* or default.*, remove it
17         if (arrURL[arrURL.length-1] == '' || arrURL[arrURL.length-1].match(/^index\.|^default\./i) ) {
18           arrURL.length--;
19         }
20
21         if (arrURL.length > 3) {
22           for (counter = 3;counter < arrURL.length-1;counter++) {    // Loop to display the links
=======
    !>         if(path.length == 0){    // always start links with '/' 
    !>           path = '/';
    !>         }
=======
23   *         path += '/' + arrURL[counter];
     *         path += arrURL[counter] + '/';    // always end links to folder with '/' 
=======
24             output += '  ' + arrURL[counter].replace(/_/g,' ') + '';
25           }
26
27        // Display the name of the current page in bold
28           output += '  ' + arrURL[arrURL.length-1].replace(/_/g,' ').replace(/\.\w{3,5}$/,'') + '';
29         }
30         document.getElementById('breadcrumb_dynamic').innerHTML = output;    // Display the breadcrumbs
31       }
32     }
33
34     addLoadEvent(breadcrumbs);    // Add breadcrumbs to the page onload event handler
35
36     // End of breadcrumbs javascript