function popup(URL,w,h){
w = window.open(URL, "", "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width="+w+",height="+h);
}

// *** Fügt eine E-Mail-Adresse ein ***
function InsertMail(mailnam,mailsvr,maildom,text)
{
  if(text=="")
    document.write('<a href="mailto:'+mailnam+'@'+mailsvr+'.'+maildom+'">'+mailnam+'@'+mailsvr+'.'+maildom+'</a>');
  else
    document.write('<a href="mailto:'+mailnam+'@'+mailsvr+'.'+maildom+'">'+text+'</a>');
}

	//change the opacity for different browsers
function changeOpac(opacity, id) {
	var object = document.getElementById(id).style; 
	object.opacity = (opacity / 100);
	object.MozOpacity = (opacity / 100);
	object.KhtmlOpacity = (opacity / 100);
	object.filter = "alpha(opacity=" + opacity + ")";
}

			
function blendimage(divid, imageid, imagefile, millisec) {
	var speed = Math.round(millisec / 100);
	var timer = 0;
	
	//set the current image as background
	document.getElementById(divid).style.backgroundImage = "url(" + document.getElementById(imageid).src + ")";
	
	//make image transparent
	changeOpac(0, imageid);
	
	//make new image
	document.getElementById(imageid).src = imagefile;

	//fade in image
	for(i = 0; i <= 100; i++) {
		setTimeout("changeOpac(" + i + ",'" + imageid + "')",(timer * speed));
		timer++;
	}
}

function bildwechseln() {
top.welchesbild=top.welchesbild+1;
if (top.welchesbild>20) {top.welchesbild=1;}
setTimeout("top.blendimage('blenddiv','blendimage', 'images/foto_kleiner_"+top.welchesbild+".jpg',200);top.bildwechseln()",(5000));
}

//ganzzahlige Zufallszahl zwischen 0 und Bereich
function zufall(bereich){
         var bereich;
         var zahl = Math.round(Math.random()/(1/bereich));
         return zahl;
}

