Thanks.
I am assuming that I need to use curly brackets, but am not sure where the closing one should be placed. Do you mean that it should be like:
if(document.Body.document.prevtab2) {
document.Body.document.prevtab2.style="border-top-width:2; border-left-width:2; border-right-width:2; vertical-align:top; border-top:solid; border-top-color:#D8CDAC; border-left:solid; border-left-color:#D8CDAC; border-right:solid; border-right-color:#D8CDAC; padding-left:3; padding-right:3; padding-top:3; padding-bottom:3;";
}
Or should the closing bracket be placed further down the script?