var tWidth='950px';                  // width (in pixels)
var tHeight='19px';                  // height (in pixels)
var tcolour='#000000';               // background colour:
var moStop=false;                     // pause on mouseover (true or false)
var fontfamily = 'verdana'; // font for content
var tSpeed=2;                        // scroll speed (1 = slow, 5 = fast)

// enter your ticker content here (use \/ and \' in place of / and ' respectively)
var content='Testing...';

// Simple Marquee / Ticker Script
// copyright 3rd January 2006, Stephen Chapman
// permission to use this Javascript on your web page is granted
// provided that all of the below code in this script (including this
// comment) is used without any alteration
var cps=tSpeed; var aw, mq; var fsz = 12; function startticker(){if (document.getElementById) {var tick = '<div style="position:relative;width:'+tWidth+';height:'+tHeight+';overflow:hidden;background-color:'+tcolour+'"'; if (moStop) tick += ' onmouseover="cps=0" onmouseout="cps=tSpeed"'; tick +='><div id="mq" style="position:absolute;left:0px;top:0px;font-family:'+fontfamily+';font-size:'+fsz+'px;white-space:nowrap;"><\/div><\/div>'; document.getElementById('header_bottom').innerHTML = tick; mq = document.getElementById("mq"); mq.style.left=(parseInt(tWidth)+10)+"px"; mq.innerHTML='<span id="tx">'+content+'<\/span>'; aw = document.getElementById("tx").offsetWidth; lefttime=setInterval("scrollticker()",50);}} function scrollticker(){mq.style.left = (parseInt(mq.style.left)>(-10 - aw)) ?parseInt(mq.style.left)-cps+"px" : parseInt(tWidth)+10+"px";} window.onload=startticker;
                  

function getPageSize(){
    if (window.innerHeight && window.scrollMaxY) {// Firefox
        yWithScroll = window.innerHeight + window.scrollMaxY;
        xWithScroll = window.innerWidth + window.scrollMaxX - 17;
    } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
        yWithScroll = document.body.scrollHeight;
        xWithScroll = document.body.scrollWidth;
    } else { // works in Explorer 6 Strict, Mozilla (not FF) and Safari
        yWithScroll = document.body.offsetHeight;
        xWithScroll = document.body.offsetWidth;
    }
    arrayPageSizeWithScroll = Array(yWithScroll, xWithScroll);
    //alert( 'The height is ' + yWithScroll + ' and the width is ' + xWithScroll );
    return arrayPageSizeWithScroll;
}

var amount_riders = 6;
var rider_no = Math.floor(amount_riders*Math.random())+1;

function rider_slideshow(){
	rider_no++;
	if(rider_no > amount_riders){
		rider_no = 1;
	}
	show('Riders', rider_no, 'riders.php');
}

window.onload = function(){
	PageSize = getPageSize();
	tWidth = PageSize[1] + "px";
	document.getElementById('center').style.width = (PageSize[1] - 196 - 160) + "px";
	show('Riders', rider_no, 'riders.php');
	var rider_timeout = setInterval(rider_slideshow, 10000);
	startticker();
}