|
Can anyone tell me why this script won't work?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Portfolio Page</title>
<script type="text/Javascript">
// JavaScript Document
var samples= new Array(6);
var photoslink= new Array(6);
var clients= new Array(6);
var descriptions= new Array(6);
var whichone=0;
//define images next
samples[0]='../Images/picture1.jpg';
samples[1]='../Images/picture2.jpg';
samples[2]='../Images/picture3.jpg';
samples[3]='../Images/picture4.jpg';
samples[4]='../Images/picture5.jpg';
samples[5]='../Images/picture6.jpg';
//Define whether or not the photos will be linked. (1=linked)
var linkornot= 0
//Place corresponding URL's for photos here.
sampleslink[0]=""
sampleslink[1]=""
sampleslink[2]=""
sampleslink[3]=""
sampleslink[4]=""
sampleslink[5]=""
//Define client info.
clients[0]=new String('<span class="primarynavbar_text">Lady puttin on makeup.</span>')
clients[1]=""
clients[2]=""
clients[3]=""
clients[4]=""
clients[5]=""
//Define client descriptions.
descriptions[0]=""
descriptions[1]=""
descriptions[2]=""
descriptions[3]=""
descriptions[4]=""
descriptions[5]=""
var preloadedsamples=new Array()
var prelaodedclients=new Array()
var preloadeddescriptions=new Array()
for (i=0;i<samples.length;i++){
preloadedsamples[i]=new Image()
preloadedsamples[i].src=samples[i]
preloadedclients[i]=new substring()
preloadedclients[i].src=clients[i].src
preloadeddescriptions[i]=new substring()
preloadeddescriptions[i].src=descriptions[i].src
}
function applyeffect(){
if (document.all && photoslider.filters){
photoslider.filters.revealTrans.Transition=Math.fl oor(Math.random()*23)
photoslider.filters.revealTrans.stop()
photoslider.filters.revealTrans.apply()
}
}
function playeffect(){
if (document.all && photoslider.filters){
photoslider.filters.revealTrans.play()
}
}
function keeptrack(){
window.status="Image "+(whichone+1)+" of "+samples.length
}
function previous(){
if (whichone>0){
which--
applyeffect()
document.images.photoslider.src=samples[whichone]
playeffect();
keeptrack()
}
}
function next(){
if (whichone<samples.length){
which++
applyeffect()
document.images.photoslider.src=samples[whichone]
document.write(clients[whichone].String(clients[whichone])
document.write(descriptions[whichone.String(descriptions[whichone]
playeffect()
keeptrack()
}
}
function transport(){
window.location=photoslink[whichone]
}
</head>
</script>
<body>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" colspan="2" height="22">
<div align="center">
<script>
if (linkornot==1)
document.write('<a href="Javascript:transport()"><img src="'+samples[0]+'" name="photoslider" style="filter:revealTrans(duration=2,transition=23 )" border=0></a>')
else {
document.write('<a href="Javascript:transport()"><img src="'+samples[whichone]+'" name="photoslider" style="filter:revealTrans(duration=2,transition=23 )" border=0></a>')
</script>
</div>
</td>
</tr>
<tr>
<td width="50%" height="21"><p align="left"><a href="#" onClick="retreat();return false">Retreat</a></p></td>
<td width="50%" height="21"><p align="left"><a href="#" onClick="retreat();return false">Advance</a></p></td>
</tr>
</table>
</body>
</html>
|