/* 
Methods for resizing the flash stage at runtime.

setFlashWidth(divid, newW)
divid: id of the div containing the flash movie.
newW: new width for flash movie

setFlashWidth(divid, newH)
divid: id of the div containing the flash movie.
newH: new height for flash movie

setFlashSize(divid, newW, newH)
divid: id of the div containing the flash movie.
newW: new width for flash movie
newH: new height for flash movie

canResizeFlash()
returns true if browser supports resizing flash, false if not. 
*/
function setFlashWidth(divid, newW){
	document.getElementById(divid).style.width = newW+"px";
}
function setFlashHeight(divid, newH){
	document.getElementById(divid).style.height = newH+"px";		
}
function setFlashSize(divid, newW, newH){
	setFlashWidth(divid, newW);
	setFlashHeight(divid, newH);
}


/* ADDED FUNCTIONS */

function old_glideFlashHeigth(divid, newH){
	var element = document.getElementById(divid);
	//alert(newH+divid+Math.abs(parseInt(element.style.height) - newH));
	while (Math.abs(parseInt(element.style.height) - newH) > 1){
		setFlashHeight(divid,parseInt(element.style.height) + (newH - parseInt(element.style.height))*0.10);		
	}
}

function glideFlashHeigth(divid, newH){
	var resizeDelay = 10; // delay between resize events
	var resizePct = 0.25; // percent per resize event
	
	var element = document.getElementById(divid);
	
	//alert('oproepen met:'+divid+' en '+  newH);
	if (Math.abs(parseInt(element.style.height) - newH) < 10){
		setFlashHeight(divid,newH);
		setFlashHeight(divid+"Obj",newH); // Het FlashObject moet een id hebben 'dividObj', bijv. subheaderObj
	}else{
		var newHeight = parseInt(element.style.height) + (newH - parseInt(element.style.height))*resizePct;
		setFlashHeight(divid,newHeight);
		setFlashHeight(divid+'Obj',newHeight);
		
		window.setTimeout('glideFlashHeigth("'+divid+'",'+newH+');',resizeDelay);
	}
}