
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>Crashed ‘drone’ in Pakistan not from US: Pentagon</a>"
messages[02]="<a class='TickerColor' href=./welcome.htm#48>Rahman Malik nominated for International peace award</a>"
messages[03]="<a class='TickerColor' href=./welcome.htm#47>Reforms in existing Freedom of Information Laws sought</a>"
messages[04]="<a class='TickerColor' href=./welcome.htm#46>Police link nabbed Indian Mujahideens to Pakistan</a>"
messages[05]="<a class='TickerColor' href=./welcome.htm#45>Gilani urges media to help in fighting terrorism</a>"
messages[06]="<a class='TickerColor' href=./welcome.htm#44>Pakistan Bar Council supports CJ Dogar</a>"
messages[07]="<a class='TickerColor' href=./welcome.htm#43>Rs200bn misappropriations in oil pricing formula</a>"
messages[08]="<a class='TickerColor' href=./welcome.htm#42>Negotiations key for Pakistan: Ahmadinejad</a>"
messages[09]="<a class='TickerColor' href=./welcome.htm#41>Pakistan cabinet slams intelligence failure</a>"
messages[10]="<a class='TickerColor' href=./welcome.htm#40>Kuwait unveils plans for mega projects</a>"
messages[11]="<a class='TickerColor' href=./welcome.htm#39>We can deliver in India: Hussey</a>"
messages[12]="<a class='TickerColor' href=./welcome.htm#38>Iraq passes poll law, election before Jan 31</a>"
messages[13]="<a class='TickerColor' href=./welcome.htm#37>Bradman’s first bat auctioned</a>"
messages[14]="<a class='TickerColor' href=./welcome.htm#36>PCB signs deal with Dubai Sports City</a>"
messages[15]="<a class='TickerColor' href=./welcome.htm#35>Ashraful denies being rebel recruiter</a>"
messages[16]="<a class='TickerColor' href=./welcome.htm#34>Pakistani Taliban publicly execute three criminals</a>"
messages[17]="<a class='TickerColor' href=./welcome.htm#33>Operation against terrorists to continue</a>"
messages[18]="<a class='TickerColor' href=./welcome.htm#32>Egypt cleric says Mickey Mouse is not agent of Satan</a>"
messages[19]="<a class='TickerColor' href=./welcome.htm#31>Google launches Android-powered phone</a>"
messages[20]="<a class='TickerColor' href=./welcome.htm#30>Stocks end flat before Thursday’s floor review</a>"
messages[21]="<a class='TickerColor' href=./welcome.htm#29>North Korea kicks out nuclear inspectors</a>"
messages[22]="<a class='TickerColor' href=./welcome.htm#28>Afghan envoy’s abduction</a>"
messages[23]="<a class='TickerColor' href=./welcome.htm#27>A national threat</a>"
messages[24]="<a class='TickerColor' href=./welcome.htm#26>Five policemen killed in two attacks in Kabul</a>"
messages[25]="<a class='TickerColor' href=./welcome.htm#25>Too many failures</a>"
messages[26]="<a class='TickerColor' href=./welcome.htm#24>Five Palestinians die in Gaza tunnel collapse</a>"
messages[27]="<a class='TickerColor' href=./welcome.htm#23>Aso takes charge as prime minister of Japan</a>"
messages[28]="<a class='TickerColor' href=./welcome.htm#22>Suicide blast in Quetta – one dead, 22 injured</a>"
messages[29]="<a class='TickerColor' href=./welcome.htm#21>Pakistani air strikes on militant tunnels kill 20</a>"
messages[30]="<a class='TickerColor' href=./welcome.htm#20>Marriott will rise from ashes</a>"
messages[31]="<a class='TickerColor' href=./welcome.htm#19>Nicole Kidman credits fertile water with pregnancy</a>"
messages[32]="<a class='TickerColor' href=./welcome.htm#18>Ahmadinejad vows to resist Western nuclear 'bullying'</a>"
messages[33]="<a class='TickerColor' href=./welcome.htm#17>Making Karachi gun-free</a>"
messages[34]="<a class='TickerColor' href=./welcome.htm#16>Outrage against ‘karo-kari’ rids people of fear</a>"
messages[35]="<a class='TickerColor' href=./welcome.htm#15>Researcher finds tiny dino in world of giants</a>"
messages[36]="<a class='TickerColor' href=./welcome.htm#14>Army finds US drone’s wreckage, denies firing</a>"
messages[37]="<a class='TickerColor' href=./welcome.htm#13>Outrage against ‘karo-kari’ rids people of fear</a>"
messages[38]="<a class='TickerColor' href=./welcome.htm#12>Culture minister embroiled in desecration scandal</a>"
messages[39]="<a class='TickerColor' href=./welcome.htm#11>Train link with Quetta cut as track blown up</a>"
messages[40]="<a class='TickerColor' href=./welcome.htm#10>Gilani forms anti-terror committee</a>"
messages[41]="<a class='TickerColor' href=./welcome.htm#e9>Punjab proposes 60pc hike in wheat support price</a>"
messages[42]="<a class='TickerColor' href=./welcome.htm#e8>US wants to help Pakistan, Bush tells Zardari</a>"
messages[43]="<a class='TickerColor' href=./welcome.htm#e7>US drone crashes in South Waziristan</a>"
messages[44]="<a class='TickerColor' href=./welcome.htm#e6>Ahmedinejad, Zardari discuss IPI gas project</a>"
messages[45]="<a class='TickerColor' href=./welcome.htm#e5>Strong trade links with Turkey stressed</a>"
messages[46]="<a class='TickerColor' href=./welcome.htm#e4>Pakistan, France agree to strengthen ties</a>"
messages[47]="<a class='TickerColor' href=./welcome.htm#e3>Senate panel advances US-India nuclear deal</a>"
messages[48]="<a class='TickerColor' href=./welcome.htm#e2>US studying Afghan-Pakistan coalition force</a>"
messages[49]="<a class='TickerColor' href=./welcome.htm#e1>US says Aafia may be unfit for trial</a>"
messages[50]="<a class='TickerColor' href=./welcome.htm#kse1>At close of trading, the KSE-100 index was at 9190.75, down 8.76 points</a>"
messages[51]="<a class='TickerColor' href=./welcome.htm#kse2>The Pakistani Rupee was traded at Rs 78.3 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
	}

