/*Example message arrays for the two demo scrollers*/
var pausecontent2=new Array()
pausecontent2[0]= '
千代田カントリークラブ 70万円
カレドニアン・ゴルフクラ... 130万円
宍戸ヒルズカントリークラ... 100万円
';
pausecontent2[1]= '
茨城ゴルフ倶楽部 970万円
大利根カントリークラブ 950万円
ゴールド佐野カントリーク... 90万円
';
pausecontent2[2]= '
都留カントリー倶楽部 80万円
レインボーカントリー倶楽... 80万円
東京カントリー倶楽部 80万円
';
pausecontent2[3]= '
美里ゴルフ倶楽部 80万円
江戸崎カントリー倶楽部 80万円
玉川カントリークラブ 8万円
';
pausecontent2[4]= '
キングフィールズゴルフク... 790万円
本厚木カンツリークラブ 790万円
武蔵カントリークラブ 780万円
';
pausecontent2[5]= '
箱根カントリー倶楽部 770万円
平塚富士見カントリークラ... 750万円
鎌ヶ谷カントリークラブ 75万円
';
pausecontent2[6]= '
真名カントリークラブ(名... 70万円
レイク浜松カントリークラ... 70万円
ホウライカントリー倶楽部 70万円
';
pausecontent2[7]= '
川越カントリークラブ 65万円
那覇ゴルフ倶楽部 620万円
グランディ那須白河ゴルフ... 60万円
';
pausecontent2[8]= '
豊科カントリー倶楽部 60万円
松本浅間カントリークラブ 60万円
千葉カントリークラブ 570万円
';
pausecontent2[9]= '
袖ヶ浦カンツリークラブ(... 550万円
東名カントリークラブ 55万円
太平洋クラブ(名義書換停... 530万円
';
pausecontent2[10]= '
大宮ゴルフコース 520万円
小金井カントリー倶楽部 5100万円
メイプルポイントゴルフク... 500万円
';
pausecontent2[11]= '
鴻巣カントリークラブ 50万円
ジャパンPGAゴルフクラ... 50万円
おおむらさきゴルフ倶楽部 50万円
';
pausecontent2[12]= '
白河高原カントリークラブ 50万円
芝山ゴルフ倶楽部 50万円
千葉新日本ゴルフ倶楽部 50万円
';
pausecontent2[13]= '
靜岡カントリー袋井コース 50万円
大栄カントリー倶楽部 50万円
鎌倉カントリークラブ 5万円
';
pausecontent2[14]= '
日光カンツリー倶楽部 460万円
龍ヶ崎カントリー倶楽部 460万円
葛城ゴルフ倶楽部 450万円
';
pausecontent2[15]= '
津久井湖ゴルフ倶楽部 45万円
松本カントリークラブ 45万円
レイクウッドゴルフクラブ 4200万円
';
pausecontent2[16]= '
白帆カントリークラブ 40万円
藤ヶ谷カントリークラブ 360万円
白水ゴルフ倶楽部 35万円
';
pausecontent2[17]= '
あづみ野カントリークラブ 35万円
浜野ゴルフクラブ 320万円
東京国際ゴルフ倶楽部 310万円
';
pausecontent2[18]= '
東松山カントリークラブ 300万円
ザ・カントリークラブ・ジ... 300万円
相良カントリー倶楽部 30万円
';
pausecontent2[19]= '
上総モナークカントリーク... 30万円
飯田カントリー倶楽部 30万円
東名厚木カントリー倶楽部... 30万円
';
pausecontent2[20]= '
長太郎カントリークラブ 30万円
オーク・ヒルズカントリ-... 30万円
大富士ゴルフ場 30万円
';
pausecontent2[21]= '
入間カントリー倶楽部 30万円
アコーディア・ゴルフ習志... 30万円
高根カントリー倶楽部 30万円
';
pausecontent2[22]= '
ホロンゴルフ倶楽部 30万円
飯能くすの樹カントリー倶... 30万円
狭山ゴルフ・クラブ 260万円
';
pausecontent2[23]= '
立野クラシック・ゴルフ倶... 250万円
猿島カントリー倶楽部 250万円
南総カントリークラブ 250万円
';
pausecontent2[24]= '
富士見ヶ丘カントリー倶楽... 25万円
パーシモンカントリークラ... 25万円
房総カントリークラブ 25万円
';
pausecontent2[25]= '
沼津ゴルフクラブ 25万円
シャトレーゼヴィンテージ... 25万円
烏山城カントリークラブ 25万円
';
pausecontent2[26]= '
戸塚カントリー倶楽部 2400万円
大洗ゴルフ倶楽部 240万円
PGMマリアゴルフリンク... 220万円
';
pausecontent2[27]= '
赤羽ゴルフ倶楽部 200万円
アスレチックガーデンゴル... 200万円
唐沢ゴルフ倶楽部 20万円
';
pausecontent2[28]= '
岡部チサンカントリークラ... 20万円
伊香保カントリークラブ 20万円
南総ヒルズカントリークラ... 20万円
';
pausecontent2[29]= '
靜岡カントリー浜岡コース... 20万円
千葉夷隅ゴルフクラブ 20万円
糸魚川カントリークラブ 20万円
';
pausecontent2[30]= '
草津カントリークラブ 20万円
桜ヶ丘カントリークラブ 1950万円
葉山国際カンツリー倶楽部 190万円
';
pausecontent2[31]= '
平川カントリークラブ 190万円
常陽カントリー倶楽部 180万円
日高カントリークラブ 180万円
';
pausecontent2[32]= '
金乃台カントリークラブ 170万円
グランディ浜名湖ゴルフク... 160万円
富嶽カントリークラブ 1550万円
';
pausecontent2[33]= '
厚木国際カントリー倶楽部 1500万円
取手桜が丘ゴルフクラブ(... 15万円
都賀カンツリー倶楽部 15万円
';
pausecontent2[34]= '
ノーザンカントリークラブ... 15万円
長瀞カントリークラブ 15万円
東松苑ゴルフ倶楽部 15万円
';
pausecontent2[35]= '
姉ヶ崎カントリー倶楽部 145万円
三井の森蓼科ゴルフ倶楽部 140万円
取手国際ゴルフ倶楽部 130万円
';
pausecontent2[36]= '
長野カントリークラブ 120万円
鶴舞カントリー倶楽部 120万円
相模原ゴルフクラブ 1160万円
';
pausecontent2[37]= '
湘南シーサイドカントリー... 110万円
富士小山ゴルフクラブ 110万円
木更津ゴルフクラブ 110万円
';
pausecontent2[38]= '
武蔵松山カントリークラブ 110万円
府中カントリークラブ 1000万円
佐野ゴルフクラブ 10万円
';
pausecontent2[39]= '
桜ヒルズゴルフクラブ 10万円
大宮国際カントリークラブ 10万円
ロイヤルスターゴルフクラ... 10万円
';
pausecontent2[40]= '
ツインレイクスカントリー... 10万円
かすみがうらゴルフクラブ 10万円
一の宮カントリー倶楽部 10万円
';
pausecontent2[41]= '
都ゴルフ倶楽部 10万円 飯能グリーンカントリーク... 220万円 大宮カントリークラブ(名... 10万円
';
pausecontent2[42]= '';
/***********************************************
* 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
}