In this case, the function sendVars() would send a PHP var via the URL. You'd have to GET the var in a form previous to coming to this action page.
The function getImg() would get a specific image, for example:
$hour = date("g");
if ($hour > 9) {
$hour = ($hour - 10) }
returns the current hour, so <img src="http://www.url.com/numberpics/<?=$hour.jpg?>> would return 6.jpg from that site.
<script language="javascript">
function sendVars()
{
location.href=http://www.url.com/index.php?var=<?=$value=?>;
}
function getImg()
{
document.write "<img src=\"http://www.url.com/numberpics/<?=var?>.gif>";
}
</script>
-Adam