function centerdiv(object,width,height) {
var object = 'dyndiv';
object = document.getElementById(object);
var obtop = 0; 
	var obleft = 0; 
	var obright = 0; 
	var obbottom = 0; 
	var totheight = document.body.clientHeight;
	var totwidth = document.body.clientWidth;
	var obheight = object.offsetHeight;
	var obwidth = object.offsetWidth;
	while( object != null ) {
		obtop += object.offsetTop;
		obleft += object.offsetLeft;
 		object = object.offsetParent;
	}
	var alwidth = ((totwidth - obwidth) /2);
	var alheight = ((totheight - obheight) /2);
	document.getElementById('dyndiv').style.left = alwidth;
	document.getElementById('dyndiv').style.top = alheight;
}