function ds(dom,user){document.write("<a href=\"mailto:"+user+'@'+dom+"\">"+user+'@'+dom+"</a>");}
// window.addEventListener?window.addEventListener("load",so_init,false):window.attachEvent("onload",so_init);

var imgs = new Array(), zInterval = null, current=0, pause=false;

function so_init() {
	if(!document.getElementById || !document.createElement)return;

	css = document.createElement("link");
	css.setAttribute("href","/css/wechsel.css");
	css.setAttribute("rel","stylesheet");
	css.setAttribute("type","text/css");
	document.getElementsByTagName("head")[0].appendChild(css);

	imgs = document.getElementById("dsBild").getElementsByTagName("img");
	for(i=1;i<imgs.length;i++) imgs[i].xOpacity = 0;
	imgs[0].style.display = "block";
	imgs[0].xOpacity = .99;
	
	setTimeout(wechsel,3000);
}

function wechsel() {
	cOpacity = imgs[current].xOpacity;
	nIndex = imgs[current+1]?current+1:0;

	nOpacity = imgs[nIndex].xOpacity;
	
	cOpacity-=.02; 
	nOpacity+=.02;
	
	imgs[nIndex].style.display = "block";
	imgs[current].xOpacity = cOpacity;
	imgs[nIndex].xOpacity = nOpacity;
	
	setOpacity(imgs[current]); 
	setOpacity(imgs[nIndex]);
	
	if(cOpacity<=0) {
		imgs[current].style.display = "none";
		current = nIndex;

		//document.getElementById("bildtext").innerHTML = imgs[current].getAttribute('title');
		setTimeout(wechsel,3000);
	} else {
		setTimeout(wechsel,50);
	}
	
	function setOpacity(obj) {
		if(obj.xOpacity>.99) {
			obj.xOpacity = .99;
			return;
		}
		obj.style.opacity = obj.xOpacity;
		obj.style.MozOpacity = obj.xOpacity;
		obj.style.filter = "alpha(opacity=" + (obj.xOpacity*100) + ")";
	}
}

function adj() {
	ih=0;
	if (window.innerHeight) {
		ih=window.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight != 0) {
		ih=document.documentElement.clientHeight;
	} else if (document.body) {
		ih=document.body.clientHeight;
	}
	if (ih<500) return;
	if (ih<560) ih=560;
	icval=ih-30;
	document.getElementById("alles").style.height=icval+"px";
	document.getElementById("rechts").style.height=icval+"px";
	icval=ih-305;
	document.getElementById("content").style.height=icval+"px";
}

