/*
	@(#)	ibis.js - Ibis javascript functies
	@(#)	Versie 0.9
	@(#)	Last edit: 28-02-2007, Sebastiaan Smit <bas@echelon.nl>

*/

function getHeight() {
	if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myHeight = document.body.clientHeight;
	} else if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myHeight = window.innerHeight;
	} 
	return (myHeight-190) 
}       

function getRefToDiv(divID,oDoc) {
	if( document.getElementById ) { return document.getElementById(divID); }
	if( document.all ) { return document.all[divID]; }
	if( !oDoc ) { oDoc = document; }
	if( document.layers ) {
		if( oDoc.layers[divID] ) {
			return oDoc.layers[divID];
		} else {
			for( var x = 0, y; !y && x < oDoc.layers.length; x++ ) {
				y = getRefToDiv(divID,oDoc.layers[x].document);
			}
			return y;
		}
	}
	return false;
}

function resizeDiv(oName) {
	var newHeight = getHeight()
	var myReference = getRefToDiv(oName), noPx = document.childNodes ? 'px' : 0;
	if( myReference.style ) { myReference = myReference.style; }
	if( myReference.resizeTo ) { myReference.resizeTo( newWidth, newHeight ); }
	//myReference.width = newWidth + noPx; myReference.pixelWidth = newWidth;
	myReference.height = newHeight + noPx; myReference.pixelHeight = newHeight;
}
