Tags

, ,

<script type=”text/javascript” language=”javascript”>
var theImages = new Array()
<?php $n = get_post_meta($post->ID, ‘Number’, true); ?>

<?php for($i=0; $i<$n; $i++) { ?>
<?php $cur_image = get_post_meta($post->ID, ‘Image’.$i, true); ?>
theImages[<?php echo $i; ?>] = ‘<?php echo $cur_image; ?>’
<?php } ?>

var j = 0
var p = theImages.length;
var preBuffer = new Array()

for (i = 0; i < p; i++){
preBuffer[i] = new Image()
preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));

function showImage(){
document.write(‘<a href=”https://www.webrecon.com/b/homepage/”><img src=”‘+theImages[whichImage]+'” alt=” ” /></a>’);
}
</script>
<script type=”text/javascript”>showImage();</script>

Advertisements