  var offsetdefiniert = 0; //variable für einmalige offsetbestimmung
// Mauskoordinaten
function mausbewegung(Ereignis) {
  if (!Ereignis)
    Ereignis = window.event;
  var mausX = Ereignis.clientX;
  var mausY = Ereignis.clientY;
 // if(mausY > 15) { 
    coord_abfrage(mausX, mausY); //}
 //else {
    move_drop(mausX); //}
}
document.onmousemove = mausbewegung;

// Tropfen bewegen
function move_drop(mausX) {
  //coordinaten von "main"-div speichern
  if(!offsetdefiniert) {
  osleft=document.getElementById('main').offsetLeft;
  ostop=document.getElementById('main').offsetTop;
  oswidth=document.getElementById('main').offsetWidth;
  offsetdefiniert = 1; }
  x = mausX - 15;
  xk = x - osleft;
  if((x >= osleft) && (x <= osleft+oswidth-39))
  document.getElementById('tropfen').style['left'] = xk + 'px';
  }

//vergleich der mausposition
function coord_abfrage(mX,mY) {
  if(mY < 100) { 
    hoverstat = 1; 
	anzeige(mX,mY);
//	var op_status = document.getElementById('main').style['opacity'];
//	if(op_status < 0.3) {
//	  hoverstat = 0;
//	  opacity_inv_init('main','9','1','20'); }
	}
  else if(mY > 99) { 
    hoverstat = 0;
    anzeige(mX,mY); 
	var op_status = document.getElementById('main').style['opacity'];
	if(op_status > 0.9) {
	opacity_init('main','9','0.2','20'); }
	}
  }

// Variablenanzeige
function anzeige(anz1,anz2) {
if(document.getElementById('anzeige'))
document.getElementById('anzeige').innerHTML = anz1+','+anz2+','+hoverstat;
}
// OPACITY FADER

function opacity(obj, anf, end, speed) {
 if(anf == 9) { anf = document.getElementById(obj).style['opacity']; }
 if(anf > end) {
    document.getElementById(obj).style['opacity'] = anf;
	document.getElementById(obj).style['filter'] = "alpha(opacity=" + anf*100 + ")";
    anf = anf - 0.05;
	anf = anf*100;
	anf = Math.round(anf);
	anf = anf*0.01;
	if(hoverstat == 0) 
	  setTimeout("opacity('"+obj+"','"+anf+"','"+end+"','"+speed+"')", speed);
    }
 else if(end == 0) {  document.getElementById(obj).style['visibility'] = "hidden"; }
  }
  
function opacity_inv(obj, anf, end, speed) {
 if(anf == 9) { anf = document.getElementById(obj).style['opacity']; }
 if(anf < end) {
    document.getElementById(obj).style['opacity'] = anf;
	document.getElementById(obj).style['filter'] = 'alpha(opacity=' + anf*100 + ')';
	anf*= 1;
	anf = anf + 0.05;
	anf = anf*100;
	anf = Math.round(anf);
	anf = anf*0.01;
	setTimeout("opacity_inv('"+obj+"','"+anf+"','"+end+"','"+speed+"')", speed);
    }
 else if(end == 1) {  document.getElementById(obj).style['opacity'] = "1"; 
 document.getElementById(obj).style['filter'] = 'alpha(opacity=100)';}
  }
function opacity_init(obj, anf, end, speed) {
 if(hoverstat == 0) { opacity(obj, anf, end, speed); }
 else {return;} 
}
function opacity_inv_init(obj, anf, end, speed) {
 if(hoverstat == 0) { opacity_inv(obj, anf, end, speed); }
 else {return;}
}