<?
	$Query = "SELECT MAX(ID) ";
	$Query .= "FROM node ";
	$DatabaseResult = mysql_query($Query, $DatabaseLink);
	$DatabaseRow = mysql_fetch_row($DatabaseResult);
	$totalItems = $DatabaseRow[0];

	srand(date("U"));

	$Query = "SELECT n.ID, n.Name, n.Description, c.Name, (to_days(now()) - to_days(Created)), n.Icon, p.ID ";
	$Query .= "FROM node n, pathway p, content c ";
	$Query .= "WHERE n.Parent = p.ID ";
	$Query .= "AND p.Private='N' ";
	$Query .= "AND n.Content = c.ID ";
	$Query .= "AND  (";
	for($index = 0; $index < 10; $index++)
	{
		$Query .= "n.ID = ";
		$Query .= rand()%($totalItems);
		$Query .= " OR ";
	}
	$Query .= "n.ID = ";
	$Query .= rand()%($totalItems);
	$Query .= ") ";
	
	
	$DatabaseResult = mysql_query($Query, $DatabaseLink);

	$numRows = mysql_NumRows($DatabaseResult);
	
	if($numRows > 0)
	{
		print("<B>Some Nodes Chosen Randomly</B><BR>\n");
		include("$Application_Root/modules/include/display_nodes");
	}
	else
	{
		print("No nodes this time");
	}
	

?>