<div class="marquee-container" id="marquee_container" onMouseOver="stop=1;" onMouseOut="stop=0;">
<div class="marquee-subcontainer" id="marquee_subcontainer">
<div class="marquee-text" id="marquee_text">
Текст
</div>
</div>
</div>
<script type="text/javascript">
var stop = 0;
var craw_line_offset;
function enableCrawLine () {
craw_line_offset = 0;
var craw_line_width = document.getElementById('marquee_text').offsetWidth;
moveCrawLine (craw_line_width);
}
function moveCrawLine (w) {
var tdelay = 50;
w = parseInt(w);
if (stop==0) {
var lefttime;
var container_width = document.getElementById('marquee_container').offsetWidth;
var step = 1;
if (craw_line_offset<(w+container_width)) {
craw_line_offset = craw_line_offset + step;
} else {
craw_line_offset = 0;
}
document.getElementById('marquee_text').style.left = parseInt(container_width-craw_line_offset)+'px';
}
setTimeout('moveCrawLine ('+w+');', tdelay);
}
enableCrawLine();
</script>
Почему в IE текст доходит до половины и пропадает, начиная заново?
P.S.
В FireFox и Opera работает все хорошо