function open_function(url,width,height,options) { 
	self.msgWindow = open(url, "Window", "width=" + width + ",height=" + height + ",screenX=" + (screen.width-width)/2 + ",screenY=" + (screen.height-height)/2 + ",dependent=yes" + ",left=" + (screen.width-width)/2 + ",top=" + (screen.height-height)/2 + options );
	if (self.msgWindow) { 
		self.msgWindow.focus();
		if (self.msgWindow.opener == null) self.msgWindow.opener = self;
	}
}

function get_url (url, k0 ,v0 ,k1 ,v1 ,k2 ,v2 ,k3 ,v3 ,k4 ,v4 ) { 
	if (k0 && v0) url += "?" + k0 + "=" + escape(v0); if (k1 && v1) url += "&" + k1 + "=" + escape(v1); 
	if (k2 && v2) url += "&" + k2 + "=" + escape(v2); if (k3 && v3) url += "&" + k3 + "=" + escape(v3);
	if (k4 && v4) url += "&" + k4 + "=" + escape(v4); 
	return url;
}

function toggleMenu(el) {
	if($(el)) $(el).toggleClassName('over');
}

function openTeaser(id) {
	if($(id) && id!=openedTeaser){
new Effect.Parallel([
  new Effect.BlindUp(openedTeaser, { sync: true }), 
  new Effect.BlindDown(id, { sync: true }) 
], { 
  duration: 0.2,
  delay: 0,
  afterFinish:function(){ openedTeaser=id; }
});


/*		new Effect.toggle(id,'blind',{duration:0.8,delay:0,queue:'start',afterFinish:function(){ openedTeaser=id; }});
		$$('.socialteaser').each(function(n,i) {
		     if(n.id!=id) new Effect.BlindUp(n,{duration:0.2,delay:0,queue:'end' });
		});
*/
   	}
	return false;
}


var openedTeaser;

var Metanavigat;

Event.observe(window, 'load', function() {

	if($('socialteaserholder')){
		new Effect.BlindDown($$('.socialteaser')[0],{ 
			duration: 0.5,
			afterFinish:function(){
				openedTeaser=$$('.socialteaser')[0].id;
			}
		});
	}
	
	var al = $$('#Metanavigation a').each(function(n,i) {
		if(!n) return false;
		title = n.title;
		if(!$(n.id+'_A')){
			var element = Builder.node('div', { id: n.id+'_A', className:'Metanavigation_Info',style:'display:none' },[title]);
			$('pageregionTop').appendChild(element);
		}
		Event.observe(n,'mouseover',function(){			
			new Effect.Appear(n.id+'_A',{delay:0,duration:0.5,beforeStart:function(){
				$('Metanavigation_FR_A').hide();
				$('Metanavigation_SA_A').hide();
			}});

		});
		Event.observe(n,'mouseout',function(){
			$(n.id+'_A').hide();
		});
		return n;
	
	});
	
	new Effect.Appear('Metanavigation_SA_A',{delay:0,duration:0.5,queue:'front',afterFinish:function(){ $('Metanavigation_SA_A').hide() }});
	new Effect.Appear('Metanavigation_FR_A',{delay:0,duration:0.5,queue:'end',afterFinish:function(){ $('Metanavigation_FR_A').hide() }});

	
});


var jar = new CookieJar({
expires:3600, // seconds
path: '/'
});
