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

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

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

popupWindow_style['lesson'] = {'width':925,'height':663,'xPos':2,'yPos':2,'windowOptions':'dependent=yes,scrollbars=no,resizable=yes',showInLinkManager:true};
popupWindow_style['encyclopedia'] = {'width':807,'height':630,'xPos':10,'yPos':10,'windowOptions':'dependent=yes,scrollbars=no,resizable=yes',showInLinkManager:true};
popupWindow_style['news'] = {'width':807,'height':630,'xPos':10,'yPos':10,'windowOptions':'dependent=yes,scrollbars=no,resizable=yes',showInLinkManager:true};
popupWindow_style['media'] = {'width':807,'height':630,'xPos':10,'yPos':10,'windowOptions':'dependent=yes,scrollbars=no,resizable=yes',showInLinkManager:true};
popupWindow_style['blog'] = {'width':807,'height':630,'xPos':10,'yPos':10,'windowOptions':'dependent=yes,scrollbars=no,resizable=yes',showInLinkManager:true};
popupWindow_style['teaserspiel'] = {'width':807,'height':600,'xPos':10,'yPos':10,'windowOptions':'dependent=yes,scrollbars=no,resizable=yes',showInLinkManager:true};
popupWindow_style['imagefilms'] = {'width':807,'height':640,'xPos':10,'yPos':10,'windowOptions':'dependent=yes,scrollbars=no,resizable=yes',showInLinkManager:true};

/* 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;
	
	agt=navigator.userAgent.toLowerCase();
	if (agt.indexOf("firefox") != -1) {
		id1Height=id1Height+150;
		id2Height=+150;
	}
	
	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 *********************************************************************/

/* begin tooltipboxes popup *****************************************************/
function openTooltipBox(giorgioId, boxId) {
	// ATTENTION: offset for giorgio-tooltipBox from swf is defined here!
	var offsetTooltipX = 70;
	var offsetTooltipY = 260;
	
	document.getElementById(boxId).style.visibility='visible';
	document.getElementById(boxId).style.display='block';
	var posGiorgio = Element.cumulativeOffset($$('td.'+giorgioId)[0]);
	var testPosY = posGiorgio[1]-offsetTooltipY;
	if (testPosY < 0){
		offsetTooltipX = -25;
		offsetTooltipY = 50;
	}
	document.getElementById(boxId).style.left=(posGiorgio[0]-offsetTooltipX)+'px';
	document.getElementById(boxId).style.top=(posGiorgio[1]-offsetTooltipY)+'px';
}
function closeTooltipBox(boxId) {
	document.getElementById(boxId).style.visibility='hidden';
	document.getElementById(boxId).style.display='none';
}
/* end tooltipboxes popup *******************************************************/

/* begin globe mouseover *****************************************************/
function navGlobe(idcall,imgname,mostatus) {
	document.getElementById(idcall).src='/styles/images/German/'+imgname+mostatus+'.gif';
}
/* end globe mouseover *******************************************************/