







///////////////////////////////////////////////////////////////////////////
//                                                                      //
//                         Global Functions                            //
//                                                                    //
///////////////////////////////////////////////////////////////////////



var ns4up = (document.layers) ? 1 : 0;
var ie4up = (document.all) ? 1 : 0;
var CanWrite=(document.body);
var Param;
var Cap1="";
var Cap2="";
var Father;
var God;
var Title;
var OldZoom=0;
var NewZoom=0;

if(parent)
{
	if(parent.God)
	{
		God=parent.God;
		Param=God.Param;
	}
	else
	{
		God=this;
		Param=SetParams();
	}
	if(God.oben)Title=God.oben;
}
else
{
	God=this;
	Param=SetParams();
}

function AutoZoom()
{
	NewZoom=parent.top.document.body.clientWidth;
	if(NewZoom!=OldZoom)
	{
		OldZoom=NewZoom;
		document.body.style.zoom=NewZoom/640;
		// this.blur();
	}
}

function Zoom()
{
	setInterval("AutoZoom();",50);
}

function ChangeText(Layer,Text)
{
	if(!Title)return;

	if(ie4up)
	{
		if(Title.document.all(Layer))
		{
			Title.document.all(Layer).innerHTML=Text;
		}
	}
	else if(ns4up)
	{
		if(Title.document.layers[Layer])
		{
			with(Title.document.layers[Layer].document)
			{
				open();
				write(Text);
				close();
			}
		}
	}
}

function SetCaption(Text1,Text2)
{
	if(God){God.Cap1=Text1;God.Cap2=Text2;}else{Cap1=Text1;Cap2=Text2;}
	ChangeText("Caption1","<Font size=7><b>" + Text1 + "</b/</Font>");
	ChangeText("Caption2","<Font size=6><b>" + Text2 + "</b/</Font>");
}

function SetParams()
{
	Search=location.search;
	if(Search!="")
	{
		Search=Search.substring(1,Search.length);
		return Search.split("&");
	}
	else return new Array();
}

function GetParam(Name,Default)
{
	if(!God)return Default;
	for(i=0;i<God.Param.length;i++)
	{
		Temp=God.Param[i].split("=");
		if(Temp.length==2)if(Temp[0].toLowerCase()==Name.toLowerCase())return Temp[1];
	}
	return Default;

}

function SetParam(Name,Value)
{
	if(!God)return;
	if(Name.toLowerCase()=="link")SetCookie(Value);

	var text=""
	var temp=new Array();

	if(God.Param.length==0)
	{
		text=Name+"="+Value;
		God.Param=text.split("&");
	}
	else
	{
		for(i=0;i<God.Param.length;i++)
		{
			temp=God.Param[i].split("=");
			if(temp.length==2)if(temp[0].toLowerCase()==Name.toLowerCase())
			{
				God.Param[i]=temp[0]+"="+Value;
				return;
			}
		}
		God.Param[God.Param.length]=Name+"="+Value;
		return;
	}
	return;
}

function ParamString()
{
	if(!God)return "";
	var text="";
	if(God.Param.length==0)return text;
	else
	{
		for(i=0;i<God.Param.length;i++)
		{
			if(i>0)text+="&";
			text+=God.Param[i];
		}
		return text;
	}
	return;
}

function ZweiFrames(URL1,F2,URL2,F3)
{  
	parent.frames[F2].location.href=URL1;
	parent.frames[F3].location.href=URL2;
}

function UpdateURL()
{
	God.document.location="/?"+ParamString();
}


function SetCookie(Value)
{
	var expdate=new Date();
	expdate.setTime (expdate.getTime() + 30758400000);
	God.document.cookie = "Link="+Value+"; expires="+expdate.toGMTString()+"; domain=www.Flomix.de;";
}


function setStatus(Text) {
	if(!Text)Text="";
	window.status = Text;
	return true;
}




var oLastBtn=0;

function RaiseButton()
{
	window.event.cancelBubble=true;
	oBtn = window.event.srcElement;
	if(!oBtn)return false;
	if(oLastBtn && oLastBtn!=oBtn)HideButton();
	if(oBtn.className=="ButtonOff"||oBtn.className=="ButtonUp"||oBtn.className=="ButtonDown")
		{oBtn.className = "ButtonUp";oLastBtn=oBtn;}
	elseoLastBtn = 0;
	if(oBtn.Caption){window.status=oBtn.Caption;return true;}
	return;
}

function DepressButton()
{
	window.event.cancelBubble=true;
	oBtn = window.event.srcElement;
	if(oBtn.className=="ButtonOff"||oBtn.className=="ButtonUp"||oBtn.className=="ButtonDown"){
		oBtn.className = "ButtonDown";
	}
}

function HideButton()
{
	oLastBtn.className = "ButtonOff";
	window.status="";
	return true;
}







///////////////////////////////////////////////////////////////////////////
//                                                                      //
//                          Snow animation                             //
//                                                                    //
///////////////////////////////////////////////////////////////////////


/*
var no = 10;
var speed = 20;
var snowflake = "/images/snow.gif";

var dx, xp, yp;
var am, stx, sty;
var i, doc_width = 640, doc_height = 480;
var dx,xp,yp,am,stx,sty;
var CanSnow=false;

function InitSnow()
{
	if (ns4up)
	{
		doc_width = self.innerWidth;
		doc_height = self.innerHeight;
	}
	else if (ie4up)
	{
		if(CanWrite)
		{
			doc_width  = document.body.clientWidth;
			doc_height = document.body.clientHeight;
		}
	}

	dx = new Array();
	xp = new Array();
	yp = new Array();
	am = new Array();
	stx = new Array();
	sty = new Array();

	for (i = 0; i < no; ++ i)
	{
		dx[i] = 0;
		xp[i] = Math.random()*(doc_width-100);
		yp[i] = Math.random()*doc_height;
		am[i] = Math.random()*40;
		stx[i] = 0.08 + Math.random()/10;
		sty[i] = 0.9 + Math.random();
		if(ns4up)
		{
			document.write("<layer name='dot1"+ i +"' left='15' top='15' visibility='hide'><img src='"+snowflake + "' border='0'></layer>");
			CanSnow=true;
		}
		else if(ie4up&&CanWrite)
		{
			document.write("<div id='dot1"+ i +"' style='POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px; display: none;'><img src='"+snowflake + "' border='0'></div>");
			CanSnow=true;
		}
	}
}

function snowNS()
{
	for (i = 0; i < no; ++ i)
	{
		yp[i] += sty[i];
		if (yp[i] > doc_height-10)
		{
			xp[i] = Math.random()*(doc_width-am[i]-10);
			yp[i] = 0;
			stx[i] = 0.08 + Math.random()/10;
			sty[i] = 0.9 + Math.random();
			doc_width = self.innerWidth;
			doc_height = self.innerHeight;
		}
		dx[i] += stx[i];
		document.layers["dot1"+i].top = yp[i];
		document.layers["dot1"+i].left = xp[i] + am[i]*Math.sin(dx[i]+30);
	}
	setTimeout("snowNS()", speed);
}

function snowIE()
{
	for (i = 0; i < no; ++ i)
	{
		yp[i] += sty[i];
		if (yp[i] > doc_height-10)
		{
			xp[i] = Math.random()*(doc_width-am[i]-10);
			yp[i] = 0;
			stx[i] = 0.08 + Math.random()/10;
			sty[i] = 0.9 + Math.random();
			doc_width = document.body.clientWidth;
			doc_height = document.body.clientHeight;
		}
		dx[i] += stx[i];
		document.all["dot1"+i].style.pixelTop = yp[i] + document.body.scrollTop;
		document.all["dot1"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]+30);
	}
	setTimeout("snowIE()", speed);
}

function StartSnow()
{
	if(!CanSnow)InitSnow();
	if(!CanSnow)return;
	if (ns4up)
	{
		for(i=0;i<no;i++)document.layers["dot1"+i].visibility="show";
		snowNS();
	}
	else if (ie4up)
	{
		for(i=0;i<no;i++)document.all["dot1"+i].style.display="";
		snowIE();
	}
}*/
function StartSnow()
{
}









///////////////////////////////////////////////////////////////////////////
//                                                                      //
//                          Rotating Logo                              //
//                                                                    //
///////////////////////////////////////////////////////////////////////



var CanLogo=false;

if(ie4up)
{
	var IW=0, IH=0, PX=0, PY=0;
	var LSAFETY=10, TSAFETY=10;

	function BrandPosition()
	{
		if(document.all("FlomixLogo")!= null)
		{
			IH= document.body.clientHeight;
			IW= document.body.clientWidth;
			PX= document.body.scrollLeft;
			PY= document.body.scrollTop;
			document.all("FlomixLogo").style.top=(IH+PY-(60+TSAFETY));
			document.all("FlomixLogo").style.left=(IW+PX-(80+LSAFETY));
		}
	}

	function BrandShow(toggle)
	{
		if(document.all("FlomixLogo")!=null) document.all("FlomixLogo").style.display=toggle;
	}

	function ie_branding()
	{
		if(navigator.appVersion.indexOf("Mac")==-1)
		{
			oldIW=IW;
			oldIH=IH;
			oldPX=PX;
			oldPY=PY;
			if((document.body.clientHeight!=oldIH)||
			(document.body.clientWidth!=oldIW)||
			(document.body.scrollLeft!=oldPX)||
			(document.body.scrollTop!=oldPY))
			{
				BrandShow("none");
				BrandPosition();
				BrandShow("");
			}
		}
	}

	function ie_init()
	{
		if(!CanWrite)return;
		document.write("<DIV CLASS='FlomixLogo' ID='FlomixLogo' STYLE='position:absolute;top:1;display:none;' ALIGN='right' onmouseover='neat_mouseover()' onmouseout='neat_mouseout()'><A HREF='/main.html' target='rechts'><IMG SRC='/images/silver00.gif' width=80 height=60 ALT='Homepage' BORDER=0></A></DIV>")
		CanLogo=true;
		return;
	}
}

else if(ns4up)
{
	var IW=0, IH=0, PX=0, PY=0;
	var LSAFETY=20, TSAFETY=17;
	var us=null;

	function ns_branding()
	{
		oldIW=IW;
		oldIH=IH;
		oldPX=PX;
		oldPY=PY;
		if((window.innerHeight!=oldIH)||(window.innerWidth!=oldIW)||(window.pageXOffset!=oldPX)||(window.pageYOffset!=oldPY))
		{
			document.FlomixLogo.visibility= "show";
			ourDoc = self;
			IH=window.innerHeight;
			IW=window.innerWidth;
			PX=window.pageXOffset;
			PY=window.pageYOffset;
			document.FlomixLogo.top=(IH+PY-(60+TSAFETY));
			document.FlomixLogo.left=(IW+PX-(80+LSAFETY));
			document.FlomixLogo.onmouseover= neat_mouseover;
			document.FlomixLogo.onmouseout= neat_mouseout;
			document.FlomixLogo.visibility= "show";
		}
	}
	
	function ns_init()
	{
		document.write("<layer name='FlomixLogo' visibility='hide'><A HREF='main.html' target='rechts'><IMG SRC='/images/silver00.gif' width=80 height=60 ALT='Homepage' BORDER=0></A></layer>")
		CanLogo=true;
	}
}

function neat_mouseover()
{
	window.status="Zur Homepage";
	return true;
}

function neat_mouseout()
{
	window.status="";
	return true;
}

function InitLogo()
{
	if(ie4up)ie_init();
	else if(ns4up)ns_init();
}

function StartLogo()
{
	if(!CanLogo)InitLogo();
	if(!CanLogo)return;
	if(ie4up)
	{
		if(CanWrite)setInterval("ie_branding();",10);
	}
	else if(ns4up)setInterval("ns_branding();",100);
}
