<!--

var current_screen;

function modular(divname,inWidth,inHeight) {
	current_screen = divname;
	if (inWidth == 0) { inWidth = 480; }
	if (inHeight == 0) { inHeight = 600; }
	
	//new Effect.ScrollTo('top',{duration:0.1});
	// get window information
	if(document.viewport.getHeight() < $('siteContainer').getDimensions().height) {
		$("overlay").style.height = ($("siteContainer").getDimensions().height)+"px"; 
	} else {
		$("overlay").style.height = document.viewport.getHeight()+"px";
	}
	
	var windowWidth = document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupWidth = inWidth;
	var popupHeight = inHeight;
	
	$("overlay").show();
	$(divname+"Dialog").setStyle({
		left: (windowWidth/2-popupWidth/2)+"px",
		// top: (windowHeight/2-popupHeight/2)+"px",
		top: "70px",
		width: popupWidth+"px",
		height: popupHeight+"px"
	});
	
	Effect.Appear(divname+'Dialog', { duration: 0.5 });

}

function hideOverlay(current_screen) {
		$(current_screen+"Dialog").hide();
		$("overlay").hide();
		current_screen = '';
}


// -->