<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function Start(page) {
OpenWin = this.open(page, "CtrlWindow", "toolbar=yes,menubar=yes,location=yes,scrollbars=yes,resizable=yes");
}
// End -->
</SCRIPT>
<%
response.write PageHeader
'****************************************************************************
'* Subroutines
'*
'* These routines are used by other parts of the script.
'****************************************************************************
Function CountLinks (Category)
SQLd "Select Count(*) From Links Where CategoryID " & Category & " AND Live=1"
Set RSd=dbc.execute(SQLd)
RSd.MoveFirst
NumberLinks = RSd(0)
SQLe "Select * From Categories Where ParentCategoryID " & Category
Set RSe=dbc.execute(SQLe)
If Not RSe.EOF then
RSe.MoveFirst
Do While Not RSe.EOF
NumberLinks = NumberLinks + CountLinks(RSe("CategoryID"))
RSe.MoveNext
LoopSQLe "Select * From description Where ParentCategoryID " & Category
Set RSe=dbc.execute(SQLe)
End If
CountLinks = NumberLinks