function AllSnippets() { var query = document.getElementsByName("former")[0].value; var span = document.getElementsByTagName("span"); for(var x=0;x" text by node var pos1=snippetText.indexOf(""); var pos2=snippetText.indexOf(""); while (pos1 >= 0 && pos2 > pos1) { leftString = document.createTextNode(snippetText.substring(0, pos1)); //other text if (leftString != "") span.appendChild(leftString); //add the bold text strongNode=document.createElement("strong"); middleString=document.createTextNode(snippetText.substring(pos1 + 3, pos2)); strongNode.appendChild(middleString); span.appendChild(strongNode); // cut out left and middle and go on with remaining text snippetText=snippetText.substring(pos2 + 4); pos1=snippetText.indexOf(""); pos2=snippetText.indexOf(""); } // add remaining string if (snippetText != "") { span.appendChild(document.createTextNode(snippetText)); } } function addHover() { if (document.all&&document.getElementById) { var divs = document.getElementsByTagName("div"); for (i=0; i