
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#62>“No chance at all of our nuclear assets falling into the wrong hands”: President Musharraf</a>"
messages[02]="<a class='TickerColor' href=./welcome.htm#85>Benazir suspect had suicide jacket, explosives</a>"
messages[03]="<a class='TickerColor' href=./welcome.htm#46>Militants attack supply trucks headed for Afghanistan</a>"
messages[04]="<a class='TickerColor' href=./welcome.htm#77>Musharraf pledges free elections</a>"
messages[05]="<a class='TickerColor' href=./welcome.htm#87>Bomber kills 15 at funeral in northern Iraq</a>"
messages[06]="<a class='TickerColor' href=./welcome.htm#86>Israel allows fuel supplies, medicine to Gaza</a>"
messages[07]="<a class='TickerColor' href=./welcome.htm#84>Gaza blockade sparks international outcry</a>"
messages[08]="<a class='TickerColor' href=./welcome.htm#83>US helping Pakistan tackle extremism 'in its own way': Boucher</a>"
messages[09]="<a class='TickerColor' href=./welcome.htm#82>Pakistan draw 1-1 against India in Junior hockey</a>"
messages[10]="<a class='TickerColor' href=./welcome.htm#81>Justice Raza Khan takes oath as CJ PHC</a>"
messages[11]="<a class='TickerColor' href=./welcome.htm#80>At least 16 migrants drown off Yemen coast</a>"
messages[12]="<a class='TickerColor' href=./welcome.htm#79>Mine blast kills British soldier in Afghanistan</a>"
messages[13]="<a class='TickerColor' href=./welcome.htm#78>Cricket-Pakistan beat Zimbabwe by 104 runs in first one-dayer</a>"
messages[14]="<a class='TickerColor' href=./welcome.htm#76>Gaza City grinds to a halt amid Israeli blockade</a>"
messages[15]="<a class='TickerColor' href=./welcome.htm#75>Six militants, policeman killed in occupied Kashmir</a>"
messages[16]="<a class='TickerColor' href=./welcome.htm#67>India’s Gujarat state Hindu-Muslim riots: 11 men get life sentences</a>"
messages[17]="<a class='TickerColor' href=./welcome.htm#73>Security forces launch operation against miscreants in Swat</a>"
messages[18]="<a class='TickerColor' href=./welcome.htm#72>Shabir Shah, Nayeem put under house arrest</a>"
messages[19]="<a class='TickerColor' href=./welcome.htm#71>Justice Raza Khan appointed new Chief Justice Peshawar High Court</a>"
messages[20]="<a class='TickerColor' href=./welcome.htm#70>Cold, snow kills 300 people in Afghanistan</a>"
messages[21]="<a class='TickerColor' href=./welcome.htm#69>Five of a family die of poisonous gas</a>"
messages[22]="<a class='TickerColor' href=./welcome.htm#68>Pakistan SC directs SBP to submit report about massive loans write-off</a>"
messages[23]="<a class='TickerColor' href=./welcome.htm#66>Haevy rains kill 17 canoeing in Zambia lake</a>"
messages[24]="<a class='TickerColor' href=./welcome.htm#65>Car bomb kills two in northern Iraq</a>"
messages[25]="<a class='TickerColor' href=./welcome.htm#64>Cricket- Pakistan insures home series after Australian fears</a>"
messages[26]="<a class='TickerColor' href=./welcome.htm#61>At least 48 killed in fresh Sri Lanka fighting</a>"
messages[27]="<a class='TickerColor' href=./welcome.htm#57>38 Hindu pilgrims killed in bus crash</a>"
messages[28]="<a class='TickerColor' href=./welcome.htm#55>India launches Israeli satellite</a>"
messages[29]="<a class='TickerColor' href=./welcome.htm#54>Six killed as Thai PM visits south: police</a>"
messages[30]="<a class='TickerColor' href=./welcome.htm#53>One NATO soldier killed, five wounded in Afghan blast</a>"  
messages[31]="<a class='TickerColor' href=./welcome.htm#52>Bangladesh court acquits varsity teachers</a>"  
messages[32]="<a class='TickerColor' href=./welcome.htm#49>Two US troops killed in Iraq</a>"
messages[33]="<a class='TickerColor' href=./welcome.htm#47>US says warplanes pound 30 Al-Qaeda targets in Iraq</a>"
messages[34]="<a class='TickerColor' href=./welcome.htm#45>27 killed in Myanmar bus crash</a>"
messages[35]="<a class='TickerColor' href=./welcome.htm#42>At least four dead as private planes collide in California</a>"
messages[36]="<a class='TickerColor' href=./welcome.htm#39>Serb nationalist wins first-round president vote</a>"
messages[37]="<a class='TickerColor' href=./welcome.htm#37>Israeli strikes kill Palestinian, injure four</a>"
messages[38]="<a class='TickerColor' href=./welcome.htm#kse1>At close of trading, the KSE-100 index was at 13850.03, down 24.51, points</a>"                                           
messages[39]="<a class='TickerColor' href=./welcome.htm#kse2>The Pakistani Rupee was traded at Rs 62.7, to the US Dollar in the open market</a>"
messages[40]="<a class='TickerColor' href=./welcome.htm#16>Gunships pound militant stronghold in South Waziristan</a>"
messages[41]="<a class='TickerColor' href=./welcome.htm#29>Eight hurt as Sunni, Shia groups exchange gunfire in Hangu</a>"
messages[42]="<a class='TickerColor' href=./welcome.htm#8>Gunmen shoot dead Pakistani intelligence official</a>"
messages[43]="<a class='TickerColor' href=./welcome.htm#31>President Musharraf arrives in Belgium for Europe tour</a>"
messages[44]="<a class='TickerColor' href=./welcome.htm#21>Second suspect held in Bhutto plot: officials</a>"
messages[45]="<a class='TickerColor' href=./welcome.htm#33>Seven killed in Kenya clashes: police</a>"
messages[46]="<a class='TickerColor' href=./welcome.htm#32>PIA flight makes emergency landing at Karachi Airport</a>"
messages[47]="<a class='TickerColor' href=./welcome.htm#30>Zimbabwe, Zambia suffer nationwide power outage, anger grows in South Africa</a>"
messages[48]="<a class='TickerColor' href=./welcome.htm#28>Fidel Castro's future to be set in February: Raul Castro</a>"
messages[49]="<a class='TickerColor' href=./welcome.htm#27>McCain wins South Carolina primary; Clinton, Romney take Nevada</a>"
messages[50]="<a class='TickerColor' href=./welcome.htm#26>Suicide bombing kills six in Iraq</a>"
messages[51]="<a class='TickerColor' href=./welcome.htm#25>India bird flu spreads as farmers resist cull</a>"
messages[52]="<a class='TickerColor' href=./welcome.htm#24>Two Czech soldiers injured in rocket attack in Iraq</a>"
messages[53]="<a class='TickerColor' href=./welcome.htm#23>Yemen detains Al-Qaeda suspects after tourist attack</a>"
messages[54]="<a class='TickerColor' href=./welcome.htm#22>Indonesia's Suharto making amazing recovery: doctors</a>"
messages[55]="<a class='TickerColor' href=./welcome.htm#20>Former Czech President Vaclav Havel hospitalized</a>"
messages[56]="<a class='TickerColor' href=./welcome.htm#19>Lebanon presidential vote delayed to Feb 11</a>"
messages[57]="<a class='TickerColor' href=./welcome.htm#18>Moderate intensity earthquake felt in Chitral, Swat</a>"
messages[58]="<a class='TickerColor' href=./welcome.htm#3>Pakistan on high security alert on Ashura day</a>"
messages[59]="<a class='TickerColor' href=./welcome.htm#15>Bomb kills five Afghan civilians: district chief</a>"
messages[60]="<a class='TickerColor' href=./welcome.htm#14>British PM visits India</a>"
messages[61]="<a class='TickerColor' href=./welcome.htm#13>Sri Lanka fighting kills 41 rebels, soldier</a>"
messages[62]="<a class='TickerColor' href=./welcome.htm#11>Cricket-India drop Ganguly, Dravid for Australia triangular series</a>"
messages[63]="<a class='TickerColor' href=./welcome.htm#10>Iran gets 4th batch of nuclear fuel from Russia</a>"
messages[64]="<a class='TickerColor' href=./welcome.htm#6>Malaysia cuts reliance on foreign labor, to send home 200,000 workers</a>"
messages[65]="<a class='TickerColor' href=./welcome.htm#5>Tennis-Open-Australian Open men's singles results</a>"
messages[66]="<a class='TickerColor' href=./welcome.htm#4>Tennis- Australian Open women's singles results</a>"
messages[67]="<a class='TickerColor' href=./welcome.htm#2>McCain, Clinton win White House battles</a>"
messages[68]="<a class='TickerColor' href=./welcome.htm#1>Police, protesters clash in Bern ahead of World Economic Forum</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
	}

