// JavaScript Document

//以下が表示される文章になります。nobrタグ、最後のspanで囲まれたダミーは削除しないで下さい。
//var defaulttopnewscontent='<nobr><span style="margin-right:200px">★ピックアップ特集バイト★　今回ピックアップするバイトは【<a href="sample.html">データ入力バイト</a>】パソコン好きな方は注目!!簡単・高収入・シフト制♪アルバイト探している方、必見ですよ～</span><span style="margin-right:200px">★お試しバイト★　自分にあったバイトをみつけよう！働いてみてわかる『店の雰囲気』『仲間』『楽しさ・たいへんさ』試して体験できるバイト！初めてのバイトでも安心☆</span><span style="margin-right:200px">空いた時間を有効活用☆短期バイトを探すなら～<a href="http://www.tanki-arbeit.jp/">短期アルバイト.jp</a></span><span style="margin-right:200px">おしゃれなカフェで楽しい仲間とワイワイ働きたい方は要チェック^m^⇒<a href="http://www.cafebaito.jp/">カフェバイト</a></span><span style="margin-right:200px;color:#FFFFFF">このテキストは表示用のダミーになります。このテキストがないと最後までキチンと表示されません。削除はしないで下さい。</span></nobr>'

//以下編集禁止
var topnewswidth="720px"
var topnewsheight="15px"
var topnewsspeed=2
var topnewsbgcolor="#FFFFFF"
var pauseit=1

topnewsspeed=(document.all)? topnewsspeed : Math.max(1, topnewsspeed-1)
var copyspeed=topnewsspeed
var pausespeed=(pauseit==0)? copyspeed: 0
var iedom=document.all||document.getElementById
if (iedom)
document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-30000px">'+topnewscontent+'</span>')
var actualwidth=''
var cross_topnews, ns_topnews

function populate(){
if (iedom){
cross_topnews=document.getElementById? document.getElementById("ietopnews") : document.all.ietopnews
cross_topnews.style.left=parseInt(topnewswidth)+8+"px"
cross_topnews.innerHTML=topnewscontent
actualwidth=document.all? temp.offsetWidth : document.getElementById("temp").offsetWidth
}
else if (document.layers){
ns_topnews=document.ns_topnews.document.ns_topnews2
ns_topnews.left=parseInt(topnewswidth)+8
ns_topnews.document.write(topnewscontent)
ns_topnews.document.close()
actualwidth=ns_topnews.document.width
}
lefttime=setInterval("scrolltopnews()",20)
}
window.onload=populate

function scrolltopnews(){
if (iedom){
if (parseInt(cross_topnews.style.left)>(actualwidth*(-1)+8))
cross_topnews.style.left=parseInt(cross_topnews.style.left)-copyspeed+"px"
else
cross_topnews.style.left=parseInt(topnewswidth)+8+"px"

}
else if (document.layers){
if (ns_topnews.left>(actualwidth*(-1)+8))
ns_topnews.left-=copyspeed
else
ns_topnews.left=parseInt(topnewswidth)+8
}
}

if (iedom||document.layers){
with (document){
document.write('<div class="topnewsbox">')
if (iedom){
write('<div style="position:relative;width:'+topnewswidth+';height:'+topnewsheight+';overflow:hidden">')
write('<div style="position:absolute;width:'+topnewswidth+';height:'+topnewsheight+';background-color:'+topnewsbgcolor+'" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=topnewsspeed">')
write('<div id="ietopnews" style="position:absolute;left:0px;top:0px"></div>')
write('</div></div>')
}
else if (document.layers){
write('<ilayer width='+topnewswidth+' height='+topnewsheight+' name="ns_topnews" bgColor='+topnewsbgcolor+'>')
write('<layer name="ns_topnews2" left=0 top=0 onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=topnewsspeed"></layer>')
write('</ilayer>')
}
document.write('</div>')
}
}

