// $indexIt=1; // while working @ it
if(typeof $header_0=="undefined"){$header_0="$header_0";}
if(typeof $header_1=="undefined")$header_1="$header_1";
if(typeof $header_2=="undefined")$header_2="$header_2";
if(typeof $indexIt =="undefined")$indexIt=0;
$header_1 = ("
"+$header_1);
$startNumber= 0;
$verschub = 0;
if($startNumber)$imglist[$startNumber]=($imglist[$startNumber].slice(0,8)+"s")
$title =($header_1+" "+$header_0);
document.title = ('_' + $title + ' @ diag.at/foto/');
// onresize="document.getElementsByTagName('H1')[0].innerHTML = 'scr ' + screen.width+'*'+screen.height+' bdy '+document.body.clientWidth+'*'+document.body.clientHeight";
$body = "";
/// some cacls
$bgColor='#ccc';
document.write("\
");
$bodyWid= document.body.clientWidth;
$smallScreen = ($bodyWid < 1000);
//$smallScreen *= 0.7;
$imgWid = 640-(70*$smallScreen);
$imgHig = $imgWid*0.75;
$imgLeft= 300-(90*$smallScreen);
$thnWid = 40-(11*$smallScreen);
$headerSize = 32-(8*$smallScreen);
$bildMitte = $imgLeft + ($imgWid*0.5)*1;//0.7; // ~~center vertical image !
/// some cacls
/// header, linx oben
$body+= "";
if($indexIt)$body+= "";
$body+= ("");
$body+= "";
$body+= ""
$body+= "";
$body+= "";
$milliseconds_0 = new Date().getTime(); // helps @ firefox
$siz = $imglist.length;
$thn="";
for($i=0; $i<$siz-0; $i++){
// $thn+="";
$thn+="";
if($imglist[$i].slice(8,9)==" ")$thn+="
";
if($imglist[$i].slice(8,9)==("XX"||"."))$thn+="
";//for older lists
if($imglist[$i].slice(9,10)==(" "||"."))$thn+="
";//
";
}
$thn+="
";
$thn+="";
$thn+="";
///////////////////////////////////////////////////////////////
// generate html
document.body.innerHTML=$body;
// document.all._600.src=(""+$imglist[0].slice(0,8)+".jpg")
/// check 4 an show start_image
document.all.thn.innerHTML=$thn;
$start = 0;
for($i=0; $i<$siz; $i++){
if($imglist[$i].slice(8,9)==("s")){
$start=$i;
$i=1001;
// document.all._600.src=("img/"+$imglist[$start].slice(0,8)+".jpg");
}
}
// if not found, take thumbNail[0]:
// document.all._600.src= (""+$imglist[$start].slice(0,8)+".jpg");
document.all._600.src=("img/"+$imglist[$start].slice(0,8)+".jpg");
document.all._600_0.src=("img/"+$imglist[$start].slice(0,8)+".jpg");
/// check 4 an show start_image
// generate html
///////////////////////////////////////////////////////////////
$posX=$ii=$ia=$cnt=$anix=0;
/// next((this.src+'_'))
function next($img){
window.clearTimeout($anix);
document.all.subTitle.innerHTML = $header_2+""+$header_1+" / "+$posX;//<
for($iy=0; $iy<$siz; $iy++){
if($imglist[$iy].slice(0,8) == $img.slice(-13,-5)){
$iy += (1 - ($posX<$bildMitte)*2)*($img.indexOf('img')>0); // (300+640)*.5 = 580 :)
//$iy += ($img.indexOf('img')>0); // (300+640)*.5 = 580 :)
if($iy == $siz)$iy=0;
if($iy == -1)$iy=$siz-1;
// $imgX=("img/"+$imglist[$iy].slice(0,8)+".jpg");
$imgX=("img/"+$imglist[$iy].slice(0,8)+".jpg");
$imgY=("img/"+$img.slice(-13,-5)+".jpg");
// document.all._600.src=$imgX;
document.all._600_0.src=document.all._600.src;
document.all._600.src=$imgX;
document.all.txt.innerHTML=($imglist[$iy].slice(10,1000)+" ");
document.all.inf.innerHTML=(" "+$imglist[$iy].slice(0,8)+"["+ $iy +"]"); //+ ($anz-($cnt++)) +"");
$ia = $iy; // ani starts here ?
$iy=$cnt=1001;
}
}
//init();
_fadeIn(80);
};
function preload(){
if($ii<$siz){
$milliseconds_1 = new Date().getTime();$secs = ($milliseconds_1-$milliseconds_0)/1000;
document.all.inf.innerHTML=(" loading: "+$imglist[$ii].slice(0,8)+" |"+ (($siz-$ii)-1) +"|"+$secs+"");
$imgX=("img/"+$imglist[$ii++].slice(0,8)+".jpg");
window.setTimeout("document.images[$siz+2].src=null;document.images[$siz+2].src=$imgX;", 1);
// window.setTimeout("document.images[$siz+1].src=$imgX;", 1);
}else{
// document.images[$siz+1].width=10;document.images[$siz+1].height=0;
//document.all._600.style.borderColor='#aaf';
//document.all._600.src=("img/"+$imglist[$start].slice(0,8)+".jpg");
}
}
function _ani($sex){
$sec=$sex;
$anz=($siz*1);
if ($ia == $siz)$ia = 0;
if($cnt<1001){
document.all.txt.innerHTML=($imglist[$ia].slice(10,1000)+" ");
document.all.inf.innerHTML=(" "+$imglist[$ia].slice(0,8)+"["+ $ia +"]"+ ($anz-($cnt++)) +"/"+($sec/1000)+"s");
document.all._600_0.src=document.all._600.src;
document.all._600.src=("img/"+$imglist[$ia++].slice(0,8)+".jpg");
if(typeof $fader != "undefined"){clearTimeout($fader);}
_fadeIn(80);
$anix=window.setTimeout("_ani($sec)", $sec);
}
if($cnt > $anz){
$cnt=0;window.clearTimeout($anix);
document.all.inf.innerHTML=(" "+$imglist[$ia].slice(0,8));
}
}
//// after_all
//document.all._600.style.borderWidth=5;
//document.all._600.style.borderColor='#fbb';
//document.all.thn.style.height=415;
//document.all.thn.style.borderColor='#f00';
//window.setTimeout("_ani(5000)", 5000);
//document.all.header.innerText = $bildMitte;//document.body.clientWidth+" iWid "+$imgWid;
///////// FADER //////////////
function setOpacity(obj, opacity) {
// opacity = (opacity == 100)?99.999:opacity;
obj.style.filter = "progid:DXImageTransform.Microsoft.Alpha(Opacity="+(opacity*1)+")"; // iE8
obj.style.filter = "alpha(opacity:"+(opacity*1)+")";// IE/Win
obj.style.opacity = (opacity/100.0); // other browserZ
//older
obj.style.KHTMLOpacity = opacity/100; // Safari<1.2, Konqueror
obj.style.MozOpacity = opacity/100; // Older Mozilla and Firefox
}
img_1 = document.getElementById('_600_0');
$speed = 0;
$plu = 10;
if(document.all){$plu *= 5; subTitle.innerHTML=$plu;}
function _fadeIn(opacity) {
opacity -= $plu;
setOpacity(img_1, opacity);
img_1.style.zIndex=3;
if(opacity >= 0){
$fader = window.setTimeout("_fadeIn("+opacity+")", $speed);
// img_1.style.zoom= (opacity*0.01)
}else{img_1.style.zIndex=0;}
};
$go=-1;
function _fadeIt($go){
if($go>0){init();fadeIt(100);}
else{window.clearTimeout($fader); setOpacity(img_0, 100); setOpacity(img_1, 0);}
};
function _pauseFader($pause){
if($cnt > 0){window.clearTimeout($fader);}
if($cnt < 1){
setTimeout("init(); if($cnt < 1){fadeIt(100);}", $pause);
}
}