
//****Scrollbar******************************************

function move()
 {
  chk = document.body.clientWidth + 2;
  if(window.event.x > chk) //Ist Mauszeiger über Scrollbar?
   {
    var sfc = "black";     //scrollbar-face-color
    var ssc = "red";     //scrollbar-shadow-color
    var shc = "blue"; //scrollbar-highlight-color
    var stc = "yellow"; //scrollbar-track-color
    var sac = "green"; //scrollbar-arrow-color

    document.body.style.scrollbarFaceColor = sfc;
    document.body.style.scrollbarShadowColor = ssc;
    document.body.style.scrollbarTrackColor = stc;
    document.body.style.scrollbarHighlightColor = shc;
    document.body.style.scrollbarArrowColor = sac;
   }
  else //wenn Mauszeiger nicht über Scrollbar
   {
    var sfc = "red"; //scrollbar-face-color
    var ssc = "black"; //scrollbar-shadow-color
    var shc = "yellow"; //scrollbar-highlight-color
    var stc = "black"; //scrollbar-track-color
    var sac = "yellow";       //scrollbar-arrow-color

    document.body.style.scrollbarFaceColor = sfc;
    document.body.style.scrollbarShadowColor = ssc;
    document.body.style.scrollbarTrackColor = stc;
    document.body.style.scrollbarHighlightColor = shc;
    document.body.style.scrollbarArrowColor = sac;
   }
 }
 
//****Bilder Popup******************************************
		
function OpenNewWindow(Picture,Breit,Hoch)
{
	xsize = Breit+35;// Zusatz für Rand rechts und links
	ysize = Hoch+75; //Zusatz für Rand oben und unten - damit Button angezeit werden kann 
		
	ScreenWidth = screen.width;
	ScreenHeight = screen.height;

	xpos = (ScreenWidth/2)-(xsize/2);
	ypos = (ScreenHeight/2)-(ysize/2);
	
	NewWindow=window.open("","Picture","height="+ysize+",width="+xsize+",scrollbars=no,resizable=no,top="+ypos+",left="+xpos+"");
	NewWindow.document.write ("<html><head><title>BILDANZEIGE");
	NewWindow.document.write ("</title></head>");
	NewWindow.document.write ("<body background='images/h5.jpg' onload='focus()'>");
	//NewWindow.document.write ("<body bgcolor='#cccccc'>");
	NewWindow.document.write ("<table align='center'><tr>");
	NewWindow.document.write ("<td align='center' valign='top'>");
	NewWindow.document.write ("<table border='1' bgcolor='#000000' cellpadding='0' cellspacing='1'><tr><td align='center'>");
	NewWindow.document.write ("<img src=");
	NewWindow.document.write (Picture);
	NewWindow.document.write (">");
	NewWindow.document.write ("</tr></table>");
	NewWindow.document.write ("</td></tr><tr>");
	NewWindow.document.write ("<td align='center' valign='bottom'>");
	NewWindow.document.write ("<br><center><form><input type='button' value='FENSTER SCHLIESSEN' style='font-family: Verdana; font-size: 10px' onClick='self.close()'>");
	NewWindow.document.write ("</td></tr></table>");
	NewWindow.document.write ("</form></body></html>");
	NewWindow.document.close();
	NewWindow.resizeTo(xsize,ysize); 
}

 //****Bildwechsel******************************************
 
var agt = navigator.userAgent.toLowerCase();
var dom = (document.getElementById) ? true : false;
var ns5 = ((navigator.userAgent.indexOf("Gecko")>-1) && dom) ? true: false;
var ie5 = ((navigator.userAgent.indexOf("MSIE")>-1) && dom) ? true : false;
var ns4 = (document.layers && !dom) ? true : false;
var ie4 = (document.all && !dom) ? true : false;
var nodyn = (!ns5 && !ns4 && !ie4 && !ie5) ? true : false;
var is_win  = ((agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1)) ? true : false;

var maxImages = 1;
var maxImages = 2;
var maxImages = 3;
var maxImages = 4;
var activeImage = 1;

function fnToggle() {
		
	if (is_win && ie5)
	{
		prvImageContainer.filters[0].Apply();
		document.getElementById("prvImage" + activeImage).style.visibility="hidden";
		if (activeImage == maxImages) activeImage=0;
		activeImage++;
		document.getElementById("prvImage" + activeImage).style.visibility="visible";
		prvImageContainer.filters[0].Play();
	} else {
		document.prvImage.src = img[activeImage].src;
		activeImage++;
		if (activeImage > maxImages) activeImage=1;
	}				
}    
function fnToggleHome() {
		
	if (is_win && ie5)
	{
		prvImageContainerHome.filters[0].Apply();
		document.getElementById("prvImageHome" + activeImage).style.visibility="hidden";
		if (activeImage == 5) activeImage=0;
		activeImage++;
		document.getElementById("prvImageHome" + activeImage).style.visibility="visible";
		prvImageContainerHome.filters[0].Play();
	} else {
		document.prvImage.src = img[activeImage].src;
		activeImage++;
		if (activeImage > 5) activeImage=1;
	}				
}
function fnToggleBilder() {
		
	if (is_win && ie5)
	{
		prvImageContainerBilder.filters[0].Apply();
		document.getElementById("prvImageBilder" + activeImage).style.visibility="hidden";
		if (activeImage == 5) activeImage=0;
		activeImage++;
		document.getElementById("prvImageBilder" + activeImage).style.visibility="visible";
		prvImageContainerBilder.filters[0].Play();
	} else {
		document.prvImage.src = img[activeImage].src;
		activeImage++;
		if (activeImage > 5) activeImage=1;
	}				
}    			

function beginTransitions() {
	timerID = setInterval("fnToggle()", 2000);
}

function beginTransitionsHome() {
	timerID = setInterval("fnToggleHome()", 300);
}

function beginTransitionsBilder() {
	timerID = setInterval("fnToggleBilder()", 320);
}

//****Blinkende Schrift******************************************
function ShowTitle()
{
	document.getElementById("title2").style.visibility="visible";
	document.getElementById("meetAndGreet").style.visibility="visible";
}

function HideTitle()
{
	document.getElementById("title2").style.visibility="hidden";
	document.getElementById("meetAndGreet").style.visibility="hidden";
}

function BeginBlink() {
	blinktimer1 = setInterval("ShowTitle()", 2000);
	blinktimer2 = setInterval("HideTitle()", 2000);
}
