function changeBody(idnr){

    var element = document.getElementsByTagName("body")[0];
    var myInt = idnr;

	switch(myInt){
    	case 71: element.id="produkte";
        	break;
      	case 70: element.id="dienste";
            break;
      	case 69: element.id="objekte";
            break;
      	case 68: element.id="dokumentation";
            break;
      	case 67: element.id="aboutus";
            break;
     }
}

		function openImg(pbildnr,pwidth,pheight,ptitle) {
			var mybildname =  pbildnr;
			var mywidth	= pwidth;
			var myheight  = pheight;

//			myWindow = window.open(mybildname , 'newwindow', 'width=' + mywidth + ', height =' + myheight + ', top=10, left=10,scrollbars=no,resizable');
			myWindow = window.open('', 'newwindow', 'width=' + mywidth + ', height =' + myheight + ', top=10, left=10,scrollbars=yes,resizable');
			myWindow.resizeTo(mywidth,myheight);
			
			myWindow.document.open();
			myWindow.document.write("<html><head><title>" + ptitle + "</title></head><body style='background-color:black;'>");
		//	myWindow.document.write("<p>name des bildes ist:" + mybildname + "</p>");
		
			//myWindow.document.write("<span><a href='javascript:window.close();'><img src=" + mybildname + " align='top' height="+myheight+ " width="+mywidth+ "    /></a></span>");
			myWindow.document.write("<span><img src=" + mybildname + " align='top' height="+myheight+ " width="+mywidth+ "    /></span>");
			myWindow.document.write("</body></html>");
			myWindow.document.close();
			
			myWindow.focus();
		}



/*

Simple Image Trail script- By JavaScriptKit.com

Visit http://www.javascriptkit.com for this script and more

This notice must stay intact

*/



var ua = navigator.userAgent.toLowerCase();

var divw=0;

var divh=0;



if (document.getElementById || document.all)

	document.write('<div id="imgtrailer" style="position:absolute;visibility:hidden;z-index:100;"></div>')



function gettrailobject()

	{

	if (document.getElementById)

		return document.getElementById("imgtrailer")

	else if (document.all)

		return document.all.trailimagid

	}



function gettrailobj()

	{

	if (document.getElementById)

		return document.getElementById("imgtrailer").style

	else if (document.all)

		return document.all.trailimagid.style

	}



function truebody()

	{

	return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body

	}



function trailOff()

	{

	document.body.style.cursor = "default";

	document.onmousemove='';

	gettrailobj().visibility="hidden";

	}



function trailOn(thumbimg)

	{

	if(ua.indexOf('opera') == -1 && ua.indexOf('safari') == -1)

		{

		document.body.style.cursor = "pointer";

		document.body.style.cursor = "hand";

		gettrailobj().left="-500px";

		divthw = 396 + 2;

		gettrailobject().innerHTML = '<div style="height: 250px; width:396px; background-color: #ffffff;"><div style="background-color: #ffffff; background-image: url(/images/loading.gif); background-repeat: no-repeat;"><img src="'+thumbimg+'" width="396" height="250" /><br class="clearboth" /></div></div>';

		gettrailobj().visibility="visible";

		divw = 396 + 32;

		divh = 250 + 80;

		document.onmousemove=followmouse;

		}

	}

function trailOnSQ(thumbimg)

	{

	if(ua.indexOf('opera') == -1 && ua.indexOf('safari') == -1)

		{

		document.body.style.cursor = "pointer";

		document.body.style.cursor = "hand";

		gettrailobj().left="-500px";

		divthw = 396 + 2;

		gettrailobject().innerHTML = '<div style="height: 396px; width:396px; background-color: #ffffff;"><div style="background-color: #ffffff; background-image: url(/images/loading.gif); background-repeat: no-repeat;"><img src="'+thumbimg+'" width="396" height="396" /><br class="clearboth" /></div></div>';

		gettrailobj().visibility="visible";

		divw = 396 + 32;

		divh = 396 + 32;

		document.onmousemove=followmouse;

		}

	}


function followmouse(e)

	{

	var docwidth=document.all? truebody().scrollLeft+truebody().clientWidth : pageXOffset+window.innerWidth-15

	var docheight=document.all? Math.min(truebody().scrollHeight, truebody().clientHeight) : Math.min(document.body.offsetHeight, window.innerHeight)

if(typeof e != "undefined")

	{

	if(docwidth < 15+e.pageX+divw)

		xcoord = e.pageX-divw-5;

	else

		xcoord = 15+e.pageX;

	if(docheight < 15+e.pageY+divh)

		ycoord = 15+e.pageY-Math.max(0,(divh + e.pageY - docheight - truebody().scrollTop - 30));

	else

		ycoord = 15+e.pageY;

	}

else if (typeof window.event != "undefined")

	{

	if(docwidth < 15+truebody().scrollLeft+event.clientX+divw)

		xcoord = truebody().scrollLeft-5+event.clientX-divw;

	else

		xcoord = truebody().scrollLeft+15+event.clientX;



	if(docheight < 15+truebody().scrollTop+event.clientY+divh)

		ycoord = 15+truebody().scrollTop+event.clientY-Math.max(0,(divh + event.clientY - docheight - 30));

	else

		ycoord = truebody().scrollTop+15+event.clientY;

	}

	gettrailobj().left=xcoord+"px"

	gettrailobj().top=ycoord+"px"

	}


