Code tag apparently can't handle javascript very well, so here it is in php highlighting (it's still javascript though). This is a sample page, ofcourse.
PHP Code:
<html>
<head>
<script language="javascript">
<!--
// Even though this sucks and was made while drunk, it does have copyrights.
// Anyone going around selling this will get their ass kicked.
// It's free to use/give away/whatever (except sell), as long as you leave this notice intact.
// Made by punkworld, ICQ#85992840
galls = new Array();
galls['sluts'] = new Array('Hot sluts', 'Sexy sluts', 'Blonde Sluts', 'Ugly Sluts', 'Hardcore Sluts','Mega sluts','Sucking sluts','Cock hungry sluts','Big-titted sluts');
galls['teens'] = new Array('Teen pics', 'Cute teens', 'Sweet teens', 'Teen hotties', 'Hot Teens', 'Anal Teensex', 'Teen cumshots', 'Teens fucking', 'Slutty teens', 'Horny teens');
function gall(url, cat, listings)
{
number = galls[cat].length;
oldrand = 1000;
for(i = 1; i <= listings; i++){
rand = (Math.floor(Math.random()*number));
if(rand != oldrand){
document.write('<a href="' + url + '" target="_blank">' + galls[cat][rand] + '</a><br>');
oldrand = rand;
}
else{
i--;
}
}
}
//-->
</script>
</head>
<body>
<table width="500">
<tr>
<td>
<script language="javascript">
gall('http://www.site.com/sluts/gallery.html', 'sluts', 25);
</script>
</td>
<td>
<script language="javascript">
gall('http://www.site.com/teens/gallery.html', 'teens', 25);
</script>
</td>
</tr>
</table>
</body>
</html>