var browser = "";var to=0.1;if (navigator.appName.indexOf("Explorer") != -1) {var browser="IE";to=0.2;}
var f=new Object();f[1]=0;f[2]=0;f[3]=0;
var f_i=new Object();var f_o=new Object();var to;var aktiv=0;

function Show(wo,f_temp){
	f_o[wo]=0;
	if(wo!=aktiv && aktiv!=0) Hide(aktiv,f[aktiv]);
	aktiv=wo;
	if(f[wo]<1.2){
		if(browser=="IE") document.getElementById("sub_"+wo).style.filter="Alpha(opacity:"+(f_temp*100)+")";
		else document.getElementById("sub_"+wo).style.opacity = f_temp;
		f_temp=  f_temp + to;
		f_temp= Math.round(f_temp*10)/10;
		f[wo]=f_temp;
		setTimeout("Show("+wo+","+f_temp+")", 20);
		}
	else f_o[wo]=1;
	}


function Hide(wo,f_temp){
	f_i[wo]=0;
	if(f[wo]> -0.2 && f_o[wo]!=0){
		if(browser=="IE")
			document.getElementById("sub_"+wo).style.filter="Alpha(opacity:"+(f_temp*100)+")";
		else
			document.getElementById("sub_"+wo).style.opacity = f_temp;
		f_temp=  f_temp - to;
		f[wo]=f_temp;
		setTimeout("Hide("+wo+","+f_temp+")", 20);
		}
	else f_i[wo]=1;
	}


function Vorschau(was,bild){
	if(was==0){
		//document.getElementById("vorschau").style.top = "-1000px";
		document.getElementById("vorschau").style.visibility = "hidden";
		}
	else{
		document.getElementById("vorschau").style.visibility = "visible";
		//document.getElementById("vorschau").style.left = (mousex-250)+"px";
		document.getElementById("vorschau").style.top = (mousey-100)+"px";
		
		var inh="";
		if(bild){
			inh='<img src="bilder/bild_mittel/'+bild+'.jpg" class="bild">';
			}
		inh+='<img src="bilder/grundrisse/'+was+'.jpg" class="gr">';
		document.getElementById("vorschau").innerHTML = inh;
		}
	}

function init(){
	if (window.event) {
		if (document.captureEvents) document.captureEvents(Event.MOUSEMOVE);
		else window.captureEvents(Event.MOUSEMOVE);
		}
	document.onmousemove = getXY;
	}
init();

var mousex;
var mousey;
function getXY(e) {
if(!e) e = window.event;
var body = (window.document.compatMode && window.document.compatMode == "CSS1Compat") ?
window.document.documentElement : window.document.body || null;
mousey = e.pageY ? e.pageY : e.clientY + body.scrollTop;
mousex = e.pageX ? e.pageX : e.clientX + body.scrollLeft;
}
