<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=##CHARSET##">
<link rel="stylesheet" href="img/main.css" type="text/css">
<title>Pictures for {Item} # ##id## - ##title##</title>
<script language="JavaScript">
// Duration of crossfade (seconds)
var CrossFadeDuration = 2;
ImgFiles = new Array();
i_f = 0; // array index of current image
ss_turn = 'Off';
delay = 2; // sec
is_loading = false;
total = 0;
function ImgFade() {
var n = navigator;
if ((n.appName.indexOf("Explorer") >= 0) && (n.userAgent.indexOf("Opera") == -1) && (n.userAgent.indexOf("AOL") == -1)){
var fobj = document.images.PictureBox;
fobj.style.filter="blendTrans(duration=CrossFadeDuration)";
fobj.filters.blendTrans.Apply();
fobj.filters.blendTrans.Play();
}
}
function NextImg() {
if(!is_loading){
if (i_f<total) i_f++;
else i_f=0;
LoadImg(ImgFiles[i_f]);
}
SlideShow();
}
function PrevImg() {
if (i_f>0) i_f--;
else i_f=total;
LoadImg(ImgFiles[i_f]);
}
function Turn() {
ss_turn = (ss_turn == 'Off') ? 'On' : 'Off';
SlideShow();
}
function SlideShow() {
if(ss_turn=='On'){
if(document.images){
var idx = (i_f<total) ? i_f+1 : 0;
var im_preload = new Image();
im_preload.src = "##FILE_URL##"+ImgFiles[idx];
}
setTimeout('NextImg()',delay*1000);
}
}
function SetDelay() {
delay = document.settings.delay_time.value;
}
var p_f = '##f##';
function LoadImg(f){
ImgFade();
if(p_f==f) return;
p_f = f;
is_loading = true;
document.images.PictureBox.src = '##FILE_URL##'+f;
is_loading = false;
}
/*
function PreLoadImages(){
if(!document.images) return;
picture = new Array();
picture["file"] = new Image();
picture["file"].src = "##FILE_URL##file";
}
window.onload = function() {
PreLoadImages();
}
*/
</script>
</head>
<body>
<table border=0 cellspacing=0 cellpadding=4 width="100%">
<tr>
<td><big><font face=arial color=#000000> <b> Pictures for {Item} # ##id## - ##title##</b></font></big></td>
</tr>
</table>
<hr size=1 />
<table border=0 cellpadding=0 cellspacing=1 width="100%">
<tr valign=top>
<td align=center bgcolor="#EEEEEE">
<table border=0 cellpadding=4 cellspacing=0 width="100%" height="12">
<tr>
<form method="post" name="settings">
<td align=right height="11" valign="top">
<div align="right">
<input type="Checkbox" name="slideshow_turn" onclick="Turn();"> Slide Show
<select size="1" name="delay_time" onchange="SetDelay();">
<option value="2">2
<option value="3">3
<option value="4">4
<option value="5">5
<option value="6">6
<option value="7">7
<option value="8">8
<option value="9">9
<option value="10">10
</select>
sec (delay)
<input type="Button" value=" << " onmouseup="PrevImg();">
<input type="Button" value=" >> " onmouseup="NextImg();">
<input type="button" value="Close" onClick="window.close()">
</div>
</td>
</form>
</tr>
</table>
</td>
</tr>
<tr valign=top>
<td bgcolor="#eeeeee" align=center>
<br />
<img src="##FILE_URL####f##" name=PictureBox>
<br /><br />
</td>
</tr>
</table>
<table border=0 align=center>
<tr>
<!-- TPL_INSERT : hawk_file -->
<!-- TPL_CELL : def -->
<script language="JavaScript">
ImgFiles.push("##file##");
</script>
<td><center>
<a href="javascript:LoadImg('##file##')"><img src="##FILE_URL##small/##file##" border=0><br />
<font class=txt8 color=#0000FF>##file_txt##</font></a>
</td>
<!-- /TPL_CELL : def -->
<!-- TPL_CELL : br -->
</tr>
<tr>
<!-- /TPL_CELL : br -->
<!-- TPL_CELL : blank -->
<td> </td>
<!-- /TPL_CELL : blank -->
<!-- /TPL_INSERT : hawk_file -->
</tr>
</table>
<script language="JavaScript">
total = ImgFiles.length-1;
SetDelay();
</script>
</body>
</html>