// tools.js - copyright 1998-2001 iService
// Requires  JavaScript 1.2
/* 
you can use this script for non-profit-projects for free -
please leave a copyright-notice(www.iservice.at)in the head of the script
for commerce-projects contact us via internet office@iservice.at
*/

var bwn,bwv,version;
var bwn = navigator.appName;
if(bwn == "Netscape"){
bwv = parseInt(navigator.appVersion);
if(bwv >= 5){version = "n6";}
if(bwv < 5){version = "n4";}
}
else if (bwn == "Microsoft Internet Explorer" )
{
var bw1=navigator.appVersion;
var bw2=bw1.indexOf('MSIE',0);
var bw3=bw1.substring(bw2 + 5,bw2 + 6)
bwv = parseInt(bw3);
if(bwv >= 6){version = "e6";}
if(bwv < 6){version = "e4";}
}
else {version = "xx";}

function lead(){window.setTimeout('lead2()',4000);}
function lead2(){this.location.href='indexstart.html';}

var win= null;
function showbigpic(pic,pictext,title){
if (bwn =='Netscape'){ysite = window.innerHeight;
ysiteo = window.outerHeight;
}
if (bwn =='Microsoft Internet Explorer'){ysite = document.body.clientHeight;
ysiteo = window.outerHeight;
}
var scrollbar=0;
var url="picsolo.php?pic="+pic+"&pictext="+pictext+"&title="+title;
hmenu=280;
bmenu=400;
xw=10;
yw=60;
argsw= "width=" + bmenu +","
+ "height=" + hmenu + ","
+ "location=0,"
+ "menubar=0,"
+ "resizeable,"
+ "scrollbars=" + scrollbar + ","
+ "status=0,"
+ "titlebar=0,"
+ "toolbar=0,"
+ "hotkeys=0,"
+ "screenx=" + xw + ","
+ "screeny=" + yw + ","
+ "left=" + xw + ","
+ "top=" + yw ;
if (win != null && !win.closed){win.close();}
win= window.open(url,"plus",argsw);
win.focus();

} 

var win= null;
function showbigpic2(pic,pictext,title){
if (bwn =='Netscape'){ysite = window.innerHeight;
ysiteo = window.outerHeight;
}
if (bwn =='Microsoft Internet Explorer'){ysite = document.body.clientHeight;
ysiteo = window.outerHeight;
}
var scrollbar=0;
var url="picsolo2.php?pic="+pic+"&pictext="+pictext+"&title="+title;
hmenu=280;
bmenu=400;
xw=10;
yw=60;
argsw= "width=" + bmenu +","
+ "height=" + hmenu + ","
+ "location=0,"
+ "menubar=0,"
+ "resizeable,"
+ "scrollbars=" + scrollbar + ","
+ "status=0,"
+ "titlebar=0,"
+ "toolbar=0,"
+ "hotkeys=0,"
+ "screenx=" + xw + ","
+ "screeny=" + yw + ","
+ "left=" + xw + ","
+ "top=" + yw ;
if (win != null && !win.closed){win.close();}
win= window.open(url,"plus",argsw);
win.focus();

} 

function showbigpic3(pic,pictext,title){
if (bwn =='Netscape'){ysite = window.innerHeight;
ysiteo = window.outerHeight;
}
if (bwn =='Microsoft Internet Explorer'){ysite = document.body.clientHeight;
ysiteo = window.outerHeight;
}
var scrollbar=0;
var url="picsolo3.php?pic="+pic+"&pictext="+pictext+"&title="+title;
hmenu=280;
bmenu=400;
xw=10;
yw=60;
argsw= "width=" + bmenu +","
+ "height=" + hmenu + ","
+ "location=0,"
+ "menubar=0,"
+ "resizeable,"
+ "scrollbars=" + scrollbar + ","
+ "status=0,"
+ "titlebar=0,"
+ "toolbar=0,"
+ "hotkeys=0,"
+ "screenx=" + xw + ","
+ "screeny=" + yw + ","
+ "left=" + xw + ","
+ "top=" + yw ;
if (win != null && !win.closed){win.close();}
win= window.open(url,"plus",argsw);
win.focus();

} 


function fopenplus(url,bmenu,hmenu,scrollbar) {  
if (bwn =='Netscape'){
ysite = window.innerHeight;
ysiteo = window.outerHeight;
xsite = window.innerWidth;
xsiteo = window.outerWidth;
}
if (bwn =='Microsoft Internet Explorer'){
ysite = document.body.clientHeight;
ysiteo = window.outerHeight;
xsite = document.body.clientWidth;
xsiteo = window.outerWidth;
}

xw=xsite/2 - bmenu;
yw= 190;
argsw= "width=" + bmenu +","
+ "height=" + hmenu + ","
+ "location=0,"
+ "menubar=0,"
+ "resizeable,"
+ "scrollbars=" + scrollbar + ","
+ "status=0,"
+ "titlebar=0,"
+ "toolbar=0,"
+ "hotkeys=0,"
+ "screenx=" + xw + ","
+ "screeny=" + yw + ","
+ "left=" + xw + ","
+ "top=" + yw ;
if (win != null && !win.closed){win.close();}
win= window.open(url,"plus",argsw);
win.focus();
} 

function a(txt) {self.status = txt;}
function b() {self.status = "";}

function ax() {window.status = "FREILAND - Umweltconsulting";}
function bx() {window.status = "";}


function initausschnitt(url){
if (navigator.appName =='Netscape')
{
bmenu = window.innerWidth;
hmenu = window.innerHeight;
fopenausschnitt(url,bmenu,hmenu);


}
if (navigator.appName =='Microsoft Internet Explorer') 
{
bmenu = document.body.scrollWidth;
hmenu = document.body.scrollHeight;
bmenu = bmenu -640;
hmenu = hmenu -350;
fopenausschnitt(url,bmenu,hmenu);


}
}

nereidFadeObjects = new Object();
nereidFadeTimers = new Object();

function nereidFade(object, destOp, rate, delta){
if (!document.all)
return
    if (object != "[object]"){  
        setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0);
        return;
    }
        
    clearTimeout(nereidFadeTimers[object.sourceIndex]);
    diff = destOp-object.filters.alpha.opacity;
    direction = 1;
    if (object.filters.alpha.opacity > destOp){
        direction = -1;
    }
    delta=Math.min(direction*diff,delta);
    object.filters.alpha.opacity+=direction*delta;

    if (object.filters.alpha.opacity != destOp){
        nereidFadeObjects[object.sourceIndex]=object;
        nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
    }
}


function rez() 
{
var xx= this.window.document.images['picsolo'].width;
var yy= this.window.document.images['picsolo'].height;

// alert(xx);
// alert(yy);
xx=xx+80;
yy=yy+90;
this.window.resizeTo(xx,yy);

}

function rez2() 
{
var xx= this.window.document.images['picsolo'].width;
var yy= this.window.document.images['picsolo'].height;

// alert(xx);
// alert(yy);
xx=xx+80;
yy=yy+200;
this.window.resizeTo(xx,yy);

}

function rez3() 
{

if (bwn =='Netscape'){
py = window.innerWidth;
px = window.innerHeight;
xx = 0;
px = 0;
}
if (bwn =='Microsoft Internet Explorer'){
yy = document.body.clientHeight;
py = document.body.scrollHeight;
xx = document.body.clientWidth;
px = document.body.scrollWidth;
}

xx=px + 40;
yy=yy+py;

if (xx>680){xx=680;}
if (yy>500){yy=500;}

this.window.resizeTo(xx,yy);

}

