i need to resize two seperate div elements and each opens over an iframe. I cant quite grasp why this code doesn't work.

Code:
var obj1 = document.getElementById('dateInnernav');
var obj2 = document.getElementById('hscInnerNav');

function findPos(obj) {
	var left = 0;
	var top = 0;
	
	if (obj.offsetParent) {
		left = obj.offsetLeft;
		top = obj.offsetTop;
		while (obj = obj.offsetParent) {
			left += obj.offsetLeft;
			top += obj.offsetTop;
			}
		}
		return [left, top];
	}
	
function rePosSiz (findPos) {
	var width = findPos.offsetLeft;
	var size = findPos.offsetTop;
		if (window.clientWidth < 1024) {
			width = this.clientWidth;
			size = this.clientHeight;
		}
	}
any suggestions?