//Code to add the articles to Road Tests>Wheels Handling Olympics if (document.forms[0].PageType.value == "index" && currentSubsection == "Wheels Handling Olympics") { tmpCount = Number(document.forms[0].Count.value); tmpStart = Number(document.forms[0].Start.value); tmpLast = tmpStart+tmpCount; tmpType = document.forms[0].PageType.value; tmpElements = searchResultshandlindOlympics.length - 1; // headline if (unescape(document.forms[0].Type.value) == "Subsections") { document.write('

',currentSubsection.toUpperCase(),'

'); } else { document.write(''); } if ( tmpLast > (tmpStart + tmpElements) ) { tmpLast = tmpStart + tmpElements; } //for (var j = tmpStart; j < tmpLast; j++) for (var j = tmpLast - 1; j >= tmpStart; j--) { if (typeof(searchResultshandlindOlympics[j]) != 'undefined') { // check error for non-existing indexes if (unescape(searchResultshandlindOlympics[j].viewTitle) == "No items available.") { document.write('
No items available.
'); } else { //var storyLink=getStoryLink(currentSection.replace(/\s/ig,"_"),searchResultshandlindOlympics[j].viewDocID,(unescape(searchResultshandlindOlympics[j].viewTitle)).replace(/\s/ig,"+")); var storyLink=getStoryLink(unescape(searchResultshandlindOlympics[j].viewSection),searchResultshandlindOlympics[j].viewDocID,(unescape(searchResultshandlindOlympics[j].viewTitle)).replace(/\s/ig,"+")); if(j == tmpStart)//if it is the first storyContainer add a top margin { document.write('
'); } else { document.write('
'); } if (currentSection!="News" && currentSection!="Road Tests" && currentSection!="My Wheels") { document.write(''); } else { document.write(''); } var subsectionLink = "/wheels/site/index?open&type=Subsections&cat=" + unescape(searchResultshandlindOlympics[j].viewSection) + "&ui=dom&template=domWheels&start=1&count=10"; var splitLinkTitle = (unescape(searchResultshandlindOlympics[j].viewSection)).split(">"); document.write('
',unescape(searchResultshandlindOlympics[j].viewArticleAuthorName),' | ',unescape(searchResultshandlindOlympics[j].viewPageDate),' | ',splitLinkTitle[1],'
'); document.write('
',unescape(searchResultshandlindOlympics[j].viewSummary),'
'); } } } // next / previous document.write('

'); // previous if (tmpStart > 1) { document.write(''); } if (searchResultshandlindOlympics.length > tmpStart+(tmpCount-1)) { // next document.write(''); } document.write('
PreviousNext
'); }