
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#27>Supreme Court orders govt to let Nawaz Sharif return</a>"
messages[02]="<a class='TickerColor' href=./welcome.htm#28>Benazir vows to visit bomb-hit Rawalpindi</a>"
messages[03]="<a class='TickerColor' href=./welcome.htm#12>Seven dead in suicide blast near Musharraf's HQ</a>"
messages[04]="<a class='TickerColor' href=./welcome.htm#11>Pakistan: Calm prevails in Swat valley</a>"
messages[05]="<a class='TickerColor' href=./welcome.htm#40>Pakistan calls for assured nuclear fuel supply to meet world's energy needs</a>"
messages[06]="<a class='TickerColor' href=./welcome.htm#39>Three US soldiers killed in Iraq</a>"
messages[07]="<a class='TickerColor' href=./welcome.htm#38>Indian troops martyr one more innocent youth in Occupied Kashmir</a>"
messages[08]="<a class='TickerColor' href=./welcome.htm#37>Major powers expected to meet on Iran this week</a>"
messages[09]="<a class='TickerColor' href=./welcome.htm#36>India PM says U.S. nuclear deal delayed, not dead</a>"
messages[10]="<a class='TickerColor' href=./welcome.htm#35>Brazil to host 2014 Football World Cup</a>"
messages[11]="<a class='TickerColor' href=./welcome.htm#34>Gas explosion near Paris injures 30 people</a>"
messages[12]="<a class='TickerColor' href=./welcome.htm#33>US not about to attack Iran: White House</a>"
messages[13]="<a class='TickerColor' href=./welcome.htm#32>Fugitive militant demands halt to mly operations at mass rally</a>"
messages[14]="<a class='TickerColor' href=./welcome.htm#31>US spends $43.5 billion on intelligence: official</a>"
messages[15]="<a class='TickerColor' href=./welcome.htm#30>Ponting, Gilchrist and Afridi join new Indian league</a>"
messages[16]="<a class='TickerColor' href=./welcome.htm#29>Afghan, foreign troops kill 20 insurgents</a>"
messages[17]="<a class='TickerColor' href=./welcome.htm#26>Taliban overrun Afghan district, several dead</a>"
messages[18]="<a class='TickerColor' href=./welcome.htm#25>Thai army ordered to free 85 people held for 'job training'</a>"
messages[19]="<a class='TickerColor' href=./welcome.htm#24>Eight get life for Indian Gujarat Muslim massacre</a>"
messages[20]="<a class='TickerColor' href=./welcome.htm#22>At least 17 killed in southern India heavy rains</a>"
messages[21]="<a class='TickerColor' href=./welcome.htm#23>Bangladesh ex-minister jailed for 17 years over illegal weapon</a>"
messages[22]="<a class='TickerColor' href=./welcome.htm#21>Shark in Iraqi irrigation channel!</a>"
messages[23]="<a class='TickerColor' href=./welcome.htm#20>China opposes further nuclear sanctions on Iran</a>"
messages[24]="<a class='TickerColor' href=./welcome.htm#19>At least 30 burnt to death in Nigerian petrol truck crash</a>"
messages[25]="<a class='TickerColor' href=./welcome.htm#18>Four soldiers killed as Turkish troops clash with Kurdish rebels</a>"
messages[26]="<a class='TickerColor' href=./welcome.htm#17>Chad charges six French citizens with kidnapping 103 children</a>"
messages[27]="<a class='TickerColor' href=./welcome.htm#16>Indian police rescue child workers from factory</a>"
messages[28]="<a class='TickerColor' href=./welcome.htm#15>Coalition soldier killed in Afghanistan</a>"
messages[29]="<a class='TickerColor' href=./welcome.htm#14>Bomb blast kills four policemen in Samarra</a>"
messages[30]="<a class='TickerColor' href=./welcome.htm#13>Dozens hurt in Israel Druze village clashes</a>"
messages[31]="<a class='TickerColor' href=./welcome.htm#10>Intelligence chief, 3 others, die in Afghanistan blast</a>"
messages[32]="<a class='TickerColor' href=./welcome.htm#8>Israel can't cut power to Gaza: Israeli Attorney General</a>"
messages[33]="<a class='TickerColor' href=./welcome.htm#7>NASA extends shuttle mission to space station</a>"
messages[34]="<a class='TickerColor' href=./welcome.htm#6>Jordan's king urges China to play greater role in Mideast</a>"
messages[35]="<a class='TickerColor' href=./welcome.htm#5>Dissidents oust ex-Bangladesh PM Zia as party chief</a>"
messages[36]="<a class='TickerColor' href=./welcome.htm#3>Five shot dead in Thai south</a>"
messages[37]="<a class='TickerColor' href=./welcome.htm#2>13 Tamil rebels killed in Sri Lanka</a>"
messages[38]="<a class='TickerColor' href=./welcome.htm#1>Tropical Storm Noel kills 20 as it lashes Caribbean island of Hispaniola</a>"
messages[39]="<a class='TickerColor' href=./welcome.htm#kse1>At the close of trading the KSE-100 index was at 14028.54,down 364.94, points.</a>"
messages[40]="<a class='TickerColor' href=./welcome.htm#kse2>The Pakistani Rupee was traded at Rs 60.75, 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
	}

