function dhtml_class()
{
	//initialisieren der variablen
	this.ns4 = false;
	this.ns6 = false;
	this.ie = false;
	this.version="";
	this.elem="";
	this.imgpfad='img/';
	this.doc='document.images.';
	this.maxBottom="";
	this.parentId="";
	this.id="";
    this.maxTop="";
    this.maxBottom="";
    this.maxUp="";
    this.maxBottom="";
    this.timer="";
    this.speed=20;
    this.ypos=0;

}	
	

	
	//browser initialisieren
dhtml_class.prototype.init = function()
{
   
	if(navigator.appName == 'Netscape')
	{
	this.version=navigator.appVersion.substring(0,3);
	if((this.version > 4.6) && (this.version < 5.0))
	{
		this.ns4 = true;
	}else if(this.version >= 5.0)
	{
		this.ns6 = true
	}else
	{
		this.ns4 = false;
		this.ns6 = false;
	}
	}
	this.version=navigator.appVersion.substring(22,25);
	if(this.version >=5.0)
	{
	this.ie = true;
	}else
	{
	this.ie = false;
	}
}

dhtml_class.prototype.get_browser_obj = function(welcher)
{
if (this.ie){
    if(document.all[welcher] != null){
    return document.all[welcher].style;
    }
}else if (this.ns6){
return document.getElementById(welcher).style
}
}


	

//button off
dhtml_class.prototype.rollover = function(welches)
{
	eval(this.doc+welches+'.src=\''+this.imgpfad+welches+'_on.gif\'');
}

//button on
dhtml_class.prototype.rollout = function(welches)
{
	eval(this.doc+welches+'.src=\''+this.imgpfad+welches+'_off.gif\'');
}
	
	
	
//macht layer sichtbar
dhtml_class.prototype.show = function(welcher)
{	
	this.get_browser_obj(welcher).visibility="visible";
}
//macht layer unsichtbar
dhtml_class.prototype.hide = function(welcher)
{	
	this.get_browser_obj(welcher).visibility="hidden";
}
//oeffnet fenster
dhtml_class.prototype.openwin = function(gURL)
{
	//gURL=>Pfad des HTML-Dokumentes
	
	winName="wind";//Name des Fensters
	xsize = 320;	//Breite des Fensters
	ysize = 255;  //Hoehe des Fensters
	xpos = (screen.width/2)-(xsize/2);
	ypos = (screen.height/2)-(ysize/2);
	features = "width=" + xsize + ",height=" + ysize + ",location=no,menubar=no,personalbar=no,resizable=no,screenX=" + xpos + ",screenY=" + ypos + ",left=" + xpos + ",top=" + ypos + ",locationbar=no,scrollbars=no,directories=no,statusbar=no,toolbar=no";
	
	window.open(gURL,winName,features); //oeffnet das Fenster
}
/*********
*/
//oeffnet fenster
dhtml_class.prototype.winopener = function(gURL,breite,hoehe)
{
	//gURL=>Pfad des HTML-Dokumentes
	
	winName="wind";//Name des Fensters
	xsize = breite;	//Breite des Fensters
	ysize = hoehe;  //Hoehe des Fensters
	xpos = (screen.width/2)-(xsize/2);
	ypos = (screen.height/2)-(ysize/2);
	features = "width=" + xsize + ",height=" + ysize + ",location=no,menubar=no,personalbar=no,resizable=no,screenX=" + xpos + ",screenY=" + ypos + ",left=" + xpos + ",top=" + ypos + ",locationbar=no,scrollbars=yes,directories=no,statusbar=no,toolbar=no";
	
	window.open(gURL,winName,features); //oeffnet das Fenster
}



dhtml_class.prototype.scroller = function(parentId,id,offset)
{
    this.parentId=parentId;
	this.id=id;
	
	parenthoehe=(document.getElementById(parentId).offsetHeight);
	childhoehe = document.getElementById(id).offsetHeight;
	
	if(parenthoehe>=childhoehe){
	    button.hide("up");
	    button.hide("down");
	}else{
	    button.show("up");
	    button.show("down");
	}
	
    this.maxUp =childhoehe-parenthoehe+100;
    this.maxBottom =0;
    
    
}

dhtml_class.prototype.scrollUp = function()
{
    if(this.ie){
    inhaltY = document.getElementById(this.id).style.pixelTop;
    }else{
    inhaltY = parseInt(document.getElementById(this.id).style.top);
    }
    if(isNaN(inhaltY)){inhaltY="-20";}
    this.timer = setTimeout("button.scrollUp()", 20);
	if (Math.abs(inhaltY)<this.maxUp){
	this.ypos-=this.speed;
    }else {button.scrollStop();}
    if(this.ie){
	document.getElementById(this.id).style.pixelTop = this.ypos;
	}else{
	document.getElementById(this.id).style.top = this.ypos;
	}
}

dhtml_class.prototype.scrollDown = function()
{

	if(this.ie){
    inhaltY = document.getElementById(this.id).style.pixelTop;
    }else{
    inhaltY = parseInt(document.getElementById(this.id).style.top);
    }
    if(isNaN(inhaltY)){inhaltY="-20";}
    this.timer = setTimeout("button.scrollDown()", 20);
	if (Math.abs(inhaltY)>this.maxBottom){
	this.ypos+=this.speed;
    }else {button.scrollStop();}
    if(this.ie){
	document.getElementById(this.id).style.pixelTop = this.ypos;
	}else{
	document.getElementById(this.id).style.top = this.ypos;
	}
	
	
}


dhtml_class.prototype.scrollStop = function()
{
    if (this.timer) clearTimeout(this.timer);
}

