It's definitely those extra divisions:
<div id="tour5" class="switchcontent">
I'd give them a different class name and no id. Then I'd control their behavior separately, let's change the class name to "printdivider":
<div class="printdivider">
Now in the style, set that class to display:none -
Code:
<style type="text/css">
.printdivider {
display:none;
}
</style>
Then, wherever/whenever you want them to appear/disappear in the script or elsewhere, they can be addressed thusly:
To disappear:
Code:
printDivs=document.getElementsByTagName('div')
for (var i = 0; i < isrc.length; i++)
if (printDivs[i].className=='printdivider')
printDivs[i].style.display='none'
To appear:
Code:
printDivs=document.getElementsByTagName('div')
for (var i = 0; i < isrc.length; i++)
if (printDivs[i].className=='printdivider')
printDivs[i].style.display='block'
Notes:
Just a rough idea, it will work. Better to start out with the dividers displayed and hide them onload using javascript, so that they are there for non javascript browsers. The hide/display code can be more efficient and if done right, the printDivs variable only needs to be declared once.
Bookmarks