<!-- 
/***********************************************
 * 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/binic-trazimo-samo-da-se-postuju-pravila-igre-25862.html" target="_blank" title="Sportske.net - sve sportske vesti na jednom mestu!">Bini&#263;: &#039;&#039;Tra&#382;imo samo da se po&#353;tuju pravila igre&#039;&#039;</a><p>U Napretku ne gube nadu da &#263;e se i naredne sezone takmi&#269;iti u Superligi, iako je vremena do njenog po&#269;etka sve manje.<br /><i>29-07-2010. 18:52</i></p>', '<a href="http://www.sportske.net/vest/domaci-fudbal/stojic-kaludjerovic-bi-se-u-zvezdi-nadavao-golova-25861.html" target="_blank" title="Sportske.net - sve sportske vesti na jednom mestu!">Stoji&#263;: &#039;&#039;Kalu&#273;erovi&#263; bi se u Zvezdi nadavao golova&#039;&#039;</a><p>Transfer Andrije Kalu&#273;erovi&#263;a u Crvenu zvezdu i dalje je neizvestan, a prvi &#269;ovek Rada veruje da bi on bio pravo re&#353;enje za napad crveno-belih.<br /><i>29-07-2010. 18:40</i></p>', '<a href="http://www.sportske.net/vest/domaci-fudbal/mateus-uvek-cu-biti-tu-za-partizan-25860.html" target="_blank" title="Sportske.net - sve sportske vesti na jednom mestu!">Mateus: &#039;&#039;Uvek &#263;u biti tu za Partizan&#039;&#039;</a><p>Legendarni nema&#269;ki fudbaler i trener koji je sa Partizanom ostvario najve&#263;i uspeh u trenerskoj karijeri, evocirao je uspomene na period od pre sedam godina kada je sa crno-belima bio u&#269;esnik Lige &#353;ampiona. Posle sino&#263;nje utakmice izme&#273;u Partizana i Helsinkija naglasio da ima ose&#263;aj kao da nije ni odlazio iz Humske.<br /><i>29-07-2010. 18:20</i></p>', '<a href="http://www.sportske.net/vest/medjunarodni-fudbal/mafija-drzi-rodjenog-brata-dmitra-berbatova-25859.html" target="_blank" title="Sportske.net - sve sportske vesti na jednom mestu!">Mafija dr&#382;i ro&#273;enog brata Dmitra Berbatova?</a><p>Asen Berbatov nestao pre mesec dana, sumnja se da je otet. I sam je optu&#382;ivan za veze sa gangsterima, a pri&#269;a se da je u ogromnim dugovima.<br /><i>29-07-2010. 18:20</i></p>', '<a href="http://www.sportske.net/vest/tenis/ocekivano-za-finale-u-areni-25858.html" target="_blank" title="Sportske.net - sve sportske vesti na jednom mestu!">O&#269;ekivano - za finale u Areni</a><p>&#268;esi sti&#382;u u septembru u Arenu, podloga Rukort srednje brzine.<br /><i>29-07-2010. 17:57</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: 220px; height: 160px; border: 1px solid #000000; background-color: #F0F0F0; 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();
-->