//Animated Window- By Rizwan Chand (rizwanchand@hotmail.com)
//Modified by DD for NS compatibility
//Modified by PK for individual use
//Visit http://www.dynamicdrive.com for this script

function expandingWindow(website, typus) {
var windowprops='width=50,height=50,scrollbars=yes,status=no,resizable=yes'
var heightspeed = 4; // vertical scrolling speed (higher = slower)
var widthspeed = 10;  // horizontal scrolling speed (higher = slower)

if (window.resizeTo&&navigator.userAgent.indexOf("Opera")==-1) {
//var winwidth = window.screen.availWidth - leftdist;
//var winheight = window.screen.availHeight - topdist;
if (typus == "einladung") {
	if (navigator.appName == "Netscape") {
		var winwidth = 740;
		var winheight = 740;
	}
	else {
		var winwidth = 740;
		var winheight = 770;
	}	
}
else if (typus == "kalender") {
	var winwidth = 450;
	var winheight = 330;
}
else if (typus == "registrieren") {
	var winwidth = 450;
	var winheight = 430;
}
else if (typus == "websteuerung") {
	var winwidth = 700;
	var winheight = 600;
}
else if (typus == "datenschutz") {
	var winwidth = 400;
	var winheight = 400;
}
else if (typus == "impressum") {
	var winwidth = 450;
	var winheight = 550;
}
else if (typus == "tipps") {
	var winwidth = 450;
	var winheight = 550;
}
else if (typus == "faq") {
	var winwidth = 450;
	var winheight = 550;
}
else if (typus == "kontakt") {
	var winwidth = 450;
	var winheight = 550;
}
else if (typus == "anleitung") {
	var winwidth = 550;
	var winheight = 650;
}
else {
	var winwidth = 450;
	var winheight = 550;
}

//horizontal centering
var leftdist = (screen.width-winwidth)/2;    // distance to left edge of window
var topdist = 100;     // distance to top edge of window


var sizer = window.open("","","left=" + leftdist + ",top=" + topdist +","+ windowprops);
for (sizeheight = 1; sizeheight < winheight; sizeheight += heightspeed)
sizer.resizeTo("1", sizeheight);
for (sizewidth = 1; sizewidth < winwidth; sizewidth += widthspeed)
sizer.resizeTo(sizewidth, sizeheight);
sizer.location = website;
}
else
window.open(website,typus);
}
