
 function Pinpos(e,Div,Cord) { 
 
		we=window.event;
		var x = e.pageX ? e.pageX : we.clientX;
		var y = e.pageY ? e.pageY : we.clientY;
		$("#pinx").value = x;
		$("#piny").value = y;


		$(Div).css({visibility: 'visible'});
		if(Cord!='x') $(Div).css({left: x-80, top: y});
}

function checkPin() {
	if(document.pinform.user.value=='Dein Name') {
	   //alert("Oh komm... Bitte wenigstens Name angeben...!");
	   document.pinform.user.focus();
	   return false;
	}
	if(document.pinform.note.value=='Dein Senf') {
	   //alert("Wie? Hast nix zu sagen?!");
	   document.pinform.note.focus();
	   return false;
	}
	Email = document.pinform.brief.value;
	if(Email != 'Deine Email')	
		if(Email.search(/\@/) < 1 && Email.search(/\./) < 2) {
	   		document.pinform.brief.focus();
			return false;
		}
  captchaBox(1);
}


function checkMail() {
if(document.mailform.email.value=='') {
   //alert("Zu welchem Thema schreibst'n...?");
   document.mailform.email.focus();
   return false;
  }
if(document.mailform.name.value=='Dein Name') {
   //alert("Oh komm... Bitte wenigstens Name angeben...!");
   document.mailform.name.focus();
   return false;
  }
if(document.mailform.sender.value=='Deine Email') {
   //alert("..und wem soll ich ohne Email antworten?");
   document.mailform.sender.focus();
   return false;
  }
if(document.mailform.mailtext.value=='Deine Message inner Bottle...') {
   //alert("Wie? Hast nix zu sagen?!");
   document.mailform.mailtext.focus();
   return false;
  }
}

// max' script

function absoluteY(n) {
	if(n.offsetParent) {
		return absoluteY(n.offsetParent) + n.offsetTop;
	}
	return n.offsetTop;
}

var timer = 50;
var steps = 8;
var s = 0;
var i = 0;

function slide(bild) {
bild = "bild"+bild;
	var t = absoluteY(document.images[bild])+45;
	s = (t - document.body.scrollTop) / Math.pow(2, steps);
	i = 0;
	scrollFast();
}

function scrollFast() {
	if(++i >= steps) {
		scrollSlow();
	}
	else {
		window.scrollTo(0, document.body.scrollTop + s);
		s *= 2;
		setTimeout("scrollFast()", timer);
	}
}

function scrollSlow() {
	s /= 2;
	window.scrollTo(0, document.body.scrollTop + s);
	if(--i > 0) {
		setTimeout("scrollSlow()", timer);
	}
}
	
	
function preloader(d) { //DOM
	if (document.getElementById){
		document.getElementById("warten").style.visibility="hidden";
	}else{
		if (document.layers){ //NS4
			document.warten.visibility = "hidden";
		} else { //IE4
		document.all.warten.style.visibility = "hidden";
		}
	}
}

function openMP() {
	window.setTimeout("dd.elements.hinten.hide()",0);
	window.setTimeout("dd.elements.mpin.hide()",200);
	for(i=0;i<200;i++) {	
		window.setTimeout("dd.elements.tlinks.moveBy(-5, 0)",400);
		window.setTimeout("dd.elements.trechts.moveBy(5, 0)",400);
	}
	window.setTimeout("dd.elements.acht.hide()",200);
	window.setTimeout("dd.elements.mlogo.hide()",400);
	window.setTimeout("dd.elements.tlinks.hide()",200);
	window.setTimeout("dd.elements.trechts.hide()",200);
	for(i=0;i<52;i++) {	
		window.setTimeout("dd.elements.poeller.moveBy(0, 10)",200);
		window.setTimeout("dd.elements.borderfooter.moveBy(0, 10)",200);
	}
	window.setTimeout("dd.elements.poeller.hide()",200);
	window.setTimeout("dd.elements.borderfooter.hide()",400);
	window.setTimeout("dd.elements.rechtsrand.hide()",100);
}




/*

	if(!e) e = window.event;
	var pos = new Object();
	pos.left = e.pageX ? e.pageX : e.clientX;
	pos.top = e.pageY ? e.pageY : e.clientY;
	// Der IE 6 braucht Sonderbehandlung
	if(document.compatMode && document.compatMode == "BackCompat")
	{
	// IE 6 im Quirks-(BackCompat) Modus
	pos.scrollLeft = pos.left + document.body.scrollLeft;
	pos.scrollTop = pos.top + document.body.scrollTop;
	}
	else if (document.compatMode && document.compatMode == "CSS1Compat") {
	// IE 6 im CSS1Compat Modus
	pos.scrollLeft =Ê pos.left + document.documentElement.scrollLeft;
	pos.scrollTop = pos.top + document.documentElement.scrollTop;
	}else if (document.body)
	{
	// IE < 6 (nicht sicher da ich nur den IE 4 hab)
	pos.scrollLeft = pos.left + document.body.scrollLeft;
	pos.scrollTopÊ = pos.top + document.body.scrollTop;
	} 
*/



// webcam


function launch(url) { 
    document.getElementById("webbild").src=url; 
} 



function divChange(div1,div2){
	document.getElementById(div1).style.display="block"; 
	document.getElementById(div2).style.display="none"; 
}


