// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

function display_demo_form(from){
  $('reg_div').show();
  $('contact_from').value = from;
  new Effect.ScrollTo('header',{duration:0.5});
  if ($('video_div')){
    $('video_div').hide();
  }
}

function affiche_screenshot(numero){
  $$('div.imgview').each(function(e){e.hide();});
  $$('ul#linklist li a').each(function(e){e.className="";});
  $('screenshot_'+numero).show();
  $('lien_'+numero).className="active_link";
}

function dialog_stuff(quoi, type_de_contact, from){
  $('contact_from').value = from;
  $('dialog_video').hide();
  $('dialog_contact').hide();
  $('req_demo').hide();
  $('req_contact').hide();
  if(type_de_contact == 'demo') $('req_demo').show();
  else $('req_contact').show();
  if(quoi == 'video') $('dialog_video').show();
  if(quoi == 'contact') $('dialog_contact').show();
  if(window.innerHeight){ h_win = window.innerHeight } else {h_win = document.documentElement.clientHeight;}
  if(window.pageYOffset){scroll_win = window.pageYOffset } else {scroll_win = document.documentElement.scrollTop;}
  $('dialog').style.top = (( h_win - 650) / 2) + scroll_win +'px';
  $('dialog').appear({ duration: 0.3 });
}

