Questo script, inserito in una pagina asp, alle volte dà errore e alle volte no (e già questo è strano): potete aiutarmi a scoprire cosa c'è che non va? Come errore viene riportato una cosa tipo : "proprietà o metodo non supportati dall'oggetto".
Questo è lo script:


<script LANGUAGE="JavaScript">

// showItems() - displays shopping basket in a table
function showItems() {
index = document.cookie.indexOf("TheBasket");
countbegin = (document.cookie.indexOf("=", index) + 1);
countend = document.cookie.indexOf(";", index);
if (countend == -1) {
countend = document.cookie.length;
}
fulllist = document.cookie.substring(countbegin, countend);
subtotal = 0;
document.writeln('<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><TR VALIGN=Top><TD nowrap><FORM><select class="boxSelect"><option><%=txt_your_cart %></option>');
itemlist = 0;
for (var i = 0; i <= fulllist.length; i++) {
if (fulllist.substring(i,i+1) == '[') {
itemstart = i+1;
thisitem = 1;
} else if (fulllist.substring(i,i+1) == ']') {
itemend = i;
thequantity = fulllist.substring(itemstart, itemend);
itemtotal = 0;
itemtotal = (eval(theprice*thequantity));
temptotal = itemtotal * 100;
subtotal = subtotal + itemtotal;
itemlist=itemlist+1;
document.writeln('<option>'+thequantity+'x'+theite m+'</option>');

} else if (fulllist.substring(i,i+1) == '|') {
if (thisitem==1) theitem = fulllist.substring(itemstart, i);
if (thisitem==2) theprice = fulllist.substring(itemstart, i);
if (thisitem==3) theoption = fulllist.substring(itemstart, i);
thisitem++;
itemstart=i+1;
}
}

document.writeln('</select><FONT SIZE="1" FACE="Verdana">Tot €:</FONT><FONT SIZE="2" FACE="Verdana">'+top.cart.alterError(subtotal)+'</FONT></TD></TR></TABLE>');

}


</script>