			var Ticker = new Class({
				setOptions: function(options) {
					this.options = Object.extend({
						speed: 1500,
						delay: 5000,
						direction: 'vertical',
						onComplete: Class.empty,
						onStart: Class.empty
					}, options || {});
				},
				initialize: function(el,options){
					this.setOptions(options);
					this.el = $(el);
					this.items = this.el.getElements('li');
					var w = 0;
					var h = 0;
					if(this.options.direction.toLowerCase()=='horizontal') {
						h = this.el.getSize().y;
						this.items.each(function(li,index) {
							w += li.getSize().x;
						});
					} else {
						w = this.el.getSize().x;
						this.items.each(function(li,index) {
							h += li.getSize().y;
						});
					}
					this.el.setStyles({
						position: 'absolute',
						top: 0,
						left: 0,
						width: w,
						height: h
					});
					this.fx = new Fx.Morph(this.el,{duration:this.options.speed,onComplete:function() {
						var i = (this.current==0)?this.items.length:this.current;
						this.items[i-1].injectInside(this.el);
						this.el.setStyles({
							left:0,
							top:0
						});
					}.bind(this)});
					this.current = 0;
					this.next();
				},
				pause: function() {
					$clear(mytimer);
					mytimer = null;},
					resume: function() {
					if (mytimer == null) {
					this.next();}},
				next: function() {
					this.current++;
					if (this.current >= this.items.length) this.current = 0;
					var pos = this.items[this.current];
					this.fx.start({
						top: -pos.offsetTop,
						left: -pos.offsetLeft
					});
					mytimer = this.next.bind(this).delay(this.options.delay+this.options.speed);
				}
			});

var map = null;
var point = null;

function dhtmlLoadScript(url)
{
   var e = document.createElement("script");
   e.src = url;
   e.type="text/javascript";
   document.getElementsByTagName("head")[0].appendChild(e); 
}

function dhtmlLoadCSS(url)
{
   var e = document.createElement("link");
   e.href = url;
   e.rel = 'stylesheet';
   e.type="text/css";
   document.getElementsByTagName("head")[0].appendChild(e); 
}


function mapload(id, x, y){
    if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById(id));
        map.clearOverlays();
        map.addControl(new GSmallMapControl());
        point = new GLatLng(x, y);
        map.setCenter(point, 14);
        var text = "";
        var pnt = new GLatLng(x, y);
        map.addOverlay(createMarker(pnt, text));
    }
}

function createMarker(point, text){
    var marker = new GMarker(point);
    return marker;
}

var loadMap = function() {
	mapload('map1', 46.17210410402465, 8.796272277832031);
	mapload('map2', 46.36055296796753, 8.9703369140625);
}

window.addEvent('domready',function(){ 

	try {
		if ($('flashbox')) {
			var rand_no = Math.floor(Math.random()*3)+1;
			swfobject.embedSWF("/files/flash/home_animation"+rand_no+".swf", "flashbox", "960", "255", "8");		
		}
	} catch(e) {}

	var add = 0;
	if (Browser.Engine.gecko) {add = -21;}
	
	try {
		$('right_adv').setStyle('height', ($('column_main').getSize().y + add)+'px');
	} catch(e) {}

	try {
		$('loginbox').addEvent('click', function(e) { $('loginint').setStyle('display', 'block'); });
	} catch(e) {}
	
	
	try {
		map = $$('.gmaps');
		if (map.length > 0) {
			dhtmlLoadScript('/lib/tvimaps.js.php');	
		}
	} catch(e) {}


});	
