<!-- 
/***********************************************
 * Pausing up-down scroller- © Dynamic Drive (www.dynamicdrive.com)
 * This notice MUST stay intact for legal use
 * Visit http://www.dynamicdrive.com/ for this script and 100s more.
 ***********************************************/


function sportskePauseScroller()
{
	this.content 			= ['<a href="http://www.sportske.net/vest/domaci-fudbal/hrvatski-navijaci-ne-smeju-u-kragujevac-27968.html" target="_blank" title="Sportske.net - sve sportske vesti na jednom mestu!">Hrvatski navija&#269;i ne smeju u Kragujevac</a><p>UEFA me&#269;eve mladih Srba i Hrvata proglasila za rizi&#269;ne, pa su se savezi jo&#353; pro&#353;le godine dogovorili da ne prodaju karte svojim navija&#269;ima za gostovanje.<br /><i>03-09-2010. 19:23</i></p>', '<a href="http://www.sportske.net/vest/tenis/zimonjic-i-nestor-preokretom-do-treceg-kola-27967.html" target="_blank" title="Sportske.net - sve sportske vesti na jednom mestu!">Zimonji&#263; i Nestor preokretom do tre&#263;eg kola</a><p>Ziki i Nestor izgubili prvi set od Gonzalesa i Venture, ali uspeli da dobiju naredna dva i izbegnu ve&#263;e probleme u drugom kolu US Opena 6:7, 6:3, 6:1.<br /><i>03-09-2010. 18:24</i></p>', '<a href="http://www.sportske.net/vest/domaci-fudbal/ostala-je-tuga-27966.html" target="_blank" title="Sportske.net - sve sportske vesti na jednom mestu!">...ostala je tuga</a><p>Danas se navr&#353;ava &#269;etvrt veka od smrti Dragana Mancea, legendarnog napada&#269;a Partizana.<br /><i>03-09-2010. 18:09</i></p>', '<a href="http://www.sportske.net/vest/domaci-fudbal/bozja-ruka-i-dekijev-slobodnjak-za-2-0-posle-prvog-poluvremena-27965.html" target="_blank" title="Sportske.net - sve sportske vesti na jednom mestu!">&quot;Bo&#382;ja ruka&quot; i Dekijev slobodnjak za 2:0 posle prvog poluvremena</a><p>U Tor&#353;avnu protiv Farana, Srbija po&#269;inje svoj put prema Poljskoj i Ukrajini. Me&#269; prati oko hiljadu gledalaca, Srbija nametnula ofanzivu, a posle 15 minuta smo poveli sa 1:0, golom Lazovi&#263;a. Dodu&#353;e Jovanovi&#263; je igrao rukom, ali sudija nije primetio. Dejan Stankovi&#263; povisio iz slobodnjaka.<br /><i>03-09-2010. 18:00</i></p>', '<a href="http://www.sportske.net/vest/domaci-fudbal/kleo-dobija-pasos-27964.html" target="_blank" title="Sportske.net - sve sportske vesti na jednom mestu!">Kleo dobija paso&#353;?</a><p>MUP je saop&#353;tio da &#263;e ministar policije i potpredsednik srpske vlade sutra primiti Gabrijela Klea.<br /><i>03-09-2010. 17:48</i></p>', '<a href="http://www.sportske.net/" target="_blank">Sportske.net</a><p>Sve sportske vesti na jednom mestu!</p>'];
	
	this.tickerid 			= 'sportskeVerticalTicker';
	this.delay 				= 3000;
	this.mouseoverBol		= 0;
	this.hiddendivpointer	= 1;
	
	// write style
	document.write('<style>.sportskeVerticalTicker{width: 340px; height: 100px; border: 1px solid #009966; background-color: #FFFFFF; padding: 5px; font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #000000; text-align:left;} .sportskeVerticalTicker a{font-weight:bold; font-size: 11px; color: #000000; text-decoration:underline;} .sportskeVerticalTicker p{margin:0; padding:5px 0 5px 0; font-size: 10px;} .sportskeVerticalTicker p i{margin:0; padding-top:3px; font-weight:bold; font-size: 9px}</style>');
	
	// write divs
	document.write('<div id="'+ this.tickerid +'" class="sportskeVerticalTicker" style="position: relative; overflow: hidden"><div style="position: absolute; width: 100%" id="'+ this.tickerid + '1">' + this.content[0] + '</div><div style="position: absolute; width: 100%; visibility: hidden" id="'+ this.tickerid + '2">' + this.content[1] + '</div></div>');
	
	var scrollerinstance = this;
	
	
	if (window.addEventListener) //run onload in DOM2 browsers
	{
		window.addEventListener("load", function(){scrollerinstance.initialize()}, false);
	}
	else if (window.attachEvent) //run onload in IE5.5+
	{
		window.attachEvent("onload", function(){scrollerinstance.initialize()});
	}
	else if (document.getElementById) //if legacy DOM browsers, just start scroller after 0.5 sec
	{
		setTimeout(function(){scrollerinstance.initialize()}, 500);
	}
}


// -------------------------------------------------------------------
// initialize()- Initialize scroller method.
// -Get div objects, set initial positions, start up down animation
// -------------------------------------------------------------------

sportskePauseScroller.prototype.initialize = function()
{
	this.tickerdiv 		= document.getElementById(this.tickerid);
	this.visiblediv		= document.getElementById(this.tickerid+"1");
	this.hiddendiv		= document.getElementById(this.tickerid+"2");
	this.visibledivtop	= parseInt(sportskePauseScroller.getCSSpadding(this.tickerdiv));
	
	//set width of inner DIVs to outer DIV's width minus padding (padding assumed to be top padding x 2)
	this.visiblediv.style.width	= this.hiddendiv.style.width = this.tickerdiv.offsetWidth - (this.visibledivtop * 2) + "px";
	this.getinline(this.visiblediv, this.hiddendiv);
	this.hiddendiv.style.visibility = "visible";
	var scrollerinstance = this;
	document.getElementById(this.tickerid).onmouseover = function(){scrollerinstance.mouseoverBol = 1};
	document.getElementById(this.tickerid).onmouseout = function(){scrollerinstance.mouseoverBol = 0};

	if (window.attachEvent) //Clean up loose references in IE
	{
		window.attachEvent("onunload", function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null});
	}
	window.setTimeout(function(){scrollerinstance.animateup()}, this.delay);
}


// -------------------------------------------------------------------
// animateup()- Move the two inner divs of the scroller up and in sync
// -------------------------------------------------------------------

sportskePauseScroller.prototype.animateup = function()
{

var scrollerinstance = this;
	if (parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5))
	{
		this.visiblediv.style.top=parseInt(this.visiblediv.style.top) - 5 + "px";
		this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top) - 5 + "px";
		window.setTimeout(function(){scrollerinstance.animateup()}, 50);
	}
	else
	{
		this.getinline(this.hiddendiv, this.visiblediv);
		this.swapdivs();
		window.setTimeout(function(){scrollerinstance.setmessage()}, this.delay);
	}
}

// -------------------------------------------------------------------
// swapdivs()- Swap between which is the visible and which is the hidden div
// -------------------------------------------------------------------

sportskePauseScroller.prototype.swapdivs=function()
{
	var tempcontainer 	= this.visiblediv;
	this.visiblediv		= this.hiddendiv;
	this.hiddendiv		= tempcontainer;
}

sportskePauseScroller.prototype.getinline = function(div1, div2)
{
	div1.style.top = this.visibledivtop + "px";
	div2.style.top = Math.max(div1.parentNode.offsetHeight, div1.offsetHeight) + "px";
}

// -------------------------------------------------------------------
// setmessage()- Populate the hidden div with the next message before it's visible
// -------------------------------------------------------------------

sportskePauseScroller.prototype.setmessage=function()
{
	var scrollerinstance = this;
	if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
	{
		window.setTimeout(function(){scrollerinstance.setmessage()}, 100);
	}
	else
	{
		var i 					 = this.hiddendivpointer;
		var ceiling				 = this.content.length;
		this.hiddendivpointer	 = ((i + 1) > (ceiling - 1))? 0 : i+1;
		this.hiddendiv.innerHTML = this.content[this.hiddendivpointer];
		this.animateup();
	}
}

sportskePauseScroller.getCSSpadding = function(tickerobj)
{ 
	//get CSS padding value, if any
	if (tickerobj.currentStyle)
	{
		return tickerobj.currentStyle["paddingTop"];
	}
	else if (window.getComputedStyle) //if DOM2
	{
		return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top");
	}
	else
	{
		return 0;
	}
}

new sportskePauseScroller();
-->