Yes that was the problem. I assumed JS was smart enough to not kill itself over a element not existing, guess not.
Working code:
Code:
function switchheader(id){
if ( hcur != id ){
document.getElementById(hcur).style.display = 'none';
document.getElementById(id).style.display = '';
if (hcur == 'logo'){
document.getElementById('logo2').style.display = 'none';}
else document.getElementById(hcur + 'b').src = '/styles/7M-v1/new/hb_' + hcur + '.png';
if (id == 'logo'){
document.getElementById('logo2').style.display = '';}
else document.getElementById(id + 'b').src = '/styles/7M-v1/new/hbalt_' + id + '.png';
hcur = id;
}
}
In action -
http://www.pollama2.pollama.com
Thank you! Now onto the world of cookies.