

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#20>One killed, two hurt in Peshawar blast</a>"
messages[02]="<a class='TickerColor' href=./welcome.htm#28>Pakistan decides to mine border with Afghanistan</a>"
messages[03]="<a class='TickerColor' href=./welcome.htm#49>Chaudry Shujaat meets Benazir Bhutto in Dubai</a>"
messages[04]="<a class='TickerColor' href=./welcome.htm#48>Bangladesh ex-military ruler asked to surrender</a>"
messages[05]="<a class='TickerColor' href=./welcome.htm#47>Heavy rain, snowfall in AJK, other parts of country</a>"
messages[06]="<a class='TickerColor' href=./welcome.htm#46>Akhtar Mengal handed over to police on judicial remand till Jan 5</a>"
messages[07]="<a class='TickerColor' href=./welcome.htm#45>Government believes in inter provincial autonomy: Musharraf</a>"
messages[08]="<a class='TickerColor' href=./welcome.htm#44>PM Aziz for early settlement of Kashmir dispute</a>"
messages[09]="<a class='TickerColor' href=./welcome.htm#43>NWFP to observe Eid-ul-Azha on Dec 31</a>"
messages[10]="<a class='TickerColor' href=./welcome.htm#42>Renowned poet Muneer Niazi dies</a>"
messages[11]="<a class='TickerColor' href=./welcome.htm#41>Fifteen killed in new Baghdad bomb attack</a>"
messages[12]="<a class='TickerColor' href=./welcome.htm#40>One killed as three strong quakes rock Taiwan</a>"
messages[13]="<a class='TickerColor' href=./welcome.htm#39>Cricket-South Africa 257-8 v India at close of play in second test</a>"
messages[14]="<a class='TickerColor' href=./welcome.htm#38>Saddam execution to be carried out within 30 days</a>"
messages[15]="<a class='TickerColor' href=./welcome.htm#37>Pakistan urges more diplomatic efforts on Iran nuclear issue</a>"
messages[16]="<a class='TickerColor' href=./welcome.htm#36>UN slams Sri Lanka warring parties over slow tsunami recovery</a>"
messages[17]="<a class='TickerColor' href=./welcome.htm#35>Afghanistan arrests 'suicide bomb supplier'</a>"
messages[18]="<a class='TickerColor' href=./welcome.htm#34>Syria wants to work with US forces to control Iraq border: senator</a>"
messages[19]="<a class='TickerColor' href=./welcome.htm#33>Ethiopian forces closing on Somali capital</a>"
messages[20]="<a class='TickerColor' href=./welcome.htm#32>Spanish doctor says Castro recovering</a>"
messages[21]="<a class='TickerColor' href=./welcome.htm#31>Mubarak proposes ban on parties based on religion</a>"
messages[22]="<a class='TickerColor' href=./welcome.htm#30>Twenty Iraqis slain in attacks as US losses top 9/11 toll</a>"
messages[23]="<a class='TickerColor' href=./welcome.htm#29>Israel okays first new West Bank settlement in decade</a>"
messages[24]="<a class='TickerColor' href=./welcome.htm#3>Saudis say 16 pilgrims hurt in Mecca hotel fire</a>"
messages[25]="<a class='TickerColor' href=./welcome.htm#25>Up to 500 killed in Lagos fuel blast</a>"
messages[26]="<a class='TickerColor' href=./welcome.htm#24>Iran to move towards industrial enrichment in February</a>"
messages[27]="<a class='TickerColor' href=./welcome.htm#22>Five rockets fired towards Israel</a>"
messages[28]="<a class='TickerColor' href=./welcome.htm#21>Dozens injured in Bangladesh pre-poll violence</a>"
messages[29]="<a class='TickerColor' href=./welcome.htm#17>Saudi frees 18 former Guantanamo detainees</a>"
messages[30]="<a class='TickerColor' href=./welcome.htm#16>Cricket-Australia 48-2 v England (159) - close</a>"
messages[31]="<a class='TickerColor' href=./welcome.htm#11>Rebel bomb kills three soldiers, four rebels killed: Sri Lankan military</a>"
messages[32]="<a class='TickerColor' href=./welcome.htm#10>Cricket-Warne captures 700th test wicket</a>"
messages[33]="<a class='TickerColor' href=./welcome.htm#13a>PM Aziz chairs meeting on Bundal island project</a>"
messages[34]="<a class='TickerColor' href=./welcome.htm#11a>Quaid’s birth anniversary: Musharraf at mausoleum</a>"
messages[35]="<a class='TickerColor' href=./welcome.htm#25a>Israel arrests nine Palestinian in W. Bank</a>"
messages[36]="<a class='TickerColor' href=./welcome.htm#24a>UN sanctions allow Russia to honor Iran agreements FM says</a>"
messages[37]="<a class='TickerColor' href=./welcome.htm#23a>Three US troops die in Iraq</a>"
messages[38]="<a class='TickerColor' href=./welcome.htm#22a>PM Aziz visits Saint Patrick's Cathedral in Karachi</a>"
messages[39]="<a class='TickerColor' href=./welcome.htm#21a>Ethiopian planes bomb airports as conflict widens in Somalia</a>"
messages[40]="<a class='TickerColor' href=./welcome.htm#20a>Iran's nuclear drive linked to looming oil crisis: US study</a>"
messages[41]="<a class='TickerColor' href=./welcome.htm#19a>Israel eases restrictions in West Bank</a>"
messages[42]="<a class='TickerColor' href=./welcome.htm#18a>US, European officials visit Fatah base in Jordan</a>"
messages[43]="<a class='TickerColor' href=./welcome.htm#17a>“Godfather of soul” James Brown dies</a>"
messages[44]="<a class='TickerColor' href=./welcome.htm#16a>Russian forces kill two gunmen in Chechnya</a>"
messages[45]="<a class='TickerColor' href=./welcome.htm#15a>UK forces kill seven, destroy police station in Basra</a>"
messages[46]="<a class='TickerColor' href=./welcome.htm#14a>Funeral of four slain men held in D.I. Khan</a>"
messages[47]="<a class='TickerColor' href=./welcome.htm#9a>Four Iranian nationals detained by US in Iraq; report</a>"
messages[48]="<a class='TickerColor' href=./welcome.htm#8a>Floods, landslides kill at least 80 in northern Indonesia</a>"
messages[49]="<a class='TickerColor' href=./welcome.htm#7a>Sri Lanka rebels free crew of stricken Jordan ship</a>"
messages[50]="<a class='TickerColor' href=./welcome.htm#5a>IRAQ; 16 kidnapees freed; 47 bodies found</a>"
messages[51]="<a class='TickerColor' href=./welcome.htm#4a>Gunfire reported near the home of Palestinian foreign minister</a>"
messages[52]="<a class='TickerColor' href=./welcome.htm#3a>Pope appeals for respect of 'dignity of children' at Christmas Mass</a>"
messages[53]="<a class='TickerColor' href=./welcome.htm#2a>China urges more talks on Iran's nuclear program</a>"
messages[54]="<a class='TickerColor' href=./welcome.htm#1a>Two shot dead in Thailand's restive south</a>"
messages[55]="<a class='TickerColor' href=./welcome.htm#kse1>At close of trading, the KSE-100 index was at 10025.34, up 131.35 points</a>"
messages[56]="<a class='TickerColor' href=./welcome.htm#kse2>The Pakistani Rupee was traded at Rs 60.8 to the US Dollar</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
	}

