<!--

var imgbuffer = new Array();

var img_city = BasePath + "DynTip_city.gif"; // URL für Stadt
var img_county = BasePath + "DynTip_county.gif"; // URL für BundesLandLabel
var img_index = BasePath + "DynTip_index.gif"; // URL für Indexkarte
var img_default = BasePath + "DynTip_default.gif"; // URL für Land
var img_zoom = BasePath + "DynTip_zoom.gif"; // URL für Land
var img_dot = BasePath + "trail6.gif";

nimg_city = new Image();
nimg_county = new Image();
nimg_index = new Image();
nimg_default = new Image();
nimg_zoom = new Image();
nimg_dot = new Image();

nimg_city.src = img_city;
nimg_county.src = img_county;
nimg_index.src = img_index;
nimg_default.src = img_default;
nimg_zoom.src = img_zoom;
nimg_dot.src = img_dot;

imgbuffer["city"] = nimg_city;
imgbuffer["county"] = nimg_county;
imgbuffer["index"] = nimg_index;
imgbuffer["default"] = nimg_default;
imgbuffer["zoom"] = nimg_zoom;
imgbuffer["dot"] = nimg_dot;
	
isD_EL = document.getElementById;
isD_ALL = document.all;
isD_LAY = document.layers;

T1 = new Array(imgbuffer["dot"], 20, 20, imgbuffer["dot"], 20, 20);

var offsetx = 0; //x offset of trail from mouse pointer
var offsety = 0; //y offset of trail from mouse pointer
var tipoffsetX = 15; //x offset of Tip-Image from mouse pointer
var tipoffsetY = -5; //y offset of Tip-Image from mouse pointer

nos = parseInt(T1.length / 3);
rate = 10;
ie5fix1 = 0;
ie5fix2 = 0;
rightedge = isD_ALL ? document.body.clientWidth-T1[1] : window.innerWidth-T1[1] - 20;
bottomedge= isD_ALL ? document.body.scrollTop + document.body.clientHeight-T1[2] : window.pageYOffset + window.innerHeight-T1[2];

for (i = 0; i < nos; i++) {
	createContainer("CUR"+i, i * 20, i * 20, i * 0 + 1, i * 0 + 1, "", "<img id='img" + i + "' src='" + T1[i * 3].src + "'" + " border=0>");
}

createContainer("TOOLTIP", 10, 10, 3 + 1, 3 + 2, "", "<img id='tipimg' src='" + nimg_default.src + "'" + " border=0>");

function createContainer(N, Xp, Yp, W, H, At, HT, Op, St) {
	with (document) {
		write((!isD_EL && !isD_ALL) ? "<layer id='" + N + "' left=" + Xp + " top=" + Yp + " width=" + W + " height=" + H : "<div id='" + N + "'" + " style='position:absolute;left:" + Xp + "; top:" + Yp + "; width:" + W + "; height:" + H + "; ");
		if (St) {
			if (isD_LAY) {
				write(" style='");
			}
			write(St + ";' ");
		}
		else { 
			write((isD_EL || isD_ALL) ? "'" : "");
		}
		write((At) ? At + ">" : ">");
		write((HT) ? HT : "");
		if (!Op) {
			closeContainer(N);
		}
	}
}

function closeContainer() {
	document.write((isD_EL || isD_ALL) ? "</div>" : "</layer>")
}

function getXpos(N) {
	if (isD_EL) {
		return parseInt(document.getElementById(N).style.left);
	}
	else if (isD_ALL) {
		return parseInt(isD_ALL[N].style.left);
	}
	else {
		return isD_LAY[N].left;
	}
}

function getYpos(N) {
	if (isD_EL) {
		return parseInt(document.getElementById(N).style.top);
	}
	else if (isD_ALL) {
		return parseInt(isD_ALL[N].style.top);
	}
	else {
		return isD_LAY[N].top;
	}
}

function hideTip(N) {
	c = (isD_EL) ? document.getElementById(N).style : (isD_ALL) ? isD_ALL[N].style : (isD_LAY) ? isD_LAY[N] : "";
	v = (isD_EL) ? "hidden" : (isD_ALL) ? "hidden" : (isD_LAY) ? "hide" : "";
    if (c.visibility != v) {
		c.visibility = v;
	} 
}

function showTip(N) {
	c = (isD_EL) ? document.getElementById(N).style : (isD_ALL) ? isD_ALL[N].style : (isD_LAY) ? isD_LAY[N] : "";
	v = (isD_EL) ? "visible" : (isD_ALL) ? "visible" : (isD_LAY)? "show" : "";
	if (c.visibility != v) {
		c.visibility = v;
	}
}

function moveContainer(N, DX, DY){
	c = (isD_EL) ? document.getElementById(N).style : (isD_ALL) ? isD_ALL[N].style : (isD_LAY) ? isD_LAY[N] : "";
	if (!isD_ALL) {
		//prevent from activating scrollbars;
		//rightedge = window.innerWidth-T1[1] - 20;
		rightedge = window.innerWidth - 40;
		//bottomedge = window.pageYOffset + window.innerHeight - T1[2];
		bottomedge = window.pageYOffset + window.innerHeight - 40;
	}
	c.left = Math.min(rightedge, DX + offsetx);
	c.top = Math.min(bottomedge, DY + offsety);
}

function cycle() {
	//if (IE5) 
	if (document.all&&window.print) {
		ie5fix1 = document.body.scrollLeft;
		ie5fix2 = document.body.scrollTop;
	}
	for (i = 0; i < (nos - 1); i++){
		moveContainer("CUR"+i, getXpos("CUR" + (i + 1)), getYpos("CUR" + (i + 1)));
	}		
	//moveContainer("TOOLTIP", getXpos("TOOLTIP"), getYpos("TOOLTIP"));
}

function newPos(e) {
	moveContainer("CUR" + (nos - 1), (isD_ALL) ? event.clientX + ie5fix1 + 10 : e.pageX + 5, (isD_ALL) ? event.clientY + ie5fix2 + 20 : e.pageY + 15);
	moveContainer("TOOLTIP", (isD_ALL) ? event.clientX + ie5fix1 + tipoffsetX:e.pageX + 2 + tipoffsetX, (isD_ALL) ? event.clientY + ie5fix2 + tipoffsetY:e.pageY + 2 + tipoffsetY);
}

function ShowTipOffer(offerID) {
	N = offerID.id;
	M = "tipimg";
	
	var	mainimg = (isD_EL) ? document.getElementById(N).style : (isD_ALL) ? isD_ALL[N].style : (isD_LAY)? isD_LAY[N] : "";
	var	thistip = (isD_EL) ? document.getElementById(M) : (isD_ALL) ? isD_ALL[M] : (isD_LAY) ? isD_LAY[M] : "";
	
	mainimg.cursor = 'pointer';
	thistip.src = imgbuffer["city"].src; //nimg_city.src
	ShowAll();
}

function ShowTip1(dmode) {
	N = "Bild";
	M = "tipimg";
	
	var	mainimg = (isD_EL) ? document.getElementById(N).style : (isD_ALL) ? isD_ALL[N].style : (isD_LAY)? isD_LAY[N] : "";
	var	thistip = (isD_EL) ? document.getElementById(M) : (isD_ALL) ? isD_ALL[M] : (isD_LAY) ? isD_LAY[M] : "";
	
	if (dmode == "city") {	
		mainimg.cursor = 'auto';
		thistip.src = imgbuffer["city"].src; //nimg_city.src
		//thistip.image = imgbuffer["city"];
	}
	else if (dmode == "index") {
		mainimg.cursor = 'auto';
		thistip.src = imgbuffer["index"].src; //nimg_index.src
		//thistip.image = imgbuffer["index"];
	} 
	else if (dmode == "county") {
		mainimg.cursor = 'auto';
		thistip.src = imgbuffer["county"].src; //nimg_index.src
		//thistip.image = imgbuffer["index"]; 
	
	} 
	else if (dmode == "default") {
		mainimg.cursor = 'default';
		thistip.src = imgbuffer["default"].src; //nimg_default.src
		//thistip.image = imgbuffer["default"];	
	
	} 
	else if (dmode == "zoom"){
		mainimg.cursor = 'auto'
		thistip.src = imgbuffer["zoom"].src //nimg_default.src
		//thistip.image = imgbuffer["zoom"] //nimg_default.src
	}
	ShowAll();
}

function ShowAllTips() {
	//compatibility relict function
}

function ClearToDefault() {
	//compatibility relict function
}

function ClearTips() {
	//compatibility relict function
}

function ShowAll() {
	for (i = 0; i < nos; i++) {
		showTip("CUR" + i);
	}
	showTip("TOOLTIP");
}

function ShowTrail() {
	for (i = 0; i < nos; i++) {
		showTip("CUR" + i);
	}
	//hideTip("TOOLTIP");
}

function ClearAll(){
	for (i = 0; i < nos; i++){
		hideTip("CUR" + i);
	}
	hideTip("TOOLTIP");
}


function getedgesIE() {
	rightedge = document.body.clientWidth - T1[1];
	bottomedge = document.body.scrollHeight - T1[2];
	// CD Laden der Starseite... Web Laden des Loginlayers
	if (document.location.href.indexOf('register') < 0 ) {
		intro();
	}
}

if (isD_ALL) {
	window.onload = getedgesIE;
	window.onresize = getedgesIE;
}

if (document.layers) {
	document.captureEvents(Event.MOUSEMOVE);
}

document.onmousemove = newPos;
setInterval("cycle()", rate);
ClearAll();

//-->