go_to = "solutions-internet/";

// number of days cookie lives for
num_days = 60;
function ged(noDays){
    var today = new Date();
    var expr = new Date(today.getTime() + noDays*24*60*60*1000);
    return  expr.toGMTString();
}

function readCookie(cookieName){
    var start = document.cookie.indexOf(cookieName);
    if (start == -1){ 
        document.cookie = "seenit=yes; expires=" + ged(num_days);
    } else {
        window.location = go_to;
    }
}

readCookie("seenit");

function GSI_goToURL() { 
  var i, args=GSI_goToURL.arguments; document.GSI_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function GSI_timelinePlay(tmLnName, myID) { 
  var i,j,tmLn,props,keyFrm,sprite,numKeyFr,firstKeyFr,propNum,theObj,firstTime=false;
  if (document.GSI_Time == null) GSI_initTimelines(); 
  tmLn = document.GSI_Time[tmLnName];
  if (myID == null) { myID = ++tmLn.ID; firstTime=true;}
  if (myID == tmLn.ID) { //if Im newest
    setTimeout('GSI_timelinePlay("'+tmLnName+'",'+myID+')',tmLn.delay);
    fNew = ++tmLn.curFrame;
    for (i=0; i<tmLn.length; i++) {
      sprite = tmLn[i];
      if (sprite.charAt(0) == 's') {
        if (sprite.obj) {
          numKeyFr = sprite.keyFrames.length; firstKeyFr = sprite.keyFrames[0];
          if (fNew >= firstKeyFr && fNew <= sprite.keyFrames[numKeyFr-1]) {
            keyFrm=1;
            for (j=0; j<sprite.values.length; j++) {
              props = sprite.values[j]; 
              if (numKeyFr != props.length) {
                if (props.prop2 == null) sprite.obj[props.prop] = props[fNew-firstKeyFr];
                else        sprite.obj[props.prop2][props.prop] = props[fNew-firstKeyFr];
              } else {
                while (keyFrm<numKeyFr && fNew>=sprite.keyFrames[keyFrm]) keyFrm++;
                if (firstTime || fNew==sprite.keyFrames[keyFrm-1]) {
                  if (props.prop2 == null) sprite.obj[props.prop] = props[keyFrm-1];
                  else        sprite.obj[props.prop2][props.prop] = props[keyFrm-1];
        } } } } }
      } else if (sprite.charAt(0)=='b' && fNew == sprite.frame) eval(sprite.value);
      if (fNew > tmLn.lastFrame) tmLn.ID = 0;
  } }
}

function GSI_initTimelines() { 
    var ns = navigator.appName == "Netscape";
    var ns4 = (ns && parseInt(navigator.appVersion) == 4);
    var ns5 = (ns && parseInt(navigator.appVersion) > 4);
    var macIE5 = (navigator.platform ? (navigator.platform == "MacPPC") : false) && (navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4);
    document.GSI_Time = new Array(1);
    document.GSI_Time[0] = new Array(1);
    document.GSI_Time["Timeline1"] = document.GSI_Time[0];
    document.GSI_Time[0].GSI_Name = "Timeline1";
    document.GSI_Time[0].fps = 15;
    document.GSI_Time[0][0] = new String("behavior");
    document.GSI_Time[0][0].frame = 450;
    document.GSI_Time[0][0].value = "GSI_goToURL('parent','http://www.gelauff.fr/solutions-internet/')";
    document.GSI_Time[0].lastFrame = 450;
    for (i=0; i<document.GSI_Time.length; i++) {
        document.GSI_Time[i].ID = null;
        document.GSI_Time[i].curFrame = 0;
        document.GSI_Time[i].delay = 1000/document.GSI_Time[i].fps;
    }
}