function DoPrintLinks()
{
var nCount = 0;
var nEnd = document.links.length;
var outpt="According to JavaScript, this document has "+nEnd+ " link(s) in it.<br>"
for (nCount = 0 ; nCount < nEnd ; nCount ++){
outpt+=document.links[nCount].href + "<br>"
}
document.write(outpt)
}