/* ars navigandi GmbH - arscms */
/* /styles/js/std.js */

/* begin area popup window sizes ************************************************/

popupWindow_style = new Array();
popupWindow_style['lesson'] = {'width':925,'height':605,'xPos':40,'yPos':40};
popupWindow_style['standardPopup'] = {'width':558,'height':546,'xPos':40,'yPos':40,'windowOptions':'dependent=yes,scrollbars=yes,resizable=yes'};
popupWindow_style['conditions_for_participating'] = {'width':990,'height':630,'xPos':10,'yPos':10,'windowOptions':'dependent=yes,scrollbars=yes,resizable=yes'};

/* this method find out height of possible space for content, sets maximum height for scrolling content */
function setScrollingHeight(id1,id2,minusheight1,minusheight2,bodyheightlimit,secondTry) {

	innerHeightAvailable1 = getWindowLayout()['innerHeight'];
	innerHeightAvailable2 = getWindowLayout()['innerHeight'];
	
	if (innerHeightAvailable1 > bodyheightlimit) {
		innerHeightAvailable1 = bodyheightlimit
	}

	id1Height = innerHeightAvailable1-minusheight1;
	id2Height = innerHeightAvailable2-minusheight2;

	try {
		document.getElementById(id1).style.height=id1Height+"px";
	} catch (ex) {
		//
	}

	if (secondTry) {
		// is second try: do nothing
	} else {
		setScrollingHeight(id1,id2,minusheight1,minusheight2,bodyheightlimit,1)
	}
}
/* end area popup window sizes **************************************************/

/* begin area *******************************************************************/

/* end area *********************************************************************/
