window.onload = adjustHeight;
function adjustHeight() {
var divDetail = document.getElementById("divDetail");
var divVat = document.getElementById("divVat");
var gvDetail = document.getElementById("gvDetail");
var gvVAT = document.getElementById("gvVAT");
if (gvDetail.offsetHeight > 300) {
divDetail.style.height = "320px";
divDetail.style.overflow = "scroll";
gvDetail.style.width = "98%";
}
if (gvVAT) {
if (gvVAT.offsetHeight > 300) {
divVat.style.height = "320px";
divVat.style.overflow = "scroll";
}
}
}