handle iframe layout via javascript