/*   Picture browser incl. dia show
Revision: 2.1.004
Datum: 27.07.2007
Copyright (c) 1996-2007 ecw - electronic commerce & web: http://top-com.com/  office@top-com.com
- dhtml transitions for IE5+,NS7+,Firefox,DOM compatible UA
- pre-loading of next picture for smooth transition
- fallback for non-scripting UA or scripting disabled UA
*/
var timer1 = null;
var timer2 = null;
function zeig(i) {
if (bild==null) return;
if (aRun) stopp();
if (i>0) {
if (mypic < picanz) {
mypic ++;
b();
}
else a('No further pictures');
}
else {
if (mypic > 1) {
mypic --;
b();
}
else a('No previous pictures');
}
document.forms[0].id.selectedIndex = (mypic - 1);
return false;
}
function a(t) {
document.getElementById('hint').style.visibility = 'visible';
document.getElementById('hint').innerHTML = t + ' available!';
window.setTimeout('document.getElementById(\'hint\').style.visibility = \'hidden\'',1000);
}
function b() {
if (window.timer1) window.clearTimeout(timer1);
if (moz || w3c) FadeOut(1);
else if (ie) {
nbild.filters[0].Apply();
nbild.style.visibility="hidden";
nbild.filters[0].Play();
timer1 = window.setTimeout('FadeInIE()',600);
}
else nbild.src = pic[mypic];
}
function FadeInIE() {
if (window.timer1) window.clearTimeout(timer1);
nbild.filters[0].Apply();
nbild.src = pic[mypic];
nbild.style.visibility="visible";
nbild.filters[0].Play();
preload();
}
function FadeIn(i) {
if (i<=1) {
if (moz) nbild.style.MozOpacity = i;
else nbild.style.opacity = i;
i += 0.05;
timer1 = window.setTimeout('FadeIn(' + i + ')',5);
}
else preload();
}
function FadeOut(i) {
if (i>=0) {
if (moz) nbild.style.MozOpacity = i;
else nbild.style.opacity = i;
i -= 0.05;
timer1 = window.setTimeout('FadeOut(' + i + ')',5);
}
else {
nbild.src = pic[mypic];
FadeIn(0);
}
}
function res1() {
if (document.body.clientHeight) { var doc_height = document.body.clientHeight; var doc_width = document.body.clientWidth; }
else if (self.innerHeight) { var doc_height = self.innerHeight; var doc_width = self.innerWidth; }
document.getElementById('pic1').style.left = (parseInt(doc_width/2) - 205) + 'px';
document.getElementById('hint').style.top = '360px';
document.getElementById('hint').style.left = (parseInt(doc_width/2) - 160) + 'px';
document.getElementById('b1').style.width = doc_width + 'px';
if (document.body.scrollHeight > doc_height) document.getElementById('b1').style.height = document.body.scrollHeight + 'px';
else document.getElementById('b1').style.height = doc_height + 'px';
}
function auto() {
aRun = true;
document.getElementById('b1').style.visibility = 'visible';
document.getElementById('bAuto').src = '/_pic/bute_auto2.gif';
if (window.timer2) window.clearTimeout(timer2);
if (mypic < picanz) mypic ++;
else mypic = 1;
document.forms[0].id.selectedIndex = (mypic - 1);
b();
timer2 = window.setTimeout('auto()',5000);
}
function stopp() {
if (window.timer2) window.clearTimeout(timer2);
aRun = false;
document.getElementById('bAuto').src = '/_pic/bute_auto0.gif';
document.getElementById('b1').style.visibility = 'hidden';
}
function y(i) {
mypic = i;
b();
}
function preload() {
if (mypic < picanz) {
bil1.src = 'pix/a_riedl_' + (mypic + 1) + '.jpg';
}
}

