<?php // no direct access
defined('_JEXEC') or die('Restricted access'); ?>
<!-- medienstroeme.de - Simple Mooticker v.1.5.3 - starts here -->
<script language="JavaScript" type="text/javascript">
//<![CDATA[
var mooquee = new Class({
    initialize: function(element, options) {
		this.setOptions({
			marHeight: '<?php echo $params->get( 'th' ); ?><?php echo $params->get( 'unityh' ); ?>',
			marWidth: '<?php echo $params->get( 'tw' ); ?><?php echo $params->get( 'unityw' ); ?>',
			steps: <?php echo $params->get( 'tstp' ); ?>,
			speed: 10,
			direction: '<?php echo $params->get( 'tdir' ); ?>',
			pauseOnOver: true
	    }, options);
	    this.timer = null;
	    this.textElement = null;
	    this.mooqueeElement = element;	    	    
	    this.constructMooquee();
	},
	constructMooquee: function() {
		var el = this.mooqueeElement;
		el.setStyles({
		    'width' : this.options.marWidth
		    ,'height' : this.options.marHeight		    
		});
		this.textElement = new Element('div',{
		    'class' : 'mooquee-text'
		    ,'id' : 'mooquee-text'
		}).setHTML(el.innerHTML);
		el.setHTML('');
		this.textElement.injectInside(el);
		this.textElement = $('mooquee-text');
		(this.options.direction == 'left') ?  this.textElement.setStyle('left', ( -1 * this.textElement.getCoordinates().width.toInt())) : this.textElement.setStyle('left', el.getCoordinates().width.toInt());
		if(this.options.pauseOnOver){this.addMouseEvents();}
		//start marquee
		this.timer = this.startMooquee.delay(this.options.speed, this);
	},
	addMouseEvents : function(){
	    this.textElement.addEvents({
	        'mouseenter' : function(me){
	            this.clearTimer();
	        }.bind(this),
	        'mouseleave' : function(me){
	            this.timer = this.startMooquee.delay(this.options.speed, this);
	        }.bind(this)
	    });
	},
    startMooquee: function(){
        var pos = this.textElement.getStyle('left').toInt();
        this.textElement.setStyle('left', ( pos + ((this.options.direction == 'left') ? -1 * (this.options.steps) : this.options.steps)) + 'px');
        this.checkEnd(pos);
        this.timer = this.startMooquee.delay(this.options.speed, this);        
    },

    clearTimer: function(){
        $clear(this.timer);
    },
    checkEnd: function(pos){
        if(this.options.direction == 'left'){
            if(pos < -1 * (this.textElement.getCoordinates().width.toInt())){
                this.textElement.setStyle('left', this.mooqueeElement.getCoordinates().width);
            }
        }
        else{
            if(pos > this.mooqueeElement.getCoordinates().width.toInt()){
                this.textElement.setStyle('left', -1 * (this.textElement.getCoordinates().width.toInt()) );                
            }
        }        
    }
});
mooquee.implement(new Options);
//]]>
</script>
<?php if($tccm == 1) : ?>
<script language="JavaScript" type="text/javascript">
//<![CDATA[
document.write (' <div id="<?php echo $params->get( 'tfli' ); ?>" style="position:relative;overflow:hidden;white-space:nowrap;width:<?php echo $params->get( 'tw' ); ?><?php echo $params->get( 'unityw' ); ?>;min-width:<?php echo $params->get( 'tw' ); ?><?php echo $params->get( 'unityw' ); ?>;height:<?php echo $params->get( 'th' ); ?><?php echo $params->get( 'unityh' ); ?>;line-height:<?php echo $params->get( 'th' ); ?><?php echo $params->get( 'unityh' ); ?>;font-family:<?php echo $params->get( 'tff' ); ?>;font-size:<?php echo $params->get( 'tfs' ); ?><?php echo $params->get( 'unityfs' ); ?>;color:<?php echo $params->get( 'tfc' ); ?>;font-weight:<?php echo $params->get( 'tfw' ); ?>;font-variant:<?php echo $params->get( 'tfv' ); ?>;text-transform:<?php echo $params->get( 'ttt' ); ?>;letter-spacing:<?php echo $params->get( 'tls' ); ?><?php echo $params->get( 'unityls' ); ?>;border:<?php echo $params->get( 'tbst' ); ?> <?php echo $params->get( 'tbw' ); ?>px <?php echo $params->get( 'tbc' ); ?>;background-color:<?php echo $params->get( 'tbg' ); ?>;"><?php echo $params->get( 'tcc' ); ?><\/div> ');
//]]>
</script>
<?php else : ?>
<script language="JavaScript" type="text/javascript">
//<![CDATA[
document.write (' <div id="<?php echo $params->get( 'tfli' ); ?>" style="position:relative;overflow:hidden;white-space:nowrap;width:<?php echo $params->get( 'tw' ); ?><?php echo $params->get( 'unityw' ); ?>;min-width:<?php echo $params->get( 'tw' ); ?><?php echo $params->get( 'unityw' ); ?>;height:<?php echo $params->get( 'th' ); ?><?php echo $params->get( 'unityh' ); ?>;line-height:<?php echo $params->get( 'th' ); ?><?php echo $params->get( 'unityh' ); ?>;font-family:<?php echo $params->get( 'tff' ); ?>;font-size:<?php echo $params->get( 'tfs' ); ?><?php echo $params->get( 'unityfs' ); ?>;color:<?php echo $params->get( 'tfc' ); ?>;font-weight:<?php echo $params->get( 'tfw' ); ?>;font-variant:<?php echo $params->get( 'tfv' ); ?>;text-transform:<?php echo $params->get( 'ttt' ); ?>;letter-spacing:<?php echo $params->get( 'tls' ); ?><?php echo $params->get( 'unityls' ); ?>;border:<?php echo $params->get( 'tbst' ); ?> <?php echo $params->get( 'tbw' ); ?>px <?php echo $params->get( 'tbc' ); ?>;background-color:<?php echo $params->get( 'tbg' ); ?>;"><?php echo $params->get( 'separator' ); ?> <?php foreach ($list as $item) :  ?><a style="color:<?php echo $params->get( 'tfc' ); ?>" href="<?php echo $item->link; ?>" title="<?php echo $item->text; ?>"><?php echo $item->text; ?><\/a> <?php echo $params->get( 'separator' ); ?> <?php endforeach; ?><\/div> ');
//]]>
</script>
<?php endif ?>

       <script language="JavaScript" type="text/javascript">
	   //<![CDATA[
			var obj;
			function startMooquee() {
			obj = new mooquee($('<?php echo $params->get( 'tfli' ); ?>'));
			}
			window.onDomReady(startMooquee);
		//]]>
        </script>

<noscript>
<div class="<?php echo $params->get( 'tfli' ); ?>" style="position:relative;overflow:hidden;white-space:nowrap;width:<?php echo $params->get( 'tw' ); ?><?php echo $params->get( 'unityw' ); ?>;height:<?php echo $params->get( 'th' ); ?><?php echo $params->get( 'unityh' ); ?>;line-height:<?php echo $params->get( 'th' ); ?><?php echo $params->get( 'unityh' ); ?>;font-family:<?php echo $params->get( 'tff' ); ?>;font-size:<?php echo $params->get( 'tfs' ); ?><?php echo $params->get( 'unityfs' ); ?>;color:<?php echo $params->get( 'tfc' ); ?>;font-weight:<?php echo $params->get( 'tfw' ); ?>;font-variant:<?php echo $params->get( 'tfv' ); ?>;text-transform:<?php echo $params->get( 'ttt' ); ?>;text-align:<?php echo $params->get( 'tta' ); ?>;letter-spacing:<?php echo $params->get( 'tls' ); ?><?php echo $params->get( 'unityls' ); ?>;border:<?php echo $params->get( 'tbst' ); ?> <?php echo $params->get( 'tbw' ); ?>px <?php echo $params->get( 'tbc' ); ?>;background-color:<?php echo $params->get( 'tbg' ); ?>;"><?php echo $params->get( 'tns' ); ?></div>
</noscript>
<!-- medienstroeme.de - Simple Mooticker v.1.5.3 - ends here -->