/* Create, then append, a new TextNode object. */
function newTextElement(elemID,arrayname,num,prefix) {
arrayname = eval(arrayname);
var newelement = document.getElementById(elemID); 
var newtext = document.createTextNode(prefix + arrayname[num]);
newelement.appendChild(newtext);
}
/* show detailed product description  */ 
function showdetail(num) {
var detailelem = "detail" + num;
var lastNodeValue = document.getElementById(detailelem).lastChild.nodeValue;
if (lastNodeValue == null || lastNodeValue.charAt(0) == "" || lastNodeValue.charAt(0) == "\n" || lastNodeValue.length < 3) {
newTextElement(detailelem,moredesc,num,"  :::  ");
 }
}
