    
   // denne variabelen inneholder id til forrige flip som ble "slått på"
  var current = 0;
  var current2 = 0;

  // id = "name" (omraade)
  // 01 = "fargemagi", 02 = "interior", 03 = "eksterior", 04 = "det offentlige rom"	(hovedmeny)
  // 05 = "info", 06 = "gjor det selv", 07 = "lar mer om", 08 = "lenker"		(høyremeny)
  // 21 = nyhet, 22 = Trend, 23 = Tips TV2, 24 = Pressepakker, 25 = Kalender, 26 = kortnytt	(venstre meny)

  // slå på ny flip, og slå av forrige (hvis noen)

  function on(id) 
  {
    if (preview != 1)
    {
      if ((id>0 && id<=4) || (id>=21 && id<31))
      {
        document.getElementById('flip' + id).setAttribute('src', 'doc/img/flip_on' + id + '.gif');
        if (top.FrameMiddle.on) top.FrameMiddle.on(id);
      }
    }
  }
  // slå på ny flip, og slå av forrige (hvis noen)
  function on2(id) 
  {
    if (preview != 1)
    {
      document.getElementById('flip' + id).setAttribute('src', 'doc/img/flip_on' + id + '.gif');
      if (top.FrameRight.on) top.FrameRight.on(id);
    }
  }
  // variant med relativ path
  function on_rp(id, relPath) 
  {
    if (preview != 1)
    {
      if ((id>0 && id<=4) || (id>=21 && id<31))
      {
        document.getElementById('flip' + id).setAttribute('src', relPath + 'doc/img/flip_on' + id + '.gif');
        if (top.FrameMiddle.on) top.FrameMiddle.on(id);
      }
    }
  }
  
  // slå av flip
  function off(id) 
  {
    if (preview != 1)
    {
      if ((id>0 && id<=4) || (id>=21 && id<31))
      {
        if (id != 0 && id != current) 
        {
            document.getElementById('flip' + id).setAttribute('src', 'doc/img/flip_off' + id + '.gif');
            if (top.FrameMiddle.off)top.FrameMiddle.off(id);
        }
      }
    }
  }

  // slå av flip
  function off2(id) 
  {
    if (preview != 1)
    {
      if (id != 0 && id != current2) 
      {
        document.getElementById('flip' + id).setAttribute('src', 'doc/img/flip_off' + id + '.gif');
        if (top.FrameRight.off)top.FrameRight.off(id);
      }
    }
  }

  // variant med relaitiv path
  function off_rp(id, relPath) 
  {
    if (preview != 1)
    {
      if ((id>0 && id<=4) || (id>=21 && id<31))
      {
        if (id != 0 && id != current) 
        {
            document.getElementById('flip' + id).setAttribute('src', relPath + 'doc/img/flip_off' + id + '.gif');
            if (top.FrameMiddle.off)top.FrameMiddle.off(id);
        }
      }
    }
  }
  
  // valgt flip forblir valgt
  function sticky(id) 
  {
    if (preview != 1)
    {
      if (current != id) 
      {
        temp = current;
        current = 0;
        off(temp);
        if (top.FrameMiddle.off)top.FrameMiddle.off(temp);
        current = id;
      }
    }
  }
  
  // valgt flip forblir valgt
  function sticky2(id) 
  {
    if (preview != 1)
    {
      if (current2 != id) 
      {
        temp2 = current2;
        current2 = 0;
        off2(temp2);
        if (top.FrameRight.off)top.FrameRight.off(temp2);
        current2 = id;
      }
    }
  }
  
   //rollover-script for nyheter, trender og tipstv2
   function imageSwapOn(imageID) 
   {
     if (preview != 1)
       document.getElementById(imageID).setAttribute('src', 'doc/img/arkiv_' + imageID + '_on.gif');
   }
   
   function imageSwapOff(imageID) 
   {
     if (preview != 1)
       document.getElementById(imageID).setAttribute('src', 'doc/img/arkiv_' + imageID + '_off.gif');
   }
 
