Or, how about replacing that long oldfashion conditional with something compact like this:
var LoginBox =
/*IE4*/ LoginBox||
/*NN4*/ document.LoginBox||
/*W3C*/ document.getElementById('LoginBox');
LoginBox=LoginBox.style||LoginBox;
function hidebox(){
LoginBox.visibility="hidden";
}
function showBox(){
LoginBox.visibility="visible"
}
hidebox();
One thing I forgot to tell you is that you should never link your script files in the document head if your aim is to manipulate dom style and similar during load time that is on before load event. Placing scripts on document head was allowed because of content prelloading scripts. Script tag is legitimate body element. So this script should also be linked somewhere before the body end tag.
p.s.: not to forget, you should also update the new function name at the lines of function call with the new one. ...showBox(), instead of LoginBox() because that name is now reserved for global var.
Cheers