I try to create a sript where users will navigate tru search records. ( example: http://www.spynets.com/lyrics/lyrics_title3.php?Title=b )

I success to create / modify one script but like you can see on the example it's return 100 pages and all of them are show on the bottom. What I am trying to do it's to have for example << 9,10,11,12,13,14,15,16,17 >> but not all pages. whem some one click on 17 the pagest should be from 17 till 26

here is the code what I am using rught now , need someone to modfy to have above result:

PHP Code:
<?php // Build Page Number Hyperlinks 
echo "<center>Select a Page<br /></center>"

// Build Previous Link 
if($pageNum_rsNewL 1){ 
$prev = ($pageNum_rsNewL 1); 
"<a href=\"".$_SERVER['PHP_SELF']."?Title=$colname_rsNewL&pageNum_rsNewL=$prev\"><<<Prev</a>&nbsp;"

$i 1$i <= $totalPages_rsNewL$i++){ 
$pageNum_rsNewL) == $i){ 
       } else { 
"<a href=\"".$_SERVER['PHP_SELF']."?Title=$colname_rsNewL&pageNum_rsNewL=$i\">$i</a>&nbsp;&nbsp;\r\n";  

// Build Next Link 
if($pageNum_rsNewL $totalPages_rsNewL){ 
$next = ($pageNum_rsNewL 1); 
"<a href=\"".$_SERVER['PHP_SELF']."?Title=$colname_rsNewL&pageNum_rsNewL=$next\">Next>></a>"

Happy New Year !!!!!!!!!

Thank you