
// Distributed by http://www.hypergurl.com

// Scrollers width here (in pixels)
var scrollerwidth="400px"
var initposx = "0px";
var initposy = "0px";
// Scrollers height here
var scrollerheight="400px"
var sinusit = 0;
// Scrollers speed here (larger is faster 1-10)
var scrollerspeed=10

var frame = 0, frame2 = 0;
var amplitude1 = 2, amplitude2 = 0.025;
var offset = 0.02;
var offset2 = 0.3;
var twopi = Math.PI * 2;
var angle;
var angle2;
// Scrollers content goes here! Keep all of the message on the same line!


var scrollercontent='<div align="justify"><left><font size="2" face="Arial, Helvetica, sans-serif"><strong>Previous   season ticket holders </strong> </font><font face="Arial, Helvetica, sans-serif">   <p><font size="2">Subscriptions may be renewed at the Fundaci&oacute; P&uacute;blica     de les Balears per a la M&uacute;sica from the <strong>21st - 30th of July     and from the 8th - 23rd of September</strong> during the hours shown below.</font></p>  <p><font size="2">Season ticket holders who paid by direct debit during the     previous season may renew by telephone (971 287565). The season ticket itself     may be collected from the Fundaci&oacute; during the hours shown below.</font></p>  <p><font size="2">There is a <strong>50% reduction</strong> on the price of     tickets for those who ntroduce a new subscriber upon renewal.</font></p>  <p><font size="2"><strong>New subscribers</strong></font></p>  <p><font size="2">Season tickets may be purchased from the <strong>21st - 30th     of July and from the 8th - 21rd of September</strong> at the Fundaci&oacute;     (address shown below) during the following hours:</font></p>  <p><font size="2"><strong>MONDAY &#8211; FRIDAY 10 a.m. &#8211; 2 p.m.</strong></font></p>  <p><font size="2">Fundaci&oacute; P&uacute;blica de les Balears per a la M&uacute;sica<br>    C/ Vicen&ccedil; Juan Rossell&oacute; 22B<br>    <strong>Tel. 971 287565</strong></font></p>  <p><font size="2">Method of payment </font></p>  <p><font size="2">Cash / Credit card / Cheque (payable to Fundaci&oacute; P&uacute;blica     de les Balears per a la M&uacute;sica) / Direct debit (1st instalment, 30th     November 2008: 2nd, 28th February 2009). </font></p>  <p><font size="2">Season ticket prices</font></p>  <p><font size="2">Full subscription (15 concerts) <br>    (25% reduction on price of individual tickets)<br>    (50% reduction when introducing a new subscriber)</font></p>  <p><font size="2">Ground floor: 312 euros <br>    Amphitheatre: 216 euros</font></p>  <p><font size="2">Ticket prices</font></p>  <p><font size="2">Ground floor: 26 euros <br>    Amphitheatre: 18 euros<br>    Young Persons Cardholders / Students: 6 &euro;<br>    <br>    </font></p>  </font></left><font size="2" face="Arial, Helvetica, sans-serif"></font></div><left></left> ';


var pauseit=0

var startit = 0;

// Change nothing below!

scrollerspeed=(document.all)? scrollerspeed : Math.max(1, scrollerspeed-1) //slow speed down by 1 for NS
var copyspeed=scrollerspeed
var iedom=document.all||document.getElementById
var actualheight=''
var cross_scroller, ns_scroller
var pausespeed=(pauseit==1)? copyspeed: 0
var direction = -1;

function uppressed(){
	startit = 1;
	direction = -1;
}

function upout(){
	startit = 0;
}

function downpressed(){
	startit = 1;
	direction = 1;
}

function downout(){
	startit = 0;
}

function populate(){
if (iedom){
cross_scroller=document.getElementById? document.getElementById("iescroller") : document.all.iescroller
cross_scroller.style.top= initposy;
cross_scroller.style.left= initposx;
cross_scroller.innerHTML=scrollercontent
actualheight=cross_scroller.offsetHeight
}
else if (document.layers){
ns_scroller=document.ns_scroller.document.ns_scroller2
ns_scroller.top=parseInt(scrollerheight)+8
ns_scroller.document.write(scrollercontent)
ns_scroller.document.close()
actualheight=ns_scroller.document.height
}
lefttime=setInterval("scrollscroller()",20)
}
window.onload=populate

function scrollscroller(){

		frame += offset;
		frame2 += offset2;
	if (frame > twopi) frame -= twopi;
	if (frame2 > twopi) frame2 -= twopi;
	
 	angle = frame;
	angle2 = frame2;
		

		
	if (iedom){

		if( (parseInt(cross_scroller.style.top)>(actualheight*(-1))) ){

//		characters[i].style.left = pos;		
//		characters[i].style.top = initialy + amplitude1 * Math.sin(angle) + amplitude2 * Math.sin(angle2);
//		angle += offset; 
//		angle2 += offset2;		
//			pos += charwidth;
		
		cross_scroller.style.top=parseInt(cross_scroller.style.top)+ direction * startit*(copyspeed)+"px";

//		cross_scroller.style.left=parseInt(cross_scroller.style.left);
		cross_scroller.style.left=parseInt(cross_scroller.style.left)+ sinusit*(startit*(1*(amplitude1 * Math.sin(angle)) + 1*(amplitude2 * Math.sin(angle2))))		
//		angle += offset;
//		angle2 += offset2;

		
		}else{
			if (parseInt(cross_scroller.style.top)<(actualheight*(-1)+8)){
				 cross_scroller.style.top=parseInt(scrollerheight)+8+"px"
			}
			if (parseInt(cross_scroller.style.left) > (scrollerwidth + 8) ){
				cross_scroller.style.left = initposx;
			}
		 }
	}else if (document.layers){
		if (ns_scroller.top>(actualheight*(-1)+8))	ns_scroller.top-=copyspeed;
		else ns_scroller.top=parseInt(scrollerheight)+8
	}
}



if (iedom||document.layers){
with (document){
if (iedom){
write('<div style="position:relative;width:'+scrollerwidth+';height:'+ scrollerheight +';overflow:hidden">')
write('<div id="iescroller" style="position:absolute;left:0px;top:0px;width:100%;">')
write('</div></div>')
}
else if (document.layers){
write('<ilayer width='+scrollerwidth+' height='+scrollerheight+' name="ns_scroller">')
write('<layer name="ns_scroller2" width='+scrollerwidth+' height='+scrollerheight+' left=0 top=0 onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=scrollerspeed"></layer>')
write('</ilayer>')
}
}
}
