/* This method generates the required divs for the Level 2 services dynamically. Each div shall have the following format:
where x denotes the "service level 2 name" extracted from the dynamically generated array of Level 2 services as well. */ function appendDivsLevel2(divIDToUpdate, theArrayOfServiceLevel2Names) { //The content to add var contentToAdd = ''; for (var i=0 ; i < theArrayOfServiceLevel2Names.length ; i++) { contentToAdd = contentToAdd + '
'; } //Append the divs to the contents of the main divIDToUpdate document.getElementById(divIDToUpdate).innerHTML = document.getElementById(divIDToUpdate).innerHTML + '\n' + contentToAdd; } /* This method loops through the dynamically-generated array of Level 2 filenames and fills it in with the HTML content htmlFilenameSuffix: e.g.: '_non_nominal_only.html' */ function fillDivsLevel2(theArrayOfServiceLevel2Names, ossiLevel2RefreshingInterval, htmlFilenameSuffix) { for (var i=0 ; i < theArrayOfServiceLevel2Names.length ; i++) { var urlToLoad = '/ossi/level2/' + theArrayOfServiceLevel2Names[i] + htmlFilenameSuffix; //var urlToLoad = '/ossi/level2/' + theArrayOfServiceLevel2Names[i] + '.html'; //Test with the "nominal" html files (it works!!) var divToFillIn = 'ossi_level2_id_' + theArrayOfServiceLevel2Names[i]; refreshData(urlToLoad, divToFillIn, null); setInterval("refreshData('" + urlToLoad + "', '" + divToFillIn + "');", ossiLevel2RefreshingInterval); } } /* This method generates the required divs for the Level 3 services dynamically. Each div shall have the following format:

Please wait while data is being loaded...

where x denotes the "service level 3 name" extracted from the dynamically generated array of Level 3 services as well. */ function appendDivsLevel3(divIDToUpdate, theArrayOfServiceLevel2Names) { //The content to add var contentToAdd = ''; for (var i=0 ; i < theArrayOfServiceLevel2Names.length ; i++) { contentToAdd = contentToAdd + '
' + '

Please wait while data is being loaded...

' + '

'; } //Append the divs to the contents of the main divIDToUpdate document.getElementById(divIDToUpdate).innerHTML = document.getElementById(divIDToUpdate).innerHTML + '\n' + contentToAdd; } /* This method loops through the dynamically-generated array of Level 2 filenames and fills it in with the HTML content htmlFilenameSuffix: e.g.: '_non_nominal_only.html' */ function fillDivsLevel3(theArrayOfServiceLevelNames, ossiLevel3RefreshingInterval, htmlFilenameSuffix) { for (var i=0 ; i < theArrayOfServiceLevelNames.length ; i++) { var urlToLoad = '/ossi/level3/' + theArrayOfServiceLevelNames[i] + htmlFilenameSuffix; var divToFillIn = 'ossi_level3_id_' + theArrayOfServiceLevelNames[i]; var dataTableId = 'dataTable_' + theArrayOfServiceLevelNames[i]; //Fill the data for this service refreshData(urlToLoad, divToFillIn, dataTableId); setInterval("refreshData('" + urlToLoad + "', '" + divToFillIn + "','" + dataTableId + "');", ossiLevel3RefreshingInterval); } } /* Add bookmark link (tested in Firefox, MS IE) */ function addBookmark(title, url) { if (window.sidebar) { // Mozilla Firefox Bookmark window.sidebar.addPanel(title, url,""); } else if( window.external) { // IE Favorite window.external.AddFavorite( url, title); } else if(window.opera && window.print) { // Opera Hotlist // Do Nothing } }