function initTicker(theId,Step,Speed,Delay,Direction,Loop,Behavior){
if (document.getElementById){
var tck = document.getElementById(theId);
if (tck==null) return;
if (window.name.indexOf("__jeniaTemplate")>0) return null;
if (tck.news!=null) return;
if (tck.tick!=null && tck.tick!=0) clearTimeout(tck.tick);
if (tck.childNodes.length>0){
tck.actual=0;
tck.step=Step;
tck.speed=Speed;
tck.delay=Delay;
tck.direction=Direction;
tck.loop=Loop;
tck.loopIndex=0;
tck.behavior=Behavior;
tck.news=new Array();
k=0;
for (i=0; i<tck.childNodes.length;i++) {
if(tck.childNodes[i].tagName=='DIV'){
tck.news[k]=tck.childNodes[i];
tck.news[k].style.display="none";
tck.news[k].style.visibility="hidden";
tck.news[k].style.width="0%";
tck.news[k].style.height="0%";
if (tck.direction=='left'){
if (tck.clientWidth!=0) tck.news[k].style.left=tck.clientWidth+"px";
else tck.news[k].style.left=parseInt(tck.style.width)+"px";
}else if (tck.direction=='right'){
if (tck.news[k].childNodes[0].clientWidth!=0) tck.news[k].style.left=0-tck.news[k].childNodes[0].clientWidth+"px";
else tck.news[k].style.left=0-parseInt(tck.news[k].style.width)+"px";
}else if (tck.direction=='up'){
if (tck.clientHeight!=0) tck.news[k].style.top=tck.clientHeight+"px";
else tck.news[k].style.top=parseInt(tck.style.height)+"px";
}else if (tck.direction=='down'){
if (tck.news[k].childNodes[0].clientHeight!=0) tck.news[k].style.top=0-tck.news[k].childNodes[0].clientHeight+"px";
else tck.news[k].style.top=0-parseInt(tck.news[k].style.height)+"px";
}k++;}}
tck.news[tck.actual].style.display="block";
tck.news[tck.actual].style.visibility="visible";
rollTicker(theId);
if (tck.behavior!='slide'){
addEvent(tck, "mouseover", stopTickerEvent);
addEvent(tck, "mouseout", rollTickerEvent);}}}}
function rollTicker(theId) {
var tck = document.getElementById(theId);
if (tck==null) return;
if (tck.direction=='left')
tck.news[tck.actual].style.left=(parseInt(tck.news[tck.actual].style.left)-tck.step)+"px";
else if (tck.direction=='right')
tck.news[tck.actual].style.left=(parseInt(tck.news[tck.actual].style.left)+tck.step)+"px";
else if (tck.direction=='up')
tck.news[tck.actual].style.top=(parseInt(tck.news[tck.actual].style.top)-tck.step)+"px";
else if (tck.direction=='down')
tck.news[tck.actual].style.top=(parseInt(tck.news[tck.actual].style.top)+tck.step)+"px";
if ((tck.direction=='left' && parseInt(tck.news[tck.actual].style.left)==tck.clientWidth%tck.step) ||
(tck.direction=='right' && tck.clientWidth-parseInt(tck.news[tck.actual].style.left)-tck.news[tck.actual].childNodes[0].clientWidth<=tck.step && tck.clientWidth-parseInt(tck.news[tck.actual].style.left)-tck.news[tck.actual].childNodes[0].clientWidth>0) ||
(tck.direction=='up' && parseInt(tck.news[tck.actual].style.top)==tck.clientHeight%tck.step) ||
(tck.direction=='down' && tck.clientHeight-parseInt(tck.news[tck.actual].style.top)-tck.news[tck.actual].childNodes[0].clientHeight<=tck.step && tck.clientHeight-parseInt(tck.news[tck.actual].style.top)-tck.news[tck.actual].childNodes[0].clientHeight>0)){
if (tck.behavior=='slide'){
return; 
}else if (tck.behavior=='alternate'){
if (tck.direction=='left'){
tck.direction='right';
}else if (tck.direction=='right'){
tck.direction='left';
}else if (tck.direction=='up'){
tck.direction='down';
}else if (tck.direction=='down'){
tck.direction='up';} }
if (tck.tick!=null && tck.tick!=0) clearTimeout(tck.tick);
tck.tick = setTimeout("rollTicker('"+theId+"')",tck.delay);
}else{
if ((tck.direction=='left' && parseInt(tck.news[tck.actual].style.left)<=0-tck.news[tck.actual].childNodes[0].clientWidth) ||
(tck.direction=='right' && parseInt(tck.news[tck.actual].style.left)>=tck.clientWidth) ||
(tck.direction=='up' && parseInt(tck.news[tck.actual].style.top)<=0-tck.news[tck.actual].childNodes[0].clientHeight) ||
(tck.direction=='down' && parseInt(tck.news[tck.actual].style.top)>=tck.clientHeight)) {
tck.news[tck.actual].style.display="none";
tck.news[tck.actual].style.visibility="hidden";
tck.actual++;
if (tck.actual == tck.news.length){
tck.actual=0;
tck.loopIndex++;
if (tck.loop!=-1 && tck.loopIndex>=tck.loop){
removeEvent(tck,"mouseover",stopTickerEvent);
removeEvent(tck,"mouseout",rollTickerEvent);
return;}}
tck.news[tck.actual].style.display="block";
tck.news[tck.actual].style.visibility="visible";
if (tck.direction=='left')
tck.news[tck.actual].style.left=tck.clientWidth+"px";
else if (tck.direction=='right')
tck.news[tck.actual].style.left=tck.clientLeft-tck.news[tck.actual].childNodes[0].clientWidth+"px";
else if (tck.direction=='up')
tck.news[tck.actual].style.top=tck.clientHeight+"px";
else if (tck.direction=='down')
tck.news[tck.actual].style.top=tck.clientTop-tck.news[tck.actual].childNodes[0].clientHeight+"px";}
if (tck.tick!=null && tck.tick!=0) clearTimeout(tck.tick);
tck.tick = setTimeout("rollTicker('"+theId+"')",tck.speed);}}
function getTicker(TheEvent){
if(navigator.userAgent.indexOf("Gecko")>0){
var rel=TheEvent.target;
}else{
var rel=TheEvent.srcElement;}
while(rel){
if(rel.news!=null) break;
else rel=rel.parentNode;}
return rel;}
function stopTickerEvent(TheEvent){
tck=getTicker(TheEvent);
if (tck==null) return;
clearTimeout(tck.tick);}
function rollTickerEvent(TheEvent){
tck=getTicker(TheEvent);
if (tck==null) return;
rollTicker(tck.id);}
function addEvent(obj,evType,fn){
if (obj.addEventListener){
obj.addEventListener(evType, fn,true);
return true;
}else if (obj.attachEvent){
var r = obj.attachEvent("on"+evType,fn);
return r;
}else{return false;}}
function removeEvent(obj,evType,fn){
if (obj.removeEventListener){
obj.removeEventListener(evType,fn,true);
return true;
}else if (obj.detachEvent){
var r=obj.detachEvent("on"+evType,fn);
return r;
}else{return false;}}