I'm not exactly sure what you want to do, but I think you're after something like this -
<?
$body = '';
if($score > 70) {
// do something in php
$body = 'onLoad="doJavascriptFunction()"';
}
?>
<html>
<head>
</head>
<body <? echo $body; ?>>
</body>
This way body is normally blank, however, if the score is above 70 an onLoad flag is added to the body tag forcing the JS to pop a window up