<!-- STYLE.DISPLAY='NONE' -->
function turnOff(idname) { 
	document.getElementById(idname).style.display = 'none'; 
} 

<!-- STYLE.DISPLAY='BLOCK' -->
function turnOn(idname) { 
	document.getElementById(idname).style.display = 'block'; 
} 


function toTransmission(f)
{
if (f.d.value != ""){
	var x;
	x = f.d.value.replace(',', '.');
	x = Math.pow(10, x);
	x = 10000000 * (1 / x);
	x = Math.round (x); 
	x = x / 100000;
	f.transmission_erg.value = x;
  }
}

function toDensity(f)
{
if (f.t.value != ""){
	var y;
	y = f.t.value.replace(',', '.');
	y = Math.log(100 / y);
	y = y / Math.log(10);
	y = 1000 * y; 
	y = Math.round (y); 
	y = y / 1000; 
	f.dichte_erg.value = y;
   }
}


//Mouseover effekt
var offsetfrommouse=[5,5]; 		//image x,y offsets from cursor position in pixels. Enter 0,0 for no offset
var displayduration=0; 			//duration in seconds image should remain visible. 0 for always.
var currentimageheight = 158;	// maximum image size.

if (document.getElementById || document.all){
	document.write('<div id="trailimageid">');
	document.write('</div>');
}

function gettrailobj(){
if (document.getElementById && document.getElementById("trailimageid"))
return document.getElementById("trailimageid").style
else if (document.all)
return document.all.trailimagid.style
}

function gettrailobjnostyle(){
if (document.getElementById && document.getElementById("trailimageid"))
return document.getElementById("trailimageid")
else if (document.all)
return document.all.trailimagid
}


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

	
function showtrail(imagename,type){
	document.onmousemove=followmouse;

	var newHTML = '<table border="0" width="300px" cellpadding="3" cellspacing="3">';
	newHTML = newHTML + '<tr><td width="100%" valign="top">';
	newHTML = newHTML + '<table class="thin" width="222px">';
	newHTML = newHTML + '<tr bgcolor="#FFFFFF"><td width="100%"><table border="1" width="100%" cellspacing="0" cellpadding="0">';
	newHTML = newHTML + '<tr><td width="100%"><p align="center">';
	newHTML = newHTML + '<div align="left" style="color:#000000;background-color:#FFFFFF">';

	if(type=='engl'){
		newHTML = newHTML + '&nbsp;&nbsp;On click more information';
	}
	else{
		newHTML = newHTML + '&nbsp;&nbsp;Bei Klick detaillierte Informationen';
	}
	newHTML = newHTML + '</div>';
	newHTML = newHTML + '<div align="center" style="padding:5px;background:#fff;border:solid 0px #000">';
	newHTML = newHTML + '<img src="' + imagename + '" border="0"">';
	newHTML = newHTML + '</div>';		
		
	gettrailobjnostyle().innerHTML = newHTML;
	gettrailobj().visibility="visible";
}


function hidetrail(){
	gettrailobj().visibility="hidden"
	gettrailobjnostyle().innerHTML=""
	document.onmousemove=""
	gettrailobj().left="-500px"
}


function followmouse(e){

	var xcoord=offsetfrommouse[0]
	var ycoord=offsetfrommouse[1]

	if (typeof e != "undefined"){
		xcoord+=e.pageX
		ycoord+=e.pageY

	} else if (typeof window.event != "undefined"){
		xcoord+=truebody().scrollLeft+event.clientX
		ycoord+=truebody().scrollTop+event.clientY
	}

	var docwidth=document.all? truebody().scrollLeft+truebody().clientWidth : pageXOffset+window.innerWidth-15
	var docheight=document.all? Math.max(truebody().scrollHeight, truebody().clientHeight) : Math.max(document.body.offsetHeight, window.innerHeight)

	gettrailobj().left=xcoord+"px"
	gettrailobj().top=ycoord+"px"

}