// GlobeWeather 1.3.0  module - build 110225 - scrollingticker.js
// (c)2010-2011 INNATO BV - www.innato.nl
// ***************************************************************************
// GlobeWeather is a metar station weather fetching module for Joomla! 1.6/1.7
// @license - See LICENSE.txt
// ***************************************************************************
// Scrolling ticker javascript - scrollingticker.js
// (c)2011 INNATO BV - www.innato.nl
// @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
// @authorcode	gAk9geprut4uCaprEfrazemasPEWec3e
// @filecode	H76gtvrdXUdqNKt9mSoFj8OiKSKtEYKE
// ***************************************************************************

var IE_browser=document.all;var DOM_browser=document.getElementById;window.onload=scrollingticker_initialise;document.write('<style> '+'#divscrollingticker { '+'position: absolute;'+'width: 10000px;'+'height: '+scrollingticker_height_px+'px;'+'cursor: default;'+'overflow: hidden;'+'visibility: hidden;'+'} '+'.cssscrollingticker_container { '+'position: relative;'+'height: '+scrollingticker_height_px+'px;'+'margin-top: '+scrollingticker_margin_top_px+'px;'+'margin-bottom: '+scrollingticker_margin_bottom_px+'px;'+'} '+'.cssscrollingticker_content { '+'font-family: '+scrollingticker_font_family+';'+'font-size: '+scrollingticker_font_size_px+'px;'+'color: '+scrollingticker_font_colour+';'+'} '+'</style>');document.write('<div class="cssscrollingticker_container">'+'<div id="divscrollingticker" onMouseOver="scrollingticker_stop_ticker()" onMouseOut="scrollingticker_start_ticker()">');for(var i=0;i<scrollingticker_content_array.length;i++){document.write('<div id="divscrollingticker_content'+(i+1)+'" class="cssscrollingticker_content" '+'style="position:absolute; top:2px; white-space:nowrap">'+scrollingticker_content_array[i]+((scrollingticker_content_array.length>1)?' '+scrollingticker_separator+'&nbsp;':'')+'</div>');}document.write('</div></div>');function scrollingticker_get_obj(id){if(DOM_browser) return document.getElementById(id);else if(IE_browser)return document.all[id];else return false;}function scrollingticker_initialise(){if(!DOM_browser&&!IE_browser)return;for(var i=0;i<scrollingticker_content_array.length;i++) {scrollingticker_content_items[i]=new scrollingticker_object('divscrollingticker_content'+(i+1));}var obj=scrollingticker_get_obj('divscrollingticker');if(scrollingticker_width_px!=0) {obj.style.width=scrollingticker_width_px+'px';}else{scrollingticker_width_px=150;obj.style.width='100%';}obj.style.visibility='visible';scrollingticker_start_ticker(true);}function scrollingticker_next_content_item(){if(!DOM_browser&&!IE_browser)return;var obj=scrollingticker_content_items[scrollingticker_index];if(!obj.move){obj.x=scrollingticker_width_px;obj.css.left=scrollingticker_width_px+'px';obj.move=true;}}function scrollingticker_object(id){this.elem=scrollingticker_get_obj(id);this.width=this.elem.offsetWidth;this.x=scrollingticker_width_px;this.css=this.elem.style;this.css.width=this.width+'px';this.css.left=this.x+'px';this.move=false;return this;}function scrollingticker_reload_ticker(){if(!DOM_browser&&!IE_browser)return;document.location.reload();}function scrollingticker_shift_content_items(){if(!DOM_browser&&!IE_browser)return;for(var i=0;i<scrollingticker_content_items.length;i++) {if(scrollingticker_content_items[i].move){if(scrollingticker_content_items[i].x>-scrollingticker_content_items[i].width){scrollingticker_content_items[i].x-=2;scrollingticker_content_items[i].css.left=scrollingticker_content_items[i].x+'px';}else scrollingticker_content_items[i].move=false;}}if(scrollingticker_content_items[scrollingticker_index].x+scrollingticker_content_items[scrollingticker_index].width<=scrollingticker_width_px){scrollingticker_index++;if(scrollingticker_index>=scrollingticker_content_items.length) scrollingticker_index=0;scrollingticker_next_content_item();}}function scrollingticker_start_ticker(init){if(!DOM_browser&&!IE_browser)return;if(scrollingticker_bg_colour){var obj=scrollingticker_get_obj('divscrollingticker');obj.style.backgroundColor=scrollingticker_bg_colour;}if(init){scrollingticker_index=0;scrollingticker_next_content_item();}scrollingticker_interval=setInterval('scrollingticker_shift_content_items()',scrollingticker_scroll_interval);}function scrollingticker_stop_ticker(){if(!DOM_browser&&!IE_browser)return;clearInterval(scrollingticker_interval);if(scrollingticker_mouseover_colour){var obj=scrollingticker_get_obj('divscrollingticker');obj.style.backgroundColor=scrollingticker_mouseover_colour;}}
