
var scrollerdelay='4000' //delay between msg scrolls. 3000=3 seconds.
var scrollerwidth=screen.width-230
var scrollerheight='20px'
var scrollerbgcolor='#BAD2FE'
//set below to '' if you don't wish to use a background image
var scrollerbackground='scrollerback.gif'

//configure the below variable to change the contents of the scroller
var messages=new Array()
fillMessages();

//---------------------------------------- NEWS COMES HERE --------------------------------------------//
function fillMessages(){

messages[00]="<Span Class='tickercolor'>Dawn Group Of Newspapers</Span>"
messages[01]="<a class='TickerColor' href=./welcome.htm#52>Benazir to Musharraf: it's time to quit</a>"
messages[02]="<a class='TickerColor' href=./welcome.htm#60>Benazir building opposition alliance</a>"
messages[03]="<a class='TickerColor' href=./welcome.htm#65>Pakistan nukes under control: Musharraf</a>"
messages[04]="<a class='TickerColor' href=./welcome.htm#64>US calls on OPEC to increase oil production</a>"
messages[05]="<a class='TickerColor' href=./welcome.htm#63>Pakistan Bar Council asks lawyers to gear up drive</a>"
messages[06]="<a class='TickerColor' href=./welcome.htm#62>Israel, Palestinian leaders address Turkish parliament</a>"
messages[07]="<a class='TickerColor' href=./welcome.htm#61>U.S. pulls 3,000 troops from Iraq's Diyala province</a>"
messages[08]="<a class='tickercolor' href=./welcome.htm#20>Pakistan People’s Party starts protest without Benazir</a>"
messages[09]="<a class='TickerColor' href=./welcome.htm#59>Pakistan rejects Commonwealth suspension threat</a>"
messages[10]="<a class='TickerColor' href=./welcome.htm#58>Don't throw it all away, US envoy tells Pakistan</a>"
messages[11]="<a class='TickerColor' href=./welcome.htm#57>Dozen US rights groups ask Bush to cut off military aid to Pakistan</a>"
messages[12]="<a class='TickerColor' href=./welcome.htm#56>15 Qaeda fighters killed in Iraq</a>"
messages[13]="<a class='TickerColor' href=./welcome.htm#55>Philippine congressman dies in bomb blast</a>"
messages[14]="<a class='TickerColor' href=./welcome.htm#53>Imran Khan says would join Benazir in anti-Musharraf campaign</a>"
messages[15]="<a class='TickerColor' href=./welcome.htm#50>Pakistan curbs import of satellite equipment</a>"
messages[16]="<a class='TickerColor' href=./welcome.htm#49>Nawaz Sharif welcomes Benazir turning against Musharraf, says opposition should unite</a>"
messages[17]="<a class='TickerColor' href=./welcome.htm#48>Seven Polish NATO force soldiers held over Afghan civilian deaths</a>"
messages[18]="<a class='TickerColor' href=./welcome.htm#47>Pak-UAE sign agreement to set up oil refinery</a>"
messages[19]="<a class='TickerColor' href=./welcome.htm#46>Pakistani gunships kill four militants in Swat</a>"
messages[20]="<a class='TickerColor' href=./welcome.htm#45>Hajj operation starts</a>"
messages[21]="<a class='TickerColor' href=./welcome.htm#43>17 more held in Sindh as JI, ANP join anti-emergency protest</a>"
messages[22]="<a class='TickerColor' href=./welcome.htm#42>Hamas arrests scores of Fatah men after deadly rally</a>"
messages[23]="<a class='tickercolor' href=./welcome.htm#41>Kurdish rebels kill four soldiers in southeast Turkey</a>"
messages[24]="<a class='tickercolor' href=./welcome.htm#40>Gunmen fire at police during protest in Karachi</a>"
messages[25]="<a class='tickercolor' href=./welcome.htm#39>Police tear gas protesters in Peshawar</a>"
messages[26]="<a class='tickercolor' href=./welcome.htm#38>Benazir’s house arrest sparks demonstrations across Sindh</a>"
messages[27]="<a class='tickercolor' href=./welcome.htm#37>Suicide bomber enters Lahore to target Benazir Bhutto: Punjab Home Department</a>"
messages[28]="<a class='tickercolor' href=./welcome.htm#35>Bomb kills one at internet cafe in Peshawar</a>"
messages[29]="<a class='tickercolor' href=./welcome.htm#30>Iraq bombings, shootings kill six</a>"
messages[30]="<a class='tickercolor' href=./welcome.htm#28>Four more judges take oath under Pco</a>"
messages[31]="<a class='tickercolor' href=./welcome.htm#26>Fresh clashes kill 12 in Sri Lanka</a>"
messages[32]="<a class='tickercolor' href=./welcome.htm#25>Pakistan says no plans to fly Benazir out of Lahore 	</a>"
messages[33]="<a class='tickercolor' href=./welcome.htm#17>Scores arrested in Lahore trying to reach Benazir</a>"
messages[34]="<a class='tickercolor' href=./welcome.htm#19>Musharraf must end military rule in 10 days: Britain</a>"
messages[35]="<a class='tickercolor' href=./welcome.htm#8>Brown calls on Musharraf to lift emergency</a>"
messages[36]="<a class='tickercolor' href=./welcome.htm#6>Japan threatens to slash Pakistan aid</a>"
messages[37]="<a class='tickercolor' href=./welcome.htm#16>Bomb kills soldier in Miram Shah</a>"
messages[38]="<a class='tickErcolor' href=./welcome.htm#13>Fire injures 22 in Berne High-Rise building</a>"
messages[39]="<a class='tickercolor' href=./welcome.htm#4>Pioneering Tv, film director Delbert Mann dies</a>"
messages[40]="<a class='tickercolor' href=./welcome.htm#Kse1>At the close of trading, The Kse-100 Index was at 16287.23 ,down 35.47, points.</a>"
messages[41]="<a class='tickerColor' href=./welcome.htm#kse2>The Pakistani rupee was traded at Rs 61.1, to the US Dollar in the open market.</a>"

//---------------------------------------- NEWS COMES HERE --------------------------------------------//
}

///////Do not edit pass this line///////////////////////

var ie=document.all
var dom=document.getElementById


function move(whichdiv){
	tdiv=eval(whichdiv)
	if (parseInt(tdiv.style.top)>0&&parseInt(tdiv.style.top)<=5){
		tdiv.style.top=0+"px"
		setTimeout("move(tdiv)",scrollerdelay)
		setTimeout("move2(second2_obj)",scrollerdelay)
		return
	}
	if (parseInt(tdiv.style.top)>=tdiv.offsetHeight*-1){
		tdiv.style.top=parseInt(tdiv.style.top)-5+"px"
		setTimeout("move(tdiv)",50)
	}
	else
	{
		tdiv.style.top=parseInt(scrollerheight)+"px"
		tdiv.innerHTML=messages[i]
		if (i==messages.length-1)
			i=0
		else
			i++
	}
}

function move2(whichdiv){
	tdiv2=eval(whichdiv)
	if (parseInt(tdiv2.style.top)>0&&parseInt(tdiv2.style.top)<=5){
		tdiv2.style.top=0+"px"
		setTimeout("move2(tdiv2)",scrollerdelay)
		setTimeout("move(first2_obj)",scrollerdelay)
		return
	}
	if (parseInt(tdiv2.style.top)>=tdiv2.offsetHeight*-1){
		tdiv2.style.top=parseInt(tdiv2.style.top)-5+"px"
		setTimeout("move2(second2_obj)",50)
	}
	else{
		tdiv2.style.top=parseInt(scrollerheight)+"px"
		tdiv2.innerHTML=messages[i]
	if (i==messages.length-1)
		i=0
	else
		i++
	}
}

function startscroll(){
	first2_obj=ie? first2 : document.getElementById("first2")
	second2_obj=ie? second2 : document.getElementById("second2")
	move(first2_obj)
	second2_obj.style.top=scrollerheight
	second2_obj.style.visibility='visible'
}

function CreateTicker(){
	if (messages.length>2)
		i=2
	else
		i=0
		
	if (ie||dom){
		document.writeln('<div id="main2" style="position:relative;width:'+scrollerwidth+';height:'+scrollerheight+';overflow:hidden;background-color:'+scrollerbgcolor+' ;background-image:url('+scrollerbackground+')">')
		document.writeln('<div style="position:absolute;width:'+scrollerwidth+';height:'+scrollerheight+';clip:rect(0 '+scrollerwidth+' '+scrollerheight+' 0);left:0px;top:0px">')
		document.writeln('<div id="first2" style="position:absolute;width:'+scrollerwidth+';left:0px;top:1px;">')
		document.write(messages[0])
		document.writeln('</div>')
		document.writeln('<div id="second2" style="position:absolute;width:'+scrollerwidth+';left:0px;top:0px;visibility:hidden">')
		document.write(messages[dyndetermine=(messages.length==1)? 0 : 1])
		document.writeln('</div>')
		document.writeln('</div>')
		document.writeln('</div>')
	}


	if (window.addEventListener)
		window.addEventListener("load", startscroll, false)
	else if (window.attachEvent)
		window.attachEvent("onload", startscroll)
	else if (ie||dom)
		window.onload=startscroll
	}

