/**
* function to center element relative to container element
* element will be set to position: absolute
* containering will be set to position: relative
*/
function centerElement(args) {
	if(args.type) {
		this.node = args.currentTarget;
	} else {
		this.node = args;
	}
	this.image_margin_box = dojo.marginBox(this.node);
	this.parent_margin_box = dojo.marginBox(this.node.parentNode);
	dojo.style(this.node, 'position', 'absolute');
	dojo.style(this.node.parentNode, 'position', 'relative');
	dojo.marginBox(this.node, { t: (this.parent_margin_box.h-this.image_margin_box.h)/2, l: (this.parent_margin_box.w-this.image_margin_box.w)/2 });
}