function fileExtIcon($fileName,$extIconDir) {
$fileExt = trim(strtolower(substr(strrchr($fileName,.),1)));
$fileExtIcon = $extIconDir..$fileExt..gif;
if(!file_exists($fileExtIcon)) $fileExtIcon = $extIconDir.unknown.gif;
$fileExtIconTag = IMG SRC='.$fileExtIcon.' BORDER='0' ALIGN='absMiddle';
return $fileExtIconTag;
}