var minVers=4;var ErrorLocation="error.html";
var VersNr= ( parseInt(navigator.appVersion.substring(0,1)) >=minVers );

if (!VersNr){ self.location=ErrorLocation};
var isNetscape = ((navigator.appName == "Netscape") && VersNr);
var isMSIE = ((navigator.appName == "Microsoft Internet Explorer") && VersNr);


var d=this.window.document;  // only needed for lasy typing
var Clip=new Array();
var WindowClip=new Array();

var testx;
/* the following "Intial()" is called when the loading of the document 
   has finished ("onLoad=" in the body-Tag).
*/   

							   
function Initial() 
{
	ReleaseMouse();
	CatchMouse();
}	


//******************************** the MouseEvents
//Get the Mouse-Event(s) needed
var Mdown=0;
var MouseX;
var MouseY;


function CatchMouse()
{
	if(isNetscape)
	{
		
		window.captureEvents(Event.MOUSEMOVE);
   		window.onmousemove=MouseMove;
	}
	if(isMSIE)	{document.onmousemove=MouseMove;}
}//eCatchMouse



function ReleaseMouse()
{
	if(isNetscape){	window.releaseEvents(Event.MOUSEMOVE);}
	if(isMSIE)	{document.onmousemove="";}

}//eReleaseMouse



function MouseMove(e)
{
	if(isNetscape)
	{
		MouseX=e.layerX;
		MouseY=e.layerY;
	}
	if(isMSIE)
	{
		MouseX=event.clientX;
		MouseY=event.clientY;
	}
}//eMouseMove




/* now some functions to manipulate "Layers" */

function ShowLayer(LayerName)
{
	if(isNetscape){
		document.getElementById(LayerName).style.visibility="visible";
	}
	if(isMSIE){d.all[LayerName].style.visibility="visible";}
}

function HideLayer(LayerName)
{				
	if(isNetscape){document.getElementById("HelpLayer").style.visibility="hidden";}
	if(isMSIE){d.all[LayerName].style.visibility="hidden";}
}

function LayerIsVisible(LayerName)
{					
	if(isNetscape)
	{
		return(document.getElementById(LayerName).style.visibility=="visible")
	}
	if(isMSIE)
	{
		return(d.all[LayerName].style.visibility=="visible")
	}
}
	

function MoveLayerTo(LayerName,x,y,pos)
{
         
	if(isNetscape){
		document.getElementById(LayerName).style.top=y;
		document.getElementById(LayerName).style.left=x;
	}
	
	if(isMSIE){
		oLayer=d.all[LayerName].style;
		oLayer.top=y;
		oLayer.left=x;
	}
}

function SetContent(LayerName,Content)
{					
	if(isNetscape)
	{
		document.getElementById(LayerName).innerHTML = Content;
	}
	if(isMSIE)
	{
		d.all[LayerName].innerHTML=Content;
	}
}//eSetContent


function GetLayerRegion(LayerName) //returns .left, .right, .top, .down, .height, .width
{
	c=new Array();
	if(isNetscape)
	{
		c.left=document.getElementById(LayerName).left;
		c.right=c.left+d[LayerName].clip.width;
		c.top=document.getElementById(LayerName).top;
		c.down=c.top+d[LayerName].clip.height;
		c.height=document.getElementById(LayerName).height;
		c.width=d[LayerName].clip.width;
	}
	if(isMSIE)
	{
		//c.left=d.all[LayerName].offsetLeft;
                c.left=parseInt(d.all[LayerName].style.left);
		c.right=c.left+d.all[LayerName].offsetWidth;
		//c.top=d.all[LayerName].offsetTop;
		c.top=parseInt(d.all[LayerName].style.top);
                c.down=c.top+d.all[LayerName].offsetHeight;
		c.width=d.all[LayerName].offsetWidth;
		c.height=d.all[LayerName].offsetHeight;
	}
	return c;
}//eGetLayerRegion


function GetWindowRegion() //returns .height, .width
{
	c=new Array();
	if(isNetscape)
	{
		c.height=this.innerHeight;
		c.width=this.innerWidth;
	}
	if(isMSIE)
	{
		c.width=d.body.clientWidth;
		c.height=d.body.clientHeight;
	}
	return c;
}//eGetWindowRegion


function GetYScroll() 
{
	if(isNetscape)
	{
		return window.pageYOffset;
               
	}
	if(isMSIE)
	{
		return document.body.scrollTop;
	}
}//eGetYScroll

function GetXScroll() 
{
	if(isNetscape)
	{
		return window.pageXOffset;
	}
	if(isMSIE)
	{
		return document.body.scrollLeft;
	}
}//eGetXScroll

/*
function AddHelp(thekey,thepos,thewidth,theheigth,thecolor,thetext)
{
			HelpArray[thekey]=new Array();
			HelpArray[thekey]['text']=thetext;
			HelpArray[thekey]['bgcolor']=thecolor;
			HelpArray[thekey]['width']=thewidth;
			HelpArray[thekey]['height']=theheigth;
                        HelpArray[thekey]['pos']=thepos 
}
*/
function Help2(theKey)
{
	if (LayerIsVisible("HelpLayer")){HideLayer("HelpLayer");}
	theLayerContent="<table border=0 cellspacing=0 cellpadding=5 width=261 bgcolor=white><tr><td class=klein>" + theKey+"</td></tr></table>";
	SetContent("HelpLayer",theLayerContent);



/*

	if(LayerIsVisible('HelpLayer')==true){
		HideLayer('HelpLayer');
	}
	theText=HelpArray[theKey]['text'];
	theBgColor=HelpArray[theKey]['bgcolor'];
	theWidth=HelpArray[theKey]['width'];
	theHeight=HelpArray[theKey]['height'];
	theLayerContent="<table border=\"1\" cellspacing=\"0\" cellpadding=\"2\" bgcolor=\"" +theBgColor+"\"width=\""+theWidth+"\">";
	theLayerContent+="<tr><td height=\""+theHeight+"\">" + theText+"</td></tr></table>";
	SetContent("HelpLayer",theLayerContent);
	//correction of position
	thepos=HelpArray[theKey]['pos'];
*/
        
	var X=500;
	var Y=115;

//	var X=MouseX;
//	var Y=MouseY;

	//Coords Correction for MSIE
//	if(isMSIE)
//	{       
               
		Y+=GetYScroll();
        		X+=GetXScroll();
            
//	}
	 
	MoveLayerTo("HelpLayer",X,Y,1);        
	ShowLayer("HelpLayer");

}//eHelp


function CloseHelp2()
{
	HideLayer("HelpLayer");	
}
