function rollover(rowId){ document.getElementById(rowId).className = 'viewrowover'; } function rollout(rowId){ document.getElementById(rowId).className = 'viewrow'; } function openDocument(documentURL){ //Compute the relative path and assign it to baseURL in the HTML Head of the //ViewTemplate. Then this function can be called from views. top.body.location.href = documentURL; } function toggleCategory(catId){ //builds a URL to either expand or collapse a category based on the current state var newViewURL = ''; //if a start parameter is in effect we must keep it as it determines the page to display if (startCount != ''){ newViewURL = baseViewURL + '&Start=' + startCount } else { newViewURL = baseViewURL } //find the image for the clicked category to determine it's current state var currentCatImage = document.getElementById('cat' + catId).src; if (currentCatImage.toLowerCase().indexOf('expand') == -1){ //the current category does not have expand image, so it is already expanded newViewURL += '&Collapse=' + catId + '#' + catId; } else { newViewURL += '&Expand=' + catId + '#' + catId; } window.location.href = newViewURL; } function setCategories(){ var viewURL = window.location.href.toLowerCase(); var selectedCategory = ''; if (viewURL.indexOf('expandview') > 0){ setAllTwisties(); } if (viewURL.indexOf('expand=') > 0){ setTwisties(expandCat, true); } if (viewURL.indexOf('collapse=') > 0){ setTwisties(collapseCat, false); } } function setTwisties(catID, expandAction){ var catLength = catID.length //set up all subcategories for (counter = 0; counter < catLength; counter++){ if (catID.charAt(counter) == '.'){ setTwistie(catID.substring(0, counter)) } } if (expandAction){ //set up the actual category clicked, if user is expanding setTwistie(catID) } } function setAllTwisties(){ //function called when Expand All being used, updates all twisties for (counter = 0; counter < document.images.length; counter++){ imageId = document.images[counter].id if (imageId.indexOf('cat') != -1){ setTwistie(imageId.substring(3)) } } } function setTwistie(catID){ //this code changes the image of a twistie and changes it's URL try { var twistieImage = document.all['cat' + catID] twistieImage.src = 'collapse.gif'; } catch(e){} } function expandAll(){ document.frames['viewdata'].document.getElementById('expand_all').click(); } function collapseAll(){ document.frames['viewdata'].document.getElementById('collapse_all').click(); } function nextPage(){ document.frames['viewdata'].document.getElementById('next_page').click(); } function previousPage(){ document.frames['viewdata'].document.getElementById('previous_page').click(); } function refreshView(){ document.frames['viewdata'].location.reload(); }