/*Example message arrays for the two demo scrollers*/
var pausecontent2=new Array()
pausecontent2[0]= '
成田ヒルズカントリークラ... 90万円
江戸崎カントリー倶楽部 90万円
八王子カントリークラブ 860万円
';
pausecontent2[1]= '
我孫子ゴルフ倶楽部 850万円
玉川カントリークラブ 8万円
平塚富士見カントリークラ... 750万円
';
pausecontent2[2]= '
浜松シーサイドゴルフクラ... 75 万円
箱根カントリー倶楽部 700万円
レイク浜松カントリークラ... 70万円
';
pausecontent2[3]= '
東京五日市カントリー倶楽... 70万円
長岡カントリー倶楽部 70万円
米原ゴルフ倶楽部 70万円
';
pausecontent2[4]= '
東京カントリー倶楽部 70万円
大多喜城ゴルフ倶楽部 70万円
都ゴルフ倶楽部 7万円
';
pausecontent2[5]= '
那覇ゴルフ倶楽部 680万円
キングフィールズゴルフク... 670万円
都留カントリー倶楽部 65万円
';
pausecontent2[6]= '
鹿野山ゴルフ倶楽部 60万円
中津川カントリークラブ 60万円
芝山ゴルフ倶楽部 60万円
';
pausecontent2[7]= '
本千葉カントリークラブ 60万円
豊科カントリー倶楽部 60万円
千葉カントリークラブ 560万円
';
pausecontent2[8]= '
リバーサイドフェニックス... 55万円
太平洋クラブ 540万円
白河高原カントリークラブ 50万円
';
pausecontent2[9]= '
靜岡カントリー袋井コース 50万円
ジャパンPGAゴルフクラ... 50万円
津久井湖ゴルフ倶楽部 50万円
';
pausecontent2[10]= '
大栄カントリー倶楽部 50万円
おおむらさきゴルフ倶楽部 50万円
飯能くすの樹カントリー倶... 50万円
';
pausecontent2[11]= '
鎌倉カントリークラブ 5万円
葛城ゴルフ倶楽部 460万円
大千葉カントリー倶楽部 45万円
';
pausecontent2[12]= '
小金井カントリー倶楽部 4300万円
カントリークラブグリーン... 40万円
房総カントリークラブ 40万円
';
pausecontent2[13]= '
松本浅間カントリークラブ 40万円
白帆カントリークラブ 40万円
ザ ナショナルカントリー... 40万円
';
pausecontent2[14]= '
レイクウッドゴルフクラブ 3600万円
あづみ野カントリークラブ 35万円
白水ゴルフ倶楽部 35万円
';
pausecontent2[15]= '
狭山ゴルフ・クラブ 320万円
東京国際ゴルフ倶楽部 320万円
浜野ゴルフクラブ 320万円
';
pausecontent2[16]= '
総武カントリークラブ 320万円
東松山カントリークラブ 310万円
成田ゴルフ倶楽部 300万円
';
pausecontent2[17]= '
南総カントリークラブ 300万円
ジェイゴルフ霞ヶ浦 30万円
相良カントリー倶楽部 30万円
';
pausecontent2[18]= '
ホロンゴルフ倶楽部 30万円
飯田カントリー倶楽部 30万円
GMG八王子ゴルフ場 30万円
';
pausecontent2[19]= '
伊香保カントリークラブ 30万円
小名浜カントリー倶楽部 30万円
山田クラブ21 30万円
';
pausecontent2[20]= '
セゴビアゴルフクラブ・イ... 30万円
入間カントリー倶楽部(名... 30万円
鳩山カントリークラブ 270万円
';
pausecontent2[21]= '
富士レイクサイドカントリ... 270万円
戸塚カントリー倶楽部 2600万円
立川国際カントリー倶楽部 260万円
';
pausecontent2[22]= '
烏山城カントリークラブ 25万円
富士見ヶ丘カントリー倶楽... 25万円
猿島カントリー倶楽部 230万円
';
pausecontent2[23]= '
日高カントリークラブ 230万円
赤羽ゴルフ倶楽部 220万円
立野クラシック・ゴルフ倶... 220万円
';
pausecontent2[24]= '
平川カントリークラブ 200万円
飯能グリーンカントリーク... 200万円
河口湖カントリークラブ 200万円
';
pausecontent2[25]= '
唐沢ゴルフ倶楽部 20万円
糸魚川カントリークラブ 20万円
千葉夷隅ゴルフクラブ 20万円
';
pausecontent2[26]= '
東千葉カントリークラブ 20万円
さいたまゴルフクラブ 20万円
草津カントリークラブ 20万円
';
pausecontent2[27]= '
あさひヶ丘カントリークラ... 20 万円
長太郎カントリークラブ 20万円
岡部チサンカントリークラ... 20万円
';
pausecontent2[28]= '
靜岡カントリー浜岡コース... 20万円
オーク・ヒルズカントリ-... 20万円
サザンヤードカントリーク... 20万円
';
pausecontent2[29]= '
常陽カントリー倶楽部 190万円
桜ヶ丘カントリークラブ 1800万円
グランディ浜名湖ゴルフク... 180万円
';
pausecontent2[30]= '
富嶽カントリークラブ 1550万円
取手国際ゴルフ倶楽部 150万円
越生ゴルフクラブ 15万円
';
pausecontent2[31]= '
東松苑ゴルフ倶楽部 15万円
アバイディングクラブゴル... 15万円
塩原カントリークラブ 15万円
';
pausecontent2[32]= '
中央都留カントリー倶楽部 15万円
成田の森カントリークラブ 15万円
ノーザンカントリークラブ... 15万円
';
pausecontent2[33]= '
アジア取手カントリー倶楽... 15万円
都賀カンツリー倶楽部 15万円
東名厚木カントリー倶楽部... 15万円
';
pausecontent2[34]= '
長瀞カントリークラブ 15万円
大厚木カントリークラブ 15万円
かすみがうらゴルフクラブ 15万円
';
pausecontent2[35]= '
三井の森蓼科ゴルフ倶楽部 140万円
鶴舞カントリー倶楽部 135万円
湘南シーサイドカントリー... 125万円
';
pausecontent2[36]= '
金乃台カントリークラブ 120万円
美里ゴルフ倶楽部 120万円
武蔵松山カントリークラブ 110万円
';
pausecontent2[37]= '
カレドニアン・ゴルフクラ... 110万円
浜松カントリークラブ 110万円
船橋カントリークラブ 110万円
';
pausecontent2[38]= '
多摩カントリークラブ 1050万円
茨城ゴルフ倶楽部 1040万円
大利根カントリークラブ 1000万円
';
pausecontent2[39]= '
レインボーカントリー倶楽... 100万円
木更津ゴルフクラブ 100万円
太田双葉カントリークラブ 10万円
';
pausecontent2[40]= '
秦野カントリークラブ 10万円
扶桑カントリー倶楽部 10万円
鹿島の杜カントリー倶楽部 10万円
';
pausecontent2[41]= '
大宮国際カントリークラブ 10万円
一の宮カントリー倶楽部 10万円
ツインレイクスカントリー... 10万円
';
pausecontent2[42]= '
ロイヤルスターゴルフクラ... 10万円
佐野ゴルフクラブ 10万円
';
/***********************************************
* Pausing up-down scroller- c Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/
function pausescroller(content, divId, divClass, delay){
this.content=content //message array content
this.tickerid=divId //ID of ticker div to display information
this.delay=delay //Delay between msg change, in miliseconds.
this.mouseoverBol=0 //Boolean to indicate whether mouse is currently over scroller (and pause it if it is)
this.hiddendivpointer=1 //index of message array for hidden div
document.write(''+content[0]+'
'+content[1]+'
')
var scrollerinstance=this
if (window.addEventListener) //run onload in DOM2 browsers
window.addEventListener("load", function(){scrollerinstance.initialize()}, false)
else if (window.attachEvent) //run onload in IE5.5+
window.attachEvent("onload", function(){scrollerinstance.initialize()})
else if (document.getElementById) //if legacy DOM browsers, just start scroller after 0.5 sec
setTimeout(function(){scrollerinstance.initialize()}, 500)
}
// -------------------------------------------------------------------
// initialize()- Initialize scroller method.
// -Get div objects, set initial positions, start up down animation
// -------------------------------------------------------------------
pausescroller.prototype.initialize=function(){
this.tickerdiv=document.getElementById(this.tickerid)
this.visiblediv=document.getElementById(this.tickerid+"1")
this.hiddendiv=document.getElementById(this.tickerid+"2")
this.visibledivtop=parseInt(pausescroller.getCSSpadding(this.tickerdiv))
//alert(this.visibledivtop);
//set width of inner DIVs to outer DIV's width minus padding (padding assumed to be top padding x 2)
this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivtop*2)+"px"
this.getinline(this.visiblediv, this.hiddendiv)
this.hiddendiv.style.visibility="visible"
var scrollerinstance=this
document.getElementById(this.tickerid).onmouseover=function(){scrollerinstance.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){scrollerinstance.mouseoverBol=0}
if (window.attachEvent) //Clean up loose references in IE
window.attachEvent("onunload", function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null})
setTimeout(function(){scrollerinstance.animateup()}, this.delay)
}
// -------------------------------------------------------------------
// animateup()- Move the two inner divs of the scroller up and in sync
// -------------------------------------------------------------------
pausescroller.prototype.animateup=function(){
/*
var scrollerinstance=this
if (parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5)){
this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-5+"px"
this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-5+"px"
setTimeout(function(){scrollerinstance.animateup()}, 70)
}
else{
this.getinline(this.hiddendiv, this.visiblediv)
this.swapdivs()
setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
}
*/
var scrollerinstance=this
if (parseInt(this.hiddendiv.style.top)<(this.visibledivtop-5)){
this.visiblediv.style.top=parseInt(this.visiblediv.style.top)+5+"px"
this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)+5+"px"
setTimeout(function(){scrollerinstance.animateup()}, 70)
}
else{
this.getinline(this.hiddendiv, this.visiblediv)
this.swapdivs()
setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
}
}
// -------------------------------------------------------------------
// swapdivs()- Swap between which is the visible and which is the hidden div
// -------------------------------------------------------------------
pausescroller.prototype.swapdivs=function(){
var tempcontainer=this.visiblediv
this.visiblediv=this.hiddendiv
this.hiddendiv=tempcontainer
}
pausescroller.prototype.getinline=function(div1, div2){
div1.style.top=this.visibledivtop+"px"
///div2.style.top=Math.max(div1.parentNode.offsetHeight, div1.offsetHeight)+"px"
div2.style.top=this.visibledivtop-Math.max(div1.parentNode.offsetHeight, div1.offsetHeight)+"px"
}
// -------------------------------------------------------------------
// setmessage()- Populate the hidden div with the next message before it's visible
// -------------------------------------------------------------------
pausescroller.prototype.setmessage=function(){
var scrollerinstance=this
if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
setTimeout(function(){scrollerinstance.setmessage()}, 100)
else{
var i=this.hiddendivpointer
var ceiling=this.content.length
this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1
this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
this.animateup()
}
}
pausescroller.getCSSpadding=function(tickerobj){ //get CSS padding value, if any
if (tickerobj.currentStyle)
return tickerobj.currentStyle["paddingTop"]
else if (window.getComputedStyle) //if DOM2
return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top")
else
return 0
}