function preview(imgID) {

	if (imgID) {
	
		document.getElementById('headerBild').style.display="none";
		
		document.getElementById('previewImgContainer').src="/images/"+imgID+"/"+imgID+"_header.jpg";
	;
		document.getElementById('previewImg').style.display="block";
		
		if (timeout) {
			clearTimeout(timeout);
		}
	}
	else {
		timeout=setTimeout(hidePreview,2000);
		
	}
}

function hidePreview() {
	document.getElementById('previewImg').style.display="none";
	document.getElementById('headerBild').style.display="block";
}



function ds(id) {
	
	for (x=1; x<=6 ; x++) {
		document.getElementById('dienstleistung'+x).style.display='none';
	}

	document.getElementById('dienstleistung'+id).style.display='block';
}



function info(url,instance,width,height,xpos,ypos) {
	if (xpos == -1 && ypos == -1) {
		xcenter=(screen.width/2)-(width/2);
		ycenter=(screen.height/2)-(height/2);
		window.open(url,instance,"toolbar=no,location=no,directories=no,scrollbars=no,status=no,menubar=no,resizable=no,width="+width+",height="+height+",left="+xcenter+",top="+ycenter+"")
	}
	else {
		window.open(url,instance,"toolbar=no,location=no,directories=no,scrollbars=no,status=no,menubar=no,resizable=no,width="+width+",height="+height+",left="+xpos+",top="+ypos+"")
	}
}




function tmt_findObj(n){
	var x,t; if((n.indexOf("?"))>0&&parent.frames.length){t=n.split("?");
	x=eval("parent.frames['"+t[1]+"'].document.getElementById('"+t[0]+"')");
	}else{x=document.getElementById(n)}return x;
}

function ShowHideLayers() { //v3.0A Modified by Al Sparber and Massimo Foti for NN6 Compatibility
  var i,p,v,obj,args=ShowHideLayers.arguments;if(document.getElementById){
   for (i=0; i<(args.length-2); i+=3){ obj=tmt_findObj(args[i]);v=args[i+2];
   v=(v=='show')?'visible':(v='hide')?'hidden':v;
   if(obj)obj.style.visibility=v;}} else{
  for (i=0; i<(args.length-2); i+=3) if ((obj=FindObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }}
}

