I have these two javascript functions that change a background and show and hide fields, however it only works once for each button
function showabout(){
hidecontact = document.getElementById("contactus");
hidecontact.style.display = "none";
hide.style.backgroundImage = "url(aboutus.jpg)";
showabout = document.getElementById("aboutus");
showabout.style.display = "inline";
showabout.style.cssFloat = "left";
secbuttons.style.paddingLeft = "670px";
}
function showcontact(){
hideabout = document.getElementById("aboutus");
hideabout.style.display = "none";
hide.style.backgroundImage = "url(contact.jpg)";
showcontact = document.getElementById("contactus");
showcontact.style.display = "inline";
showcontact.style.cssFloat = "left";
secbuttons.style.paddingLeft = "670px";
}
<font color="#33FF66"><h2 style="cursor:pointer" onmouseover = "showabout()"> </h2></font>
<font color="#33FF66"><h2 style="cursor:pointer" onclick="showcontact()"> </h2></font><br />
<font color="#33FF66"><h2 style="cursor:pointer" onmouseover = "showcontact()"> </h2></font>
The three H2s are the lines causing the errors. It says "uncaught type error, object is not a function".