Risolto, questione di virgolette, posto lo script per chiudere il post

<script type="text/javascript">


var stile = "top=10, left=10, width=1024, height=600, status=no, menubar=no, toolbar=no scrollbars=no";
function Popup(apri)
{
window.open(apri, "", stile);
}
</script>


<?php
$array_file = glob('*.pdf');
foreach ($array_file as $key => $value)
{
$fileName = substr($value, 0, -4);
echo "<a href='javascript:Popup(\"$value\")'>$fileName</a><br>\n";
}
?>