Any way to shorten this?

row1 = 5;
totalpics = 10;
// makes containers for row 1
for (i = 1; i < row1; i++) {
	dupMovies(i);
}
// makes containers for row 2
for (j = row1; j < totalpics; j++) {
	dupMovies2(j);
}
// function for row 1 containers
function dupMovies(n) {
	oldn = n - 1;
	duplicateMovieClip(container0, "container" + n, n);
	_root['container' + n]._x = (_root['container' + oldn]._x) + boxPorps + 1;
	_root['container' + n]._y = container0._y;
	duplicateMovieClip("container" + n, "btn" + n, n + totalpics);
	_root["btn" + n]._alpha = 0;
	_root["btn" + n]._width = boxPorps;
	_root["btn" + n]._height = boxPorps;
	_root["btn" + n]._x = (_root['container' + n]._x);
	_root["btn" + n]._y = (_root['container' + n]._y);
}
// function for row 2 containers
function dupMovies2(z) {
	oldz = z - 1;
	duplicateMovieClip(container0, "container" + z, z);
	_root['container' + z]._x = (_root['container' + (oldz - row1)]._x) + boxPorps + 1;
	_root['container' + z]._y = container0._y + boxPorps + 1;
	duplicateMovieClip("container" + z, "btn" + z, z + totalpics);
	_root["btn" + z]._alpha = 0;
	_root["btn" + z]._width = boxPorps;
	_root["btn" + z]._height = boxPorps;
	_root["btn" + z]._x = (_root['container' + z]._x);
	_root["btn" + z]._y = (_root['container' + z]._y);
}

Note, the 3rd/4th line of each function is different. Any possible way to shorten this at all? Anyway to improve the code?