function PopupManager() {
	this.open = function(windowTitle, windowWidth, windowHeight, contentID) {
	    var newWidth = windowWidth
	    var newHeight = windowHeight
	    if (getActiveStyleSheet() == 'large'){
	        newWidth += 10;
	        newHeight += 30;
	    }
	    if (getActiveStyleSheet() == 'huge'){
	        newWidth += 45;
	        newHeight += 60;
	    }
	    var googlewin=dhtmlwindow.open("dhtmlWindow", "inline", "<div class='dhtmlPopupContent'>"+document.getElementById(contentID).innerHTML+"</div>", windowTitle, "width="+newWidth+"px,height="+newHeight+"px,resize=0,scrolling=1,center=1", "recal");
		if(document.body.scrollTop>0) {
			sTop=document.body.scrollTop;
		}
		else {
			sTop=document.documentElement.scrollTop;
		}
		googlewin.style.top=(sTop+200)+"px";


	}
	
}

var PopupManager = new PopupManager();

function PopupManager2() {
	this.open = function(windowTitle, windowWidth, windowHeight, url) {
	    var newWidth = windowWidth
	    var newHeight = windowHeight
	    if (getActiveStyleSheet() == 'large'){
	        newWidth += 10;
	        newHeight += 30;
	    }
	    if (getActiveStyleSheet() == 'huge'){
	        newWidth += 45;
	        newHeight += 60;
	    }
	   var googlewin=dhtmlwindow.open("dhtmlWindow", "iframe", url, windowTitle, "width="+(newWidth+60)+"px,height="+(newHeight+20)+"px,resize=0,scrolling=0,center=1", "recal");
		if(document.body.scrollTop>0) {
			sTop=document.body.scrollTop;
		}
		else {
			sTop=document.documentElement.scrollTop;
		}
		googlewin.style.top=(sTop+200)+"px";
	}
}

var PopupManager2 = new PopupManager2();
function openDPopUp(url,target,w,h,scroll,resize,status,center)
{
		w=	dhtmlwindow.open(target, "iframe", url, target, "width="+w+"px,height="+h+"px,resize="+resize+",scrolling="+scroll+",center="+center, "recal");
		if(document.body.scrollTop>0) {
			sTop=document.body.scrollTop;
		}
		else {
			sTop=document.documentElement.scrollTop;
		}

	w.style.top=(sTop+200)+"px";
}

function openPopUp(url,target,w,h,scroll,resize,status,center)
{
	var settings = "";
	if (center == 1)
	{
		var l = (screen.width-w)/2;
		var t = (screen.height-h)/2;
		settings = ",left="+l+",top="+t;
	}
	
	w = window.open(url, target, "toolbar=0,scrollbars="+scroll+",location=0,statusbar="+status+",menubar=0,resizable="+resize+",width="+w+",height="+h+settings);

}

function grauEin() {
		bg=document.getElementById('background-wrapper');

		hw=document.documentElement.clientHeight;
		ww=document.documentElement.clientWidth;

		h = document.body.offsetHeight;
		w = document.body.offsetWidth;

		if(hw>h) h = hw;
		if(ww>w) w = ww;

		bg.style.width=w+"px";
		bg.style.height=h+"px";
		bg.style.display="inline";
}

function grauAus() {
	document.getElementById('background-wrapper').style.display="none";
}

document.write('<div id="background-wrapper" style="display:none;background:black;position:absolute;z-index:300;top:0px;left:0px;opacity:0.7; filter: alpha(opacity = 70);"></div>');
