newsstring=new Array(" <GCC Music Quiz> ||The GCC bi annual <music quiz> is taking place on <Saturday 27th March>.     Tickets will be <£7.00> per head with a <MAXIMUM> of 8 people in a team. A light supper will be provided and we will also have a licensed bar on the night.    Please do your utmost and support this event. For tickets and enquires please contact <Terry Woolgar> on <01892 864821>."," <HELP - MUSIC QUIZ> ||We know a number of you cannot make the Music quiz .......... however,  you can still help us by donating a raffle prize.  If you can help please contact Geoff or Terry.    many thanks"," <Winter Nets 2010> ||You will by now excited by the great England win in SA, so now is an opportune time to remind you.......!    That the GCC winter nets program starts next week at <Holmewood House> on Tuesday evenings from, <5th January for 13 weeks> between 7.00 & 9.00pm. The early session from 7.00pm to 8.00pm will be for selected junior members, and the <senior session will be between 8.00pm & 9.00pm as normal>.     We look forward to seeing you.    As normal we ask <you> to try and encourage new players to come along and join in - known stars or just friends wanting to get involved.  We need more players.....!     Thanks  Secretary GCC  Jamie."," <PETER GOVUS> ||It is with deep regret that we say our goodbyes to Peter Govus who passed away earlier this week.    Those who knew Peter will remember a major cricket enthusiast with a somewhat off the wall character, especially when it came to organising events!  He did so much to progress the fortunes of  GCC.      He leaves behind the legacy of the Govus awards.")
//the above variables of news articles are dynamically added by a php script automatically twice daily.
//This script is COPYRIGHT 2004 - PAUL W H MIDCALF - WEB SITE SORCERY.CO.UK
//max lines on display
lineheight=9
//max characters for width of display (must never exceed width! - always use courier type font with equal character spacing)
charwidth=41
//ticker cursor
//tickertypeon="<font color='#FFFF00'><strong>&gt;</strong></font>"
tickertypeon="<span style='background:800000'>&nbsp;</span>"
tickertypeoff="&nbsp;"
//cursor flash speed
tickertypeflash=20
//ticker speed
tickerspeed=2
//pause between articles
tickerpause=150
//the more link name (not longer than char width (above) - 5
themorelink="<visit the News Page for more>"
//IN-HOUSE VARIABLES
//amount of news articles
newsarticleamount=newsstring.length
//get first news article ready
newsarticlecount=-1
currentarticle=""
getnextarticle()
//the news article so far
newspartial=""
//the character position of the next letter within the original string
newschar=0
//ticker type flash count
tickertypecount=0
//ticker type toggle
tickertypetoggle=0
//ticker type character display
tickertypedisplay=tickertypeon
//tickerspeed count
tickerspeedcount=0
//tickerpause count
tickerpausecount=0
//special character variables
addhtmlbefore=""
temphtmlafter=""
addhtmlafter=""
aftercursor=""
//characterwidthcount
charwidthcount=0
//where we break the next line
charwidthbreak=0
//line number on display count
lineheightcount=1
//get first char width count
getnextcharwidth()
//TICKER FUNCTION
function newsticker() {
	//flash cursor
	tickertypecount++
	if (tickertypecount>tickertypeflash) {
		tickertypecount=0
		if (tickertypetoggle==0) {
			tickertypetoggle=1
			tickertypedisplay=tickertypeoff
		} else {
			tickertypetoggle=0
			tickertypedisplay=tickertypeon
		}
	}
	//is it time to display the next character of the news article?
	if (tickerspeedcount>tickerspeed) {
		tickerspeedcount=0
		//new line invoked
		while (currentarticle.charCodeAt(newschar)==124) {
			addhtmlbefore+="<br>";lineheightinc()
			charwidthcount=0
			newschar++
			getnextcharwidth()
		}
		//if less than sign
		if (currentarticle.charCodeAt(newschar)==60) {
			addhtmlbefore+="<span class='newsbold'>"
			temphtmlafter+="</span>"
			newschar++
			charwidthcount++
		} else if (currentarticle.charCodeAt(newschar)==62) {
		//if greater than sign
			addhtmlafter+="</span>"
			newschar++
			charwidthcount++
		}
		//new line invoked
		while (currentarticle.charCodeAt(newschar)==124) {
			addhtmlbefore+="<br>";lineheightinc()
			charwidthcount=0
			newschar++
			getnextcharwidth()
		}
		//has line come to end of charater width setting
		if (charwidthcount>=charwidthbreak & newschar<newscharmax) {
			charwidthcount=0
			addhtmlbefore+="<br>";lineheightinc()
			getnextcharwidth()
		}
		//finished displaying news but have'nt reached total lines yet
		if (newschar>=newscharmax & lineheightcount<lineheight) {
			lineheightcount++
			aftercursor+="<br>&nbsp;";
		}
		//display article with cursor
		chartoaddhere=currentarticle.substr(newschar,1)
		newspartial=newspartial+addhtmlbefore+chartoaddhere+addhtmlafter
		result.innerHTML=newspartial+temphtmlafter+tickertypedisplay+aftercursor
		//increase char width count
		charwidthcount++
		//reset special character variables
		addhtmlbefore=""
		temphtmlafter=""
		addhtmlafter=""
		//have we reached the end of this particular article
		if (newschar<newscharmax) {
			newschar++
		//wait for pause before moving onto next article
		} else {
			tickerpausecount++
			//next article
			if (tickerpausecount>tickerpause) {
				tickerpausecount=0
				newspartial=""
				newschar=0
				charwidthcount=0
				aftercursor=""
				lineheightcount=1
				//get next article
				getnextarticle();
				//get first line break point
				getnextcharwidth();
			}
		}
	}
	tickerspeedcount++
	setTimeout("newsticker()", 1)
}
//work out where to break the next line
function getnextcharwidth() {
	charwidthbreak=charwidth
	thisloopend=newschar+charwidth
	if (thisloopend<newscharmax) {
		for (i=newschar;i<thisloopend;i++) {
			if (currentarticle.substr(i,1)=="|") {
				thisloopend=i //stop loop because we found line break
				charwidthbreak=charwidth
			}
			if (currentarticle.substr(i,1)==" ") {
				charwidthbreak=i-newschar
			}
		}
	}
}
//line height increase - stop news if hit bottom
function lineheightinc() {
	lineheightcount++
	if (lineheightcount>=lineheight) {
		if (addhtmlbefore.length>4){
			addhtmlbefore=addhtmlbefore.substr(0,addhtmlbefore.length-4)
			lineheightcount--
		}
		//change text to create link thus fooling ticker
		currentarticle=currentarticle.substr(newschar,charwidth-6-(themorelink.length))+"... "+themorelink
		newscharmax=currentarticle.length
		newschar=0
		charwidthcount=0
		charwidthbreak=charwidth
	}
}
function getnextarticle () {
	newsarticlecount++
	//choose first article once more
	if (newsarticlecount>=newsarticleamount) {
		newsarticlecount=0
	}
	//get length of this article
	currentarticle=newsstring[newsarticlecount]
	newscharmax=currentarticle.length
}