// this file serves as the main textticker function, and also contains the goLink function
// June 10, 2003 added dhtmlLoadScript(url)

	var x = 0; pos = 0;
	var l = tl[0].length;
	if(l>110) {l=110;tl[0,109]='-'};
	var monkey= "";
	var newsUrl= "#";
	var browserMac = navigator.appVersion.indexOf("Mac");
	var maxchar = 110;
	var w = 0;


//

function get_random()
	{
	    var ranNum= Math.round(Math.random()*4000);
	    return ranNum;
	}


// v1.1 new function starts. URL must be a *.js file. ex. dhtmlLoadScript('headlinesdata.js');

	   function dhtmlLoadScript(url)
	   {
		rotate = get_random();
		urlgo = url + '?rander=' + rotate;
		//urlgo = url;
	      var e = document.createElement("script");
		  e.src = urlgo;
		  e.type="text/javascript";
		  document.getElementsByTagName("head")[0].appendChild(e);

	   }


// v1.1 new function ends

	function textticker() {

		//bad init();

		if (browserMac == -1) {
		tickerPC();
		} else {





		  //check mac versions
		if(ie4) {
		  tickerMac();
		} else {tickerPC();}



		  }

	}



	function tickerPC() {



		newsUrl = tl[x+1];

		showContent(x,0,pos,newsUrl);
		if(pos++ == l) {
			pos = 0;
			w=0;
			setTimeout("tickerPC()", 3000);
			x=x+2;
				if(x >= max) {
				x = 0;
				//rotate = get_random();
			//new history fix
				dhtmlLoadScript('headlinesdata.js');

				}
			l = tl[x].length;
			if(l>maxchar) {l=maxchar;tl[x,maxchar]='-'};

		} else
		setTimeout("tickerPC()", 80);
		if (pos>maxchar){w=w+1};




	}




	function tickerMac() {


		newsUrl = tl[x+1];

		showContentMac(x,0,l,newsUrl);

		w=0;
		setTimeout("tickerMac()", 4000);
		x=x+2;
		if(x == max) {
				x = 0;
				//rotate = get_random();
				//urlgo = 'headlinesdata.html'+ '?rander=' + rotate;
			//new history fix
				dhtmlLoadScript('headlinesdata.js');

		}

		l = tl[x].length;

		if(l>maxchar) {
		l=maxchar ;
		tl[x,maxchar]='.'
		}


	}



	function goLink() {

	//window.location = newsUrl;
	top.location = newsUrl;
	}







