Hi,
You should probably remove the display() function declaration and move its 
body outside it. So, you will have something like 
function sample_menu(){
.....
}
$vid = 3;
....
return $output;
What's the point of sample_menu() ?
-- 
# Vasileios Lourdas,
# Informatics Engineer, Thessaloniki (Greece)
# http://www.lourdas.name