

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

var pausecontent=new Array();

// startnews
pausecontent[0] = "<h1>New Releases coming soon!</h1><p style=\"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 13px/normal Arial\">NEW releases from two; high profile, well known Nano acts will surely&nbsp;</p> <p style=\"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 13px/normal Arial\">reconnect the hip bone to the thigh bone...</p><p style=\"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 13px/normal Arial\">Strike Twice - First Strike Ep</p><p style=\"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 13px/normal Arial\">Fearsome Engine - Biting Point&nbsp;</p><p style=\"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 13px/normal Arial\">Out Soon!!</p><p>&nbsp;</p><p>&nbsp;</p>";
pausecontent[1] = "<h1>The Commercial Hippies - \"From Beyond\"</h1>The formidable duo have put their heart and soul into the making of their new, much anticipated album, and it shows. This dance-floor thumping, toe tapping, head-banging intergalactic experience can be purchased from Beatport and other online stores. Make sure you also stop by the Home of TCH www.thecommercialhippies.com&nbsp;";
pausecontent[2] = "<h1>European Festival Season Rocked!</h1><p style=\"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 13px/normal Arial\">Recently back from what was one spell binding summer in Europe, the Nano artists can not be more satisfied and pleased with their sets at Ozora, Glade, Sonica, Freedom Festival, Aurora, Fusion and many more.<br /></p>";
pausecontent[3] = "<h1>Hopi and Everblast EP\'s available!</h1>Hopi&amp;Friends - The Animal EP<div>Everblast - The Who Factor EP</div><div>These two seriously psy EP\'s are available from Beatport now!!&nbsp;Hopi is joined by 3 masters of their fields; Darshan, Dickster and Earthling.&nbsp;If you aren\'t already \"in the know\" Everblast is the cohesion of Chromatone and Earthling. who will blow you away with there musical trance force.</div><div>Visit www.nanorecords.com to hear these EP\'S and then Beatport to claim your very own copy.</div>";
pausecontent[4] = "<h1>2nd Digital Ep Out Now!!!</h1>The second Digital Ep, \"Brazinglish\", &nbsp;from Nano Records has just been released. This time it is Dickster &amp; Burn in Noise who will amaze you with their top-class tracks.&nbsp;<div><br /></div><div>Visit Beatport now!</div>";
pausecontent[5] = "<h1>Nano goes Digital!!</h1>Our first exclusive DIGITAL Ep has hit the web! Check out Chromatones - \"Wasabits Ep\" (nanodigi001).<div>Available now on Beatport , and soon on iTunes other online music stores!!!</div>";
pausecontent[6] = "<h1>Origin Fest 2009  Video</h1>our good friends at SpinEarth.TV have done a great video report on Origin 2009, check it out at <a title=\"Origin Video\" target=\"_blank\" href=\"http://www.spinearth.tv/report/origin-festival-leads-psych-beats-to-rainbows-end\">www.spinearth.tv</a>.&nbsp;&nbsp; (Once on the site, you may need to \'Refresh\' the page to see the viewer)<br />";
pausecontent[7] = "<h1>New albums hitting soon!!!</h1>Watch out for these new albums in 2009, from some of Nano\'s finest!<div><br /></div><div>Fearsome Engine (Tristan &amp; Laughing Buddha) - \"Biting Point\"</div><div>Strike Twice (Atomic Pulse &amp; Echotek) - \"Time Capsule\"</div><div>Protoculture - \"Love Technology\"</div><div>Plus The Commercial Hippies too!!!!</div>";
pausecontent[8] = "<h1>.. 3 NEW tracks up!! ..</h1><strong><em>3 NEW TRACKS up and available on our website from Everblast(Chromatone and Earthling), Strike Twice(Echotek and Atomic Pulse) and The Commercial Hippies. Check out our free downloads section now.&nbsp; <br /></em></strong>";
pausecontent[9] = "<h1>NEW SIGNINGS</h1>NANO has just signed STRIKE TWICE (Israel), Chromatone (USA), Hopi (UK) and there are more new signings in the pipeline too!!&nbsp; more about these and other new acts soon!<br />In the meantime check out our Artists Page to learn more.<br />";
pausecontent[10] = "<h1>New Artist : AVALON</h1>It is with great pleasure we announce the first in a line on new signings, none other then Avalon, a super talent young man from Brighton UK, who\'s solo efforts will excite NANO fans everywhere. Expect quality dancefloor loveliness soon.<br />";
pausecontent[11] = "<h1>Fearsome Engine album on the way!!</h1>Fearsome Engine is none other then the mighty Tristan and Laughing Buddha teaming up for a banging new project that has already appeared live at BOOM (portugal), GLADE (UK) and Cachoiera Alta (Brasil). The boys have hit new levels with this project so expect them to be ripping dancefloors apart pretty much everywhere from now on, consider yourself warned.<br />";
pausecontent[12] = "<h1>New Artist Albums in the pipeline..</h1>Coming as soon as possible : new artist albums from Fearsome Engine, Allaby, Laughing Buddha, The Commercial Hippies, Avalon, Chromatone, Hopi, Strike Twice, Protoculture and sooo much more you\'ll be struggling to keep up with it all.<br /><br /><br /><br />";
pausecontent[13] = "<h1>ARTELLIGENT  UNLEASHED</h1>The latest album to break out from Nano\'s studios is one that will truly rock your socks.<div>Headroom\'s first solo album is out now, be sure to hear this one blasting the world over this summer.<br /></div><div><br /></div><div><br /></div><div><div> </div></div>";
pausecontent[14] = "<h1>spacing out at MySpace </h1>join our myspace network at <a title=\"www.myspace.com/nanorecords\" target=\"_self\" href=\"http://www.myspace.com/nanorecords\">www.myspace.com/nanorecords</a> . You can find links to all of the Nano artists pages from there too.<br />";
// endnews

/***********************************************
* Pausing up-down scroller- © 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('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[1]+'</div></div>')
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))
//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()}, 50)
}
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"
}

// -------------------------------------------------------------------
// 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
}

