/*Example message arrays for the two demo scrollers*/

<!-- Top randomizer -->
var toprandomizer = new Array( )

toprandomizer[0] = "<div class='topstoryimg'>"+
"<a href='http://backstage.ilounge.com/index.php/backstage/'>"+
"<img src='http://www.ilounge.com/assets/images/reviews_apple/timecapsule/icon.jpg' border='0' alt='Time Capsule' name='image' width='200' height='80'></a></div><div class='topstory'>"+
"<a href='http://backstage.ilounge.com/index.php/backstage/'>"+
"<h1 class='heading' id='articles'>Backstage: Apple's Time Capsule + NYC Stores</h1></a>"+
"<div class='cats'><a href='http://www.ilounge.com/index.php/backstage/'>Backstage</a> |  <a href=\"javascript:backward('t_rand',1);\">"+
"Show Previous Story</a> | <a href=\"javascript:forward('t_rand',1);\">"+
"Show Next Story</a> | <a href='javascript:pauserandomizers();'>Pause Stories</a></div>"+
"Wondering how Apple's new Time Capsule measures up to Apple TV, AirPort Extreme, AirPort Express, a Mac mini, or a G-Tech drive? We have answers. Also: Apple's huge in New York City - photos, inside.</div></div>"

toprandomizer[1] = "<div class='topstoryimg'>"+
"<a href='http://www.ilounge.com/index.php/ipod/review/fullbodyfilms-protection-pack-for-iphone/'>"+
"<img src='http://www.ilounge.com/assets/images/reviews_fullbodyfilms/protectionpackiphone/icon2.jpg' border='0' alt='Protection Pack' name='image' width='200' height='80'></a></div><div class='topstory'>"+
"<a href='http://www.ilounge.com/index.php/ipod/review/fullbodyfilms-protection-pack-for-iphone/'>"+
"<h1 class='heading' id='articles'>Reviews: iPhone's Best Protector + New Speakers </h1></a>"+
"<div class='cats'><a href='http://www.ilounge.com/index.php/accessories/'>Accessories</a> |  <a href=\"javascript:backward('t_rand',1);\">"+
"Show Previous Story</a> | <a href=\"javascript:forward('t_rand',1);\">"+
"Show Next Story</a> | <a href='javascript:pauserandomizers();'>Pause Stories</a></div>"+
"FullBodyFilms has nailed iPhone protection with its new A- rated <a href='http://www.ilounge.com/index.php/ipod/review/fullbodyfilms-protection-pack-for-iphone/'>Protection Pack</a>. Also: reviews of iPhone-shielded speakers from Altec (<a href='http://www.ilounge.com/index.php/ipod/review/altec-lansing-t612-digital-speaker-system-for-iphone-and-ipod/'>T612</a>), Logic3 (<a href='http://www.ilounge.com/index.php/ipod/review/logic3-i-station-traveller-for-iphone-and-ipod-touch/'>i-Station Traveller</a>) and DLO (<a href='http://www.ilounge.com/index.php/ipod/review/dlo-portable-speakers-for-iphone/'>Portable Speakers for iPhone</a>).</div></div>"

toprandomizer[2] = "<div class='topstoryimg'>"+
"<a href='http://www.ilounge.com/index.php/ipod/review/apple-inc-apple-tv-take-2-40gb-160gb/'>"+
"<img src='http://www.ilounge.com/assets/images/reviews_apple/appletv20/icon2.jpg' border='0' alt='Apple TV Take 2' name='image' width='200' height='80'></a></div><div class='topstory'>"+
"<a href='http://www.ilounge.com/index.php/ipod/review/apple-inc-apple-tv-take-2-40gb-160gb/'>"+
"<h1 class='heading' id='articles'>Apple TV 2.0 Review, Comparisons & Rentals</h1></a>"+
"<div class='cats'><a href='http://ilounge.com/index.php/articles/'>Features</a> |  <a href=\"javascript:backward('t_rand',1);\">"+
"Show Previous Story</a> | <a href=\"javascript:forward('t_rand',1);\">"+
"Show Next Story</a> | <a href='javascript:pauserandomizers();'>Pause Stories</a></div>"+
"Need to learn about Apple TV Take Two? We have you covered with our <a href='http://www.ilounge.com/index.php/ipod/review/apple-inc-apple-tv-take-2-40gb-160gb/'>comprehensive review</a>, detailed <a href='http://www.ilounge.com/index.php/articles/comments/apple-tv-20-vs-blu-ray-dvd-hd-cable-the-comparison/'>HD + SD photo comparisons</a> with Blu-Ray, DVD, and HD cable, and our Movie Rentals guide (<a href='http://www.ilounge.com/index.php/articles/comments/the-complete-guide-to-itunes-movie-rentals-part-1/'>part 1</a>, <a href='http://www.ilounge.com/index.php/articles/comments/the-complete-guide-to-itunes-movie-rentals-part-2/'>part 2</a>).</div></div>"

<!-- Bottom randomizer -->
var bottomrandomizer = new Array()
bottomrandomizer[0] = "<div class='topstoryimg'>"+
"<a href='http://www.ilounge.com/index.php/firstlooks/'>"+
"<img src='http://www.ilounge.com/assets/images/reviews_casio/exs10/icon.jpg' border='0' alt='EX-S10' name='image' width='200' height='80'></a></div><div class='topstory'>"+
"<a href='http://www.ilounge.com/index.php/firstlooks/'>"+
"<h1 class='heading' id='articles'>First Looks: Casio's iPhone-, iPod-friendly EX-S10</h1></a>"+
"<div class='cats'><a href='http://www.ilounge.com/index.php/firstlooks/'>First Looks</a> |  <a href=\"javascript:backward('b_rand',1);\">"+
"Show Previous Story</a> | <a href=\"javascript:forward('b_rand',1);\">"+
"Show Next Story</a> | <a href='javascript:pauserandomizers();'>Pause Stories</a></div>"+
"Want to record home movies that you can instantly import into iTunes for iPod or iPhone playback? Casio's $250 EX-S10 has arrived, offering an impressively slim form factor and 640x480 H.264 video recording.</div></div>"

bottomrandomizer[1] = "<div class='topstoryimg'>"+
"<a href='http://www.ilounge.com/index.php/reviews/sort_grades/C239/239'>"+
"<img src='http://www.ilounge.com/assets/images/reviews_games/peggle/icon.jpg' border='0' alt='iPod Games' name='image' width='200' height='80'></a></div><div class='topstory'>"+
"<a href='http://www.ilounge.com/index.php/reviews/sort_grades/C239/239'>"+
"<h1 class='heading' id='articles'>Every Current + Past iPod Game, Reviewed</h1></a>"+
"<div class='cats'><a href='http://ilounge.com/index.php/accessories/'>Reviews</a> |  <a href=\"javascript:backward('b_rand',1);\">"+
"Show Previous Story</a> | <a href=\"javascript:forward('b_rand',1);\">"+
"Show Next Story</a> | <a href='javascript:pauserandomizers();'>Pause Stories</a></div>"+
"Twenty-nine different iPod Games are now available through iTunes, and we've <a href='http://www.ilounge.com/index.php/reviews/sort_grades/C239/239'>reviewed them all</a>. The best? PopCap's <a href='http://www.ilounge.com/index.php/ipod/review/popcap-games-peggle'>Peggle</a> (shown), EA's <a href='http://www.ilounge.com/index.php/ipod/review/electronic-arts-mahjong'>Mahjong</a>, and Gameloft's <a href='http://www.ilounge.com/index.php/ipod/review/gameloft-sa-brain-challenge'>Brain Challenge</a>. The newest: <a href='http://www.ilounge.com/index.php/ipod/review/gameloft-sa-bubble-bash'>Bubble Bash</a>.</div></div>"

bottomrandomizer[2] = "<div class='topstoryimg'>"+
"<a href='http://www.ilounge.com/index.php/articles/comments/ask-ilounge-2-29-08'>"+
"<img src='http://www.ilounge.com/assets/images/promo_askilounge.gif' border='0' alt='Ask iLounge' name='image' width='200' height='80'></a></div><div class='topstory'>"+
"<a href='http://www.ilounge.com/index.php/articles/comments/ask-ilounge-2-29-08'>"+
"<h1 class='heading' id='articles'>Ask iLounge: February 28th - March 6th, 2008</h1></a>"+
"<div class='cats'><a href='http://www.ilounge.com/index.php/articles/'>Articles</a> |  <a href=\"javascript:backward('b_rand',1);\">"+
"Show Previous Story</a> | <a href=\"javascript:forward('b_rand',1);\">"+
"Show Next Story</a> | <a href='javascript:pauserandomizers();'>Pause Stories</a></div>"+
"Your questions answered: Finding iPhone Backups, Contact Display on iPhone, Automatic vs manual iPod sync, iTunes CD burning restrictions, iTunes rental expiry on iPods, Download podcasts to iPhone and <a href='http://www.ilounge.com/index.php/articles/ask_index/'>more</a>.</div></div>"

/***********************************************
* DHTML Ticker script- © 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 domticker(content, divId, divClass, delay, fadeornot){
this.content=content
this.tickerid=divId //ID of master ticker div. Message is contained inside first child of ticker div
this.delay=delay //Delay between msg change, in miliseconds.
this.mouseoverBol=0 //Boolean to indicate whether mouse is currently over ticker (and pause it if it is)
this.pointer=1
this.opacitystring=(typeof fadeornot!="undefined")? "width: 100%; filter:progid:DXImageTransform.Microsoft.alpha(opacity=100); -moz-opacity: 1" : ""
if (this.opacitystring!="") this.delay+=500 //add 1/2 sec to account for fade effect, if enabled
this.opacitysetting=0.2 //Opacity value when reset. Internal use.
document.write('<div id="'+divId+'" class="'+divClass+'"><div style="'+this.opacitystring+'">'+content[0]+'</div></div>')
var instanceOfTicker=this
setTimeout(function(){instanceOfTicker.initialize()}, delay)
}

domticker.prototype.initialize=function(){
var instanceOfTicker=this
this.contentdiv=document.getElementById(this.tickerid).firstChild //div of inner content that holds the messages
document.getElementById(this.tickerid).onmouseover=function(){instanceOfTicker.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){instanceOfTicker.mouseoverBol=0}
this.rotatemsg()
}

domticker.prototype.rotatemsg=function(){
var instanceOfTicker=this
if (this.mouseoverBol==1) //if mouse is currently over ticker, do nothing (pause it)
setTimeout(function(){instanceOfTicker.rotatemsg()}, 100)
else{
this.fadetransition("reset") //FADE EFFECT- RESET OPACITY
this.contentdiv.innerHTML=this.content[this.pointer]
this.fadetimer1=setInterval(function(){instanceOfTicker.fadetransition('up', 'fadetimer1')}, 100) //FADE EFFECT- PLAY IT
this.pointer=(this.pointer<this.content.length-1)? this.pointer+1 : 0
setTimeout(function(){instanceOfTicker.rotatemsg()}, this.delay) //update container
}
}

// -------------------------------------------------------------------
// fadetransition()- cross browser fade method for IE5.5+ and Mozilla/Firefox
// -------------------------------------------------------------------

domticker.prototype.fadetransition=function(fadetype, timerid){
var contentdiv=this.contentdiv
if (fadetype=="reset")
this.opacitysetting=0.2
if (contentdiv.filters && contentdiv.filters[0]){
if (typeof contentdiv.filters[0].opacity=="number") //IE6+
contentdiv.filters[0].opacity=this.opacitysetting*100
else //IE 5.5
contentdiv.style.filter="alpha(opacity="+this.opacitysetting*100+")"
}
else if (typeof contentdiv.style.MozOpacity!="undefined" && this.opacitystring!=""){contentdiv.style.MozOpacity=this.opacitysetting}
else
this.opacitysetting=1
if (fadetype=="up")
this.opacitysetting+=0.2
if (fadetype=="up" && this.opacitysetting>=1)
clearInterval(this[timerid])
}