// Copyright (C) 2005 Yves Combe
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, see .
//
// Utility file for anim.py to export gcompris anim in Mozilla SVG
var root;
var frames_total;
var frames_played;
var AnimItemlist;
var anim_running;
var step = 0;
// and
var base_stack=3;
var frame_delay = 250;
var fps = 4;
var time_base;
var next;
function init(){
root = document.getElementById("svgroot");
rate_text = document.getElementById("rate_text");
speed_text = document.getElementById("speed_text");
var elements;
AnimItemlist = new Array (); // Array of array !
var AnimItem ;
var frames_info;
var j;
var k;
var gc_frame, frame_attributs, gc_attr;
var i = 0;
while ( base_stack < root.childNodes.length ){
// this loop keeps node