//window.onerror=handle_error;function handle_error(){return true;}

function MM_openBrWindow(theURL,winName,features) { 
  window.open(theURL,winName,features);
}


var slideShowSpeed = 6000
var slideShowSpeed2 = 3000
var crossFadeDuration = 3

var t;
var p = Pic.length;
var p2 = Pic2.length;
var nbimg = 13;
var i = 0;

var preLoad = new Array();
for (i = 0; i < p; i++){
   preLoad[i] = new Image();}
preLoad[0].src = Pic[0];
   
var preLoad2 = new Array();
for (i = 0; i < p2; i++){
   preLoad2[i] = new Image();}
   
window.onresize=loadAgain;var loaded=false;var winSize=0;var winHeight=0;

function loadAgain(){if(loaded)window.location.reload();};var sTestW=false;var sTestH=false;var agt=navigator.userAgent.toLowerCase();if((navigator.appName=="Netscape")&&(agt.indexOf("opera")==-1)&&(agt.indexOf("hotjava")==-1)&&(parseInt(navigator.appVersion)>=3)&&navigator.javaEnabled());{if(parseInt(navigator.appVersion)>=4){tksWidth ="Anv&auml;nds av Netscape 3";tksHeight="Anv&auml;nds av Netscape 3";}else{var toolkit=java.awt.Toolkit.getDefaultToolkit();var screen_size=toolkit.getScreenSize();tksWidth=screen_size.width;tksHeight=screen_size.height;winSize=tksWidth;sTestW=tksWidth;sTestH=tksHeight;}}    
   
function resizeH(){document.getElementById("Headerimg").style.width=document.body.clientWidth;}

function runSlideShow(){
   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=2)"
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow.filters.blendTrans.Apply()          
   }
   document.images.SlideShow.src = preLoad[j].src
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play();
   }
   document.getElementById('didas').innerHTML= Did[j];
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed);
   for (i = 1; i < p; i++){preLoad[i].src = Pic[i];}
}

function runSlideShow2(){
   document.getElementById('didas2').innerHTML= Did2[0];
   preLoad2[0].src = Pic2[0];
   t = setTimeout('runSlideShow3()', slideShowSpeed2)
}

function runSlideShow3(){
   if (document.all){
      document.images.SlideShow2.style.filter="blendTrans(duration=2)"
      document.images.SlideShow2.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow2.filters.blendTrans.Apply()          
   }
   document.images.SlideShow2.src = preLoad2[j2].src
   if (document.all){
      document.images.SlideShow2.filters.blendTrans.Play();
   }
   document.getElementById('didas2').innerHTML= Did2[j2];
   j2 = j2 + 1
   if (j2 > (p2-1)) j2=0
   t = setTimeout('runSlideShow3()', slideShowSpeed)
   for (i = 1; i < p2; i++){preLoad2[i].src = Pic2[i];}
 }






var soc, clrRGB, TimerID, i, k, begred, beggreen, begblue, endred, endblue, endgreen, aveblue, avegreen, avered, k2, beg, end;

function RT_colorIt()
{
  beg = "1b4e9f"; // beginning color
  end = "ffffff"; // ending color
  i   = 20; // number of color change in each period (Default = 25)
  soc = 50; // speed of change (Default = 50)

  // no change after this line
  k2  = 0;
  k   = 0;

  // parse the input strings for color information
  begred    = parseInt(beg.substring(0,2),16);
  beggreen  = parseInt(beg.substring(2,4),16);
  begblue   = parseInt(beg.substring(4,6),16);

  endred    = parseInt(end.substring(0,2),16);
  endgreen  = parseInt(end.substring(2,4),16);
  endblue   = parseInt(end.substring(4,6),16);

  // determine size of step
  aveblue   = (endblue-begblue)/i;
  avegreen  = (endgreen-beggreen)/i;
  avered    = (endred-begred)/i;

  // animation
  TimerID  = setInterval("RT_colorMe()", soc);
}

function RT_colorMe()
{
  document.getElementById('colorText').style.color = RT_makeColor();
}

function RT_makeColor()
{
  // trace the motion
  if (k2  == 0)   k++;
  if (k2  == 1)   k--;
  if (k   == i-1) k2 = 1;
  if (k   == 0)   k2 = 0;

  // get the current color
  red   = Math.round(begred+k*avered).toString(16);
  green = Math.round(beggreen+k*avegreen).toString(16);
  blue  = Math.round(begblue+k*aveblue).toString(16);

  if (blue.length ==1) blue='0'+blue;
  if (red.length  ==1) red='0'+red;
  if (green.length==1) green='0'+green;

  // return exact value
  clrRGB = '#'+red+green+blue;
  return clrRGB;
}

startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace(" over", "");
   }
   }
  }
 }
}
window.onload=startList;