function getWidth(){ var ob1 = document.getElementById('line'); var ob2 = document.getElementById('line2'); var setWidth = screen.width - 21; if(ob1){ob1.style.width = setWidth;} if(ob2){ob2.style.width = setWidth;} } window.onload = getWidth; function h(ID){ var ob = document.getElementById(ID); if(ob){ if(ob.style.display == 'none'){ ob.style.display = ''; }else{ ob.style.display = 'none'; } } }