// tools.js - copyright 1998-2002 iService

// Requires  JavaScript 1.2

/*

you can use this script for non-commercial projects for free -

please leave a copyright-notice (www.iservice.at) in the head of the script

for commercial projects contact us - 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";}





var win= null;

function fopenplus(url,bmenu,hmenu,scrollbar) {  

if (bwn =='Netscape'){ysite = screen.height;

xsite = screen.width;

}

if (bwn =='Microsoft Internet Explorer'){ysite = screen.height;

xsite = screen.width

}



xw=(+20);

yw=(ysite-hmenu)/2 +4 ;

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 fopenplusp(url,picurl,bmenu,hmenu,scrollbar) {  

if (bwn =='Netscape'){ysite = screen.height;

xsite = screen.width;

}

if (bwn =='Microsoft Internet Explorer'){ysite = screen.height;

xsite = screen.width

}

url = url +"?picphp="+picurl;



xw=(xsite - bmenu -20);

yw=+50 ;

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 = "Sch&uuml;tzenbezirk Landeck";}

function bx() {window.status = "";}



function lead(){window.setTimeout('lead2()',8000);}

function lead2(){

window.location.href='indexstart.html';

}







function setflash(){

top.frames[2].location.href='mainnavi.html';

}



function initausschnitt(url,x,y){

bmenu = screen.width;

hmenu = screen.height;

bmenu = bmenu-x;

hmenu = hmemu-y;

fopenausschnitt(url,bmenu,hmenu,x,y);

}



function shiftbg (xbg,wbg)

 {

if (bwn =='Microsoft Internet Explorer'){

parent.frames[3].document.all['bgnavi'].style.left = xbg;

parent.frames[3].document.all['bgpic'].style.width = wbg;

}

if(bwn == "Netscape"){

if (version =='n6'){

inhaltbg=parent.frames[3].document.getElementById("bgnavi");

inhaltbg.style.left=xbg;

inhaltbg=parent.frames[3].document.getElementById("bgpic");

inhaltbg.style.width=wbg;

}

else{

parent.frames[3].document['bgnavi'].left = xbg;

parent.frames[3].document['bgnavi'].document['bgpic'].width = wbg;



}} 

}



function change2frames(urlsubnavi,urlinh,urlnavi){


parent.frames['navi'].location.href = urlnavi;

parent.frames['subnavi'].location.href = urlsubnavi;

parent.frames['inh'].location.href = urlinh;



}


function change55frames(urlsubnavi,urlinh,urlnavi){

parent.frames['navi'].location.href = urlnavi;

window.setTimeout("follow1_change2frames("+urlsubnavi+")",100);

window.setTimeout("follow2_change2frames("+urlinh+")",200);


}


function follow1_change2frames(urlsubnavi){

parent.frames['subnavi'].location.href = urlsubnavi;

}

function follow2_change2frames(urlinh){

parent.frames['inh'].location.href = urlinh;

}



function gourl (value){

if (value){

var value2=value.indexOf('&',0);

if (value2!="-1"){

var value2=value.indexOf('&',0);

var value3=value.substring(0,value2);

var value4=value.length;

var value5=value.substring(value2+6,value4);

top.frames['inh'].location.href=value3;

top.frames['subnavi'].location.href=value5;

var value6=value.indexOf('?',0);

if (value6!="-1"){

var value7=value.substring(value6+1,value4);

var value8=value.substring(value2+6,value6);

}

else{

value8=value.substring(value2+6,value4);

value7='';

}

if(value8=='subnavi.php'){top.frames['navi'].location.href='navi.php';}

if(value8=='subnavi1.php'){top.frames['navi'].location.href='navi1.php?' + value7;}

if(value8=='subnavi2.php'){top.frames['navi'].location.href='navi2.php?' + value7;}

if(value8=='subnavi3.php'){top.frames['navi'].location.href='navi3.php?' + value7;}

if(value8=='subnavi4.php'){top.frames['navi'].location.href='navi4.php?' + value7;}

}

else{

top.frames['inh'].location.href=value;

}

}

}



function chpichead(urlpic){



var pic='naviheadline';

if (navigator.appName =='Microsoft Internet Explorer'){

top.frames['navi'].document.images[pic].src =  "pictures/header/"+ urlpic;}

if (navigator.appName =='Netscape'){

if (version=="n6"){

top.frames['navi'].document.images[pic].src =  "pictures/header/"+ urlpic;}

else{

top.frames['navi'].document.images[pic].src =  "pictures/header/"+ urlpic;}

}



}





var images = new Array;

images[1] = "pictures/rotate/01.jpg"

images[2] = "pictures/rotate/02.jpg"

images[3] = "pictures/rotate/03.jpg"

images[4] = "pictures/rotate/04.jpg"

images[5] = "pictures/rotate/05.jpg"

images[6] = "pictures/rotate/06.jpg"

images[7] = "pictures/rotate/07.jpg"

images[8] = "pictures/rotate/08.jpg"

images[9] = "pictures/rotate/09.jpg"

images[10] = "pictures/rotate/10.jpg"

var pic2='picrot';



function picrot(){

var imagenumber = 10 ;

var randomnumber = Math.random() ;

var rand1 = Math.round( (imagenumber-1) * randomnumber) + 1 ;

var image = images[rand1];

if (navigator.appName =='Microsoft Internet Explorer'){

top.frames['pic'].document.images[pic2].src = image;}

if (navigator.appName =='Netscape'){

if (version=="n6"){

top.frames['pic'].document.images[pic2].src = image;}

else{

top.frames['pic'].document.images[pic2].src = image;}

}

window.setTimeout('picrot()',5000);

}



var textlayer6 ="point7";

var textlayer7;

var textlayer8;

var textlayer9;



function pointfix(bildtextlayer){

for (ss=1; ss<6; ss++){

textlayer7="point"+ss;
textlayer77=top.frames['navi'].document.getElementById(textlayer7);
textlayer77.style.color="#ffcc00";

}

textlayer6="point"+bildtextlayer;
textlayer66=top.frames['navi'].document.getElementById(textlayer6);
textlayer66.style.color="#ffffff";

}



function pointfix_old(bildtextlayer){



if (navigator.appName =='Microsoft Internet Explorer')

{

for (ss=1; ss<6; ss++){

textlayer7="point"+ss;

top.frames['navi'].document.all[textlayer7].style.color="#ffcc00";

}



textlayer6="point"+bildtextlayer;

top.frames['navi'].document.all[textlayer6].style.color="#ffffff";

}

}




function onlightover(bildtextlayer){

var textlayer8 ="point" + bildtextlayer;

if(textlayer8 != textlayer6){

if (navigator.appName =='Microsoft Internet Explorer')

{

top.frames['navi'].document.all[textlayer8].style.color="#ffffff";

}

}

}



function onlightout(bildtextlayer){

var textlayer9 ="point" + bildtextlayer;

if(textlayer9 != textlayer6){

if (navigator.appName =='Microsoft Internet Explorer')

{

top.frames['navi'].document.all[textlayer9].style.color="#ffcc00";

}

}

}



