function insert_video(id, src) { var elt = new Element('video', {width:320, height:240, controls:'controls'})
elt.insert('<source src="'+ src +'" type="video/mp4" /><source src="'+ src.replace('mp4', 'ogg') +'" type="video/ogg" />Your browser does not support the video tag.')
elt.insert('<object src="http://blip.tv/play/AYGLzBmU8hw" type="application/x-shockwave-flash" width="320" height="240" allowscriptaccess="always" allowfullscreen="true"/>')
if ($(id)) { $(id).insert(elt) } };function make_caroussel(id) { if ($(id)){
  var i = 1;
  $(id).select('TH').each(function(th) {
    th.addClassName('elt'+i); i += 1;
    th.observe('click', function(evt) {
      caroussel_select(id,this.className)
    })
  })
  $(id).down('TD').setAttribute('rowspan', i-1)
  i = 1;
  $(id).select('LI').each(function(li) {
    li.hide()
    li.addClassName('elt'+i); i += 1; 
  })
  caroussel_select(id,'elt1')
  setInterval(function() {caroussel_select(id)}, 8000)
} };document.observe('dom:loaded', function() {make_caroussel('caroussel')});function caroussel_select(id,kl) { if ($(id)) {
var th_sel = $(id).down('TH.selected') 
if (th_sel) {
  th_sel.removeClassName('selected')
}
$(id).select('LI').each(Element.hide)
if (!kl) {
  var kl0 = th_sel.className
  kl = 'elt' + (new Number(kl0.replace('elt', '')) + 1)
  if (!$(id).down('LI.'+kl)) {
    kl = 'elt1'
  }
}
$(id).down('LI.'+kl).show()
$(id).down('TH.'+kl).addClassName('selected')
} };function setCookie(name,value,expires,path,domain,secure) { var curCookie=name+"="+escape(value)+((expires)?"; expires="+expires.toGMTString():"")+
((path)?"; path="+path:"")+((domain)?"; domain="+domain:"")+((secure)?"; secure":"");
document.cookie=curCookie;
return document.cookie.indexOf(name)!=-1; };function setLanguage(lg) { setCookie('lang',lg,false,'/')
document.location.reload() };function setSizes() { var c = $('content')
if (c) {
  c.up().setStyle({height:(c.getHeight()+'px')})
} };document.observe('dom:loaded', function() {setSizes()});Event.observe(window, 'load', function() {setSizes()});function cycle_slider() { var d = 0.5; // duration
var cur = $('slider').down('LI.current')
var nex = cur.next() || $('slider').down('LI.slide')
nex.addClassName('current')
setTimeout(function() {cur.removeClassName('current')}, d*1000)
new Effect.Appear(nex, { duration: d, from: 0.0, to: 1.0 })
new Effect.Appear(cur, { duration: d, from: 1.0, to: 0.0}) };Event.observe(window, 'load', function() {if ($$('#slider LI.slide').length > 1) {setInterval('cycle_slider()', 7000)};});
