See if modifying the script helps:
Code:
<script type="text/javascript" language="javascript">
var expandCollapseIncrement = 30;
var expandCollapseEveryMs = 5;
var isExpanding = false;
var isCollapsing = false;
function expandFrame() {
isCollapsing = false;
isExpanding = true;
setTimeout(doExpand, 250);
}
function doExpand() {
try {
if (!isExpanding) {
return;
}
var fl = document.getElementById("adframe");
var w = parseInt(fl.style.width);
w += expandCollapseIncrement;
if (w <= 500) {
fl.style.width = w + "px";
setTimeout(doExpand, expandCollapseEveryMs);
} else {
isExpanding = false;
}
} catch(e) {
alert("Error expanding: " + e.description);
}
}
function collapseFrame() {
isExpanding = false;
isCollapsing = true;
doCollapse();
}
function doCollapse() {
try {
if (!isCollapsing) {
return;
}
var fl = document.getElementById("adframe");
var w = parseInt(fl.style.width);
w -= expandCollapseIncrement;
if (w >= 300) {
fl.style.width = w + "px";
setTimeout(doCollapse, expandCollapseEveryMs);
} else {
isCollapsing = false;
}
} catch(e) {
alert("Error expanding: " + e.description);
}
}
document.write("<table cellspacing=\"0\" cellpadding=\"0\"><tr><td><iframe id=\"adframe\" frameborder=\"0\" scrolling=\"no\" style=\"position: absolute; z-index: 9999; width: 500px; height:250px; background-color: #FFF; border: #000 1px solid;\" src=\"banner.html\" onMouseOver=\"collapseFrame();\" onMouseOut=\"expandFrame();\"></iframe><div style=\"width: 500px; height:250px; margin-left:200px; \"></div>");
document.write("</td></tr></table>");
</script>
Bookmarks