<!--Beginn des Scripts
//
// Copyright:   	© 200x Creation's Innovative Software ®, Bayreuth, Rainer W. Markgraf.
//              	  Alle Rechte vorbehalten.
// WEB-Seitentyp:	Javascript-File
// Name Datei:		cismen.js
// Scriptvers.: 	9.2002.3.4-2.14 vom 06.11.2002
// Scriptzweck: 	Menü-Funktionalitäten für Navigationscripts der MARKGRAF-WEB-Seiten
//              	Variablen, Array's und deren Inhalte sowie Funktionen werden weiter unten kommentiert.
//              
// Achtung:     	Beim Editieren mit FrontPage keine CR,LF-Befehle verwenden!!!!!!!!!!
//
// Vordefinition allgemeiner Variablen:
//
// a) globale Variable:
// --------------------
var mentimer;
var menload;
var menloop;
var speed = 50;
var oMbox = new Array();
var oMenu = new Array();

// b) Beginn der Funktionen:
// -------------------------
// makeObj: Erstellt Objekte für Scrollbereiche
function makeObj(obj, nest, scrZusaspac)
{
	nest = (!nest) ? '' : 'document.layers.' + nest + '.';
	
	if (document.getElementById) {
	  	this.el = document.getElementById(obj);
		this.css = document.getElementById(obj).style;
	}
	else if (document.all) {
		this.el = document.all[obj];
		this.css = document.all[obj].style;
	}
	else if (document.layers) {
		this.el = getObjNN4(document,obj);
		this.css = this.el;
	}
	this.scrollWidth = this.el.offsetWidth;
	this.clipWidth = this.el.offsetWidth;
	this.scrollHeight = this.el.offsetHeight + scrZusaspac;
	this.clipHeight = this.el.offsetHeight;
	this.up = goUp;
	this.down = goDown;
	this.moveIt = moveIt;
	this.x = 0;
	this.y = 0;
	this.obj = obj + "Object";
	eval(this.obj + "=this");
	return this;
}

// Sonderfall Netscape 4
function getObjNN4(obj,name)
{
	var x = obj.layers;
	var thereturn;
	for (var i=0;i<x.length;i++)
	{
		if (x[i].id == name)
		 	thereturn = x[i];
		else if (x[i].layers.length)
			var tmp = getObjNN4(x[i],name);
		if (tmp) thereturn = tmp;
	}
	return thereturn;
}

// moveIT: Bewegt Scrollbereich horizontal und vertikal
function moveIt(x, y)
{
	this.x = x;
	this.y = y;
	this.css.left = this.x + "px";
	this.css.top = this.y + "px";
}

// goDown: Bewegt Scrollbereich um ... nach unten
function goDown(move)
{
	if (this.y > - this.scrollHeight + oMbox1.clipHeight)
	{
		this.moveIt(0, this.y - move);
		if (menloop)
			mentimer = setTimeout(this.obj + ".down(" + move + ")", speed);
	}
}

// goUp: Bewegt Scrollbereich um ... nach oben
function goUp(move)
{
	if (this.y < 0)
	{
		this.moveIt(0, this.y - move);
		if (menloop)
			mentimer = setTimeout(this.obj + ".up(" + move + ")", speed);
	}
}

// mscrll: Scrollt in angegebener Bewegungsrichtung nach oben oder unten
function mscrll(speed)
{
	if (menload)
	{
		menloop = true;
		if (speed > 0)
			oMenu1.down(speed);
		else
			oMenu1.up(speed);
	}
}

// cispjmp: Jumper zu Webseitenadresse im Hauptframe
function cispjmp(menaufruf,toadresse)
{
	parent.frames[1].location.href = menaufruf;
	parent.frames[2].location.href = toadresse;
}

// endMenob: Schaltet Scrollen aus wenn Menüdefinition beendet ist
function endMenob()
{
	menloop = false;
	if (mentimer)
		clearTimeout(mentimer);
}

// scrollInit: Initiert Scriptobjekte für Scrollbereich
function MscrollInit(scrZusaspac)
{
	oMbox1 = new makeObj('Menubox','', scrZusaspac);
	oMenu1 = new makeObj('Menue', 'Menubox', scrZusaspac);
	oMenu1.moveIt(0, 0);
	menload = true;
}

// ----Bis hierher Script einfügen----
// Ende Script-->
