
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[0]="<span class='TickerColor'>DAWN Group of Newspapers</span>"                                                             
messages[01]="<a class='TickerColor' href=./welcome.htm#43>Pakistan, Afghanistan leaders pledge to fight Taliban</a>"
messages[02]="<a class='TickerColor' href=./welcome.htm#45>Hockey-Germany leave it late to see off India</a>"
messages[03]="<a class='TickerColor' href=./welcome.htm#45>Hockey-Germany leave it late to see off India</a>"
messages[04]="<a class='TickerColor' href=./welcome.htm#44>Pakistan, Afghanistan leaders pledge to fight Taliban</a>"
messages[05]="<a class='TickerColor' href=./welcome.htm#42>Government, MMA agree to constitute committee to review Hudood law amendments</a>"
messages[06]="<a class='TickerColor' href=./welcome.htm#41>Two soldiers killed in fresh fighting in Sri Lanka</a>"
messages[07]="<a class='TickerColor' href=./welcome.htm#40>One British soldier dead, five injured in Afghanistan</a>"
messages[08]="<a class='TickerColor' href=./welcome.htm#39>People of Balochistan want peace and progress: PM Aziz</a>"
messages[09]="<a class='TickerColor' href=./welcome.htm#38>Annan hopeful of quick end to Israeli blockade</a>"
messages[10]="<a class='TickerColor' href=./welcome.htm#36>Two dead in new suicide blast in Afghanistan</a>"
messages[11]="<a class='TickerColor' href=./welcome.htm#35>Cricket-Inzamam to lead Pakistan's Champions Trophy squad</a>"
messages[12]="<a class='TickerColor' href=./welcome.htm#34>Afghan parliament urges NATO troops to avoid civilian casualties</a>"
messages[13]="<a class='TickerColor' href=./welcome.htm#33>NATO pledges long-term commitment to Afghanistan</a>"
messages[14]="<a class='TickerColor' href=./welcome.htm#32>Cricket-England coach Fletcher breaks Oval row silence</a>"
messages[15]="<a class='TickerColor' href=./welcome.htm#31>Four more government aides quit in Blair departure row</a>"
messages[16]="<a class='TickerColor' href=./welcome.htm#30>Cricket-Dravid, Ponting and Jayawardene top ICC nominations</a>"
messages[17]="<a class='TickerColor' href=./welcome.htm#29>Cricket-Forensic tests possible on Oval Test ball: ICC</a>"
messages[18]="<a class='TickerColor' href=./welcome.htm#28>Ahmadinejad calls for live television debate with Bush</a>"
messages[19]="<a class='TickerColor' href=./welcome.htm#25>Any Iran sanctions must exclude force: Russia</a>"
messages[20]="<a class='TickerColor' href=./welcome.htm#24>Iran-EU nuclear talks postponed: Iranian envoy</a>"
messages[21]="<a class='TickerColor' href=./welcome.htm#23>Clashes erupt in Bangladesh capital, 100 injured</a>"
messages[22]="<a class='TickerColor' href=./welcome.htm#22>Two Lebanese soldiers killed defusing Israeli mines</a>"
messages[23]="<a class='TickerColor' href=./welcome.htm#21>Cricket-Trescothick out of Champions Trophy</a>"
messages[24]="<a class='TickerColor' href=./welcome.htm#20>Balochistan on strike over Akbar Bugti’s killing</a>"
messages[25]="<a class='TickerColor' href=./welcome.htm#19>Two bus accidents kill eight Egyptian pilgrims and one tourist</a>"
messages[26]="<a class='TickerColor' href=./welcome.htm#18>Pakistan army spokesman denies report that bin Laden wouldn't be captured</a>"
messages[27]="<a class='TickerColor' href=./welcome.htm#15>United Iraqi Alliance submits draft law to divide Iraq</a>"
messages[28]="<a class='TickerColor' href=./welcome.htm#14>Defence of Pakistan Day</a>"
messages[29]="<a class='TickerColor' href=./welcome.htm#13>Iran deploys locally made war plane in wargames</a>"
messages[30]="<a class='TickerColor' href=./welcome.htm#12>Four killed when armored personnel carrier hit by explosion in Russia</a>"
messages[31]="<a class='TickerColor' href=./welcome.htm#11>Turkish Cyprus President supports Kashmir cause</a>"
messages[32]="<a class='TickerColor' href=./welcome.htm#10>Car bomb, roadside bomb kill at least nine, wound 36 in Baghdad</a>"
messages[33]="<a class='TickerColor' href=./welcome.htm#9>Four killed, dozen injured in blast at illegal detonator workshop in China</a>"
messages[34]="<a class='TickerColor' href=./welcome.htm#7>Five Canadian soldiers wounded in Afghan fighting</a>"
messages[35]="<a class='TickerColor' href=./welcome.htm#4>No action against Akhtar after TV highlights ball incident</a>"
messages[36]="<a class='TickerColor' href=./welcome.htm#3>Bush picks Goldman Sachs exec for Treasury post</a>"
messages[37]="<a class='TickerColor' href=./welcome.htm#2>Rain washes out day nine at US Open</a>"
messages[38]="<a class='TickerColor' href=./welcome.htm#1>Four Hamas militants killed in Israeli air strikes</a>"
messages[39]="<a class='TickerColor' href=./welcome.htm#kse1>At close of trading the KSE-100 index was at 10069.76, up 67.97 points</a>"
messages[40]="<a class='TickerColor' href=./welcome.htm#kse2>The Pakistani Rupee was traded at Rs 60.57 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
	}

