
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 Media Group</span>"
messages[01]="<a class='TickerColor' href=./welcome.htm#49>Bomb threat prompts Faisal mosque evacuation</a>"
messages[02]="<a class='TickerColor' href=./welcome.htm#48>Malicious media campaign: Presidential spokesman</a>"
messages[03]="<a class='TickerColor' href=./welcome.htm#47>Mullen urges caution in working with Pakistan</a>"
messages[04]="<a class='TickerColor' href=./welcome.htm#46>Submarine ‘Hamza’ inducted into Pakistan Navy fleet</a>"
messages[05]="<a class='TickerColor' href=./welcome.htm#45>Rice confident of Pakistan's anti-terror resolve</a>"
messages[06]="<a class='TickerColor' href=./welcome.htm#44>Six powers agree to confirm UN sanctions on Iran</a>"
messages[07]="<a class='TickerColor' href=./welcome.htm#43>FBR amends income tax rules</a>"
messages[08]="<a class='TickerColor' href=./welcome.htm#42>Taliban free 118 kidnapped Afghan labourers</a>"
messages[09]="<a class='TickerColor' href=./welcome.htm#41>Afghan suicide attack kills five</a>"
messages[10]="<a class='TickerColor' href=./welcome.htm#40>Tribesmen burn down Taliban centres in Jamrud</a>"
messages[11]="<a class='TickerColor' href=./welcome.htm#39>Indian website plays cupid for HIV/AIDS patients</a>"
messages[12]="<a class='TickerColor' href=./welcome.htm#38>Computer applications float in Internet cloud</a>"
messages[13]="<a class='TickerColor' href=./welcome.htm#37>Attack by Jewish extremists: wounded Israeli historian</a>"
messages[14]="<a class='TickerColor' href=./welcome.htm#36>Pakistan vows to retake tribal region in 3 months</a>"
messages[15]="<a class='TickerColor' href=./welcome.htm#35>Journalist recalls six-year long Guantanamo nightmare</a>"
messages[16]="<a class='TickerColor' href=./welcome.htm#34>Indian troops kill seven militants near Bangladesh</a>"
messages[17]="<a class='TickerColor' href=./welcome.htm#33>The curse of polio</a>"
messages[18]="<a class='TickerColor' href=./welcome.htm#32>Intelligence deficit</a>"
messages[19]="<a class='TickerColor' href=./welcome.htm#31>Sarkozy demands overhaul of world economic system</a>"
messages[20]="<a class='TickerColor' href=./welcome.htm#30>Pirates seize ship off Somalia carrying 30 tanks</a>"
messages[21]="<a class='TickerColor' href=./welcome.htm#29>Bush rejected Israeli strike on Iran: Guardian</a>"
messages[22]="<a class='TickerColor' href=./welcome.htm#28>Lankan troops close in on rebel capital, 37 killed</a>"
messages[23]="<a class='TickerColor' href=./welcome.htm#27>War on terror and India’s stake</a>"
messages[24]="<a class='TickerColor' href=./welcome.htm#26>Six killed in bomb attack on train</a>"
messages[25]="<a class='TickerColor' href=./welcome.htm#25>Two terrorist suspects arrested on KLM flight</a>"
messages[26]="<a class='TickerColor' href=./welcome.htm#24>Zheng dumps Ivanovic out of China Open</a>"
messages[27]="<a class='TickerColor' href=./welcome.htm#23>Turkish jets bomb PKK targets in north Iraq</a>"
messages[28]="<a class='TickerColor' href=./welcome.htm#22>Zardari slams US after border gunfire</a>"
messages[29]="<a class='TickerColor' href=./welcome.htm#21>Malaysia PM to quit early</a>"
messages[30]="<a class='TickerColor' href=./welcome.htm#20>Egypt finds 3,000-year-old statue</a>"
messages[31]="<a class='TickerColor' href=./welcome.htm#19>Russia offers Venezuela nuclear help</a>"
messages[32]="<a class='TickerColor' href=./welcome.htm#18>China overtakes US as biggest carbon polluter</a>"
messages[33]="<a class='TickerColor' href=./welcome.htm#17>Five top militants among 1,000 dead in Bajaur</a>"
messages[34]="<a class='TickerColor' href=./welcome.htm#16>Chinese elated at successful Shenzhou launch</a>"
messages[35]="<a class='TickerColor' href=./welcome.htm#15>Three dead after police, militants clash in Baldia Town</a>"
messages[36]="<a class='TickerColor' href=./welcome.htm#14>US Air Force disciplines 15 officers for nuclear blunder</a>"
messages[37]="<a class='TickerColor' href=./welcome.htm#13>Pakistan considered for $1.3bn WB assistance</a>"
messages[38]="<a class='TickerColor' href=./welcome.htm#12>Pakistan faces 'existential threat,' says US general</a>"
messages[39]="<a class='TickerColor' href=./welcome.htm#11>Anti-poverty summit raises 16 billion dollars</a>"
messages[40]="<a class='TickerColor' href=./welcome.htm#10>US Congress warned of cell phone cancer risk</a>"
messages[41]="<a class='TickerColor' href=./welcome.htm#e9>Bush tells Singh 'working hard' on nuclear deal</a>"
messages[42]="<a class='TickerColor' href=./welcome.htm#e8>Mugabe urges lifting of sanctions</a>"
messages[43]="<a class='TickerColor' href=./welcome.htm#e7>Bush, Abbas hopeful of Mideast peace deal</a>"
messages[44]="<a class='TickerColor' href=./welcome.htm#e6>Canadian found guilty in terrorism trial</a>"
messages[45]="<a class='TickerColor' href=./welcome.htm#e5>World powers to meet on Pakistan Friday</a>"
messages[46]="<a class='TickerColor' href=./welcome.htm#e4>Pakistan victim of terrorism, Zardari tells UN</a>"
messages[47]="<a class='TickerColor' href=./welcome.htm#e3>UN asked to speed up Benazir commission</a>"
messages[48]="<a class='TickerColor' href=./welcome.htm#e2>Miliband calls on Zardari in New York</a>"
messages[49]="<a class='TickerColor' href=./welcome.htm#e1>ADB concerned over Women's Health Project</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
	}

