 
/*AUTHOR: Jan Koenig"*/
/*CREATION DATE: 01-10-2000*/
  var agt      = navigator.userAgent.toLowerCase(); 
  var is_major = parseInt(navigator.appVersion); 
  var is_minor = parseFloat(navigator.appVersion); 
  var is_nav   = ((agt.indexOf('mozilla') != -1)   && (agt.indexOf('spoofer') == -1) 
              && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')   == -1) 
              && (agt.indexOf('webtv') == -1)); 
  var is_ie    = (agt.indexOf("msie")  != -1); 
  var is_ie3   = (is_ie && (is_major < 4)); 
  var is_ie4   = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0") == -1) ); 
  var is_ie4up = (is_ie && (is_major >= 4)); 
  var is_ie5   = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0") != -1) ); 
  var is_ie5up = (is_ie && !is_ie3 && !is_ie4); 
  var browser_ok=is_ie4up;

function rnd() 
  {
  rnd.seed = (rnd.seed*9301+49297) % 233280;
  return rnd.seed/(233280.0);
  }

function rand(number) 
  {
  rnd.today=new Date();
  rnd.seed=rnd.today.getTime();
  return Math.ceil(rnd()*number);
  }

function outcolor(link, bgfarve,fgfarve) 
  {
  link.style.backgroundColor=bgfarve;
  }

function mouseoff(link) 
  {
  if (browser_ok) 
    {
    link.style.backgroundColor='#071441';
    link.style.color!='#000000';
    setTimeout("outcolor(" + link.id + ", '#80D9E5','')",130);
    setTimeout("outcolor(" + link.id + ", '#C0EDF2','')",230);
    setTimeout("outcolor(" + link.id + ", '#ffffff','')",330);
    setTimeout("outcolor(" + link.id + ", '','')",430);
    }
  }

function popupimg(imgref) //placerer billede i nyt vindue, beregner selv størrelse mm.
  { 
  var height = 640, width = 480, windowleft, windowtop;
  //alert('height= ' + height + ', width= ' + width);
  var img = new Image();
  img.src = imgref;
  //height  = img.height + 30;
  //width   = img.width + 40;
  //alert('height= ' + img.height + ', width= ' + img.width); 


  if( (height > screen.height) || (width > screen.width) )
    {
    //alert('UHA - vindue er for stort: availHeight= ' + screen.availheight + ', availWidth= ' + screen.availWidth);
    height      = screen.availHeight - 30; //screen.height;
    width       = screen.availWidth - 11;  //screen.width;
    windowleft  = 0;
    windowtop   = 0;
    popupwindow = window.open("",target="_blank","width="+width+",height="+height+",left="+windowleft+",top="+windowtop+",toolbar=NO,location=NO,directories=NO,status=NO,menubar=NO,scrollbars=YES,resizable=YES"); 
    }
  else
    {
    //windowleft  = (screen.width-width)/2;
    //windowtop   = (screen.height-height)/2;
    height      = screen.availHeight - 30; //screen.height;
    width       = screen.availWidth - 11;  //screen.width;
    windowleft  = 0;
    windowtop   = 0;
    popupwindow = window.open("",target="_blank","width="+width+",height="+height+",left="+windowleft+",top="+windowtop+",toolbar=NO,location=NO,directories=NO,status=NO,menubar=NO,scrollbars=YES,resizable=YES");
    }
  popupwindow.document.write('<HTML><HEAD><TITLE>ProInvent A/S teknologiudvikling</TITLE></HEAD>');
  popupwindow.document.write('<BODY BGCOLOR=#14466E LEFTMARGIN=10 MARGINWIDTH=0 TOPMARGIN=10 MARGINHEIGHT=0>'); 
  popupwindow.document.write('<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%"><tr><td><p align="center">');
  popupwindow.document.write('<p align="center"><img border="1" src="'+imgref+'">') 
  popupwindow.document.write('</p></td></tr></table>');
  popupwindow.document.write('</BODY></HTML>');
  popupwindow.focus;
  }

function drawlefttable()
  {
  if (browser_ok)
  {
  var tdclass='left';
  rnd.today=new Date();
  rnd.seed=rnd.today.getTime();
  var height=53;
  docheight = oDiv.clientHeight ;
  //alert(docheight);
  rows=Math.ceil(docheight/(height));
  document.clear
  document.write('<HTML><BODY>');
  for(row=0; row<rows;row++) 
  {
  var shorty=0;
  var first=true;
  var first=false;
  document.write('<DIV ALIGN="right">');  
  document.write('<TABLE BORDER=0 CELLSPACING=0>');
  document.write('<TR>');
  {
  if ((rand(100)<30) && (first==false)) 
  {
  shorty++;
  document.write('<TD class='+tdclass);
  document.write(' WIDTH=58 ');
  document.write('height='+height+'>&nbsp;</TD>');
  } 
  else
  {
  document.write('<TD class='+tdclass+' ROWSPAN=2 '); 
  if (first==false) 
  { document.write('WIDTH=58 '); }
  document.write('HEIGHT='+(height+8)+'>&nbsp;</TD>');
  }
  first=false;
  }
  document.write('</TR>');
  document.write('<TR>');
  for (s=0;s<shorty;s++)  document.write('<TD  class='+tdclass+' HEIGHT=5>&nbsp;</TD>');
  document.write('</TR>'); 
  document.write('</TABLE>')  
  document.write('  </DIV>');
  }}}

function removeFocusToMain()
  {
  focus();
  parent.main.window.focus();
  }

function removeFocus()
  {
  focus();
  parent.mainmenu.window.focus();
  }

function removeFocusMenu()
  {
  focus();
  parent.main.window.focus();
  }

function removeFocusTopMenu()
  {
  focus();
  parent.main.window.focus();
  }

function changetopleft(html)
  {
  if (is_ie) parent.topleft.document.location=html; 
  else 
  parent.frames['topleft'].document.location=html;
  }

function changetopmiddle(html)
  {
  if (is_ie)
  {
  //Force reload borders
  parent.parent.leftborder.document.location=parent.parent.leftborder.document.location; 
  parent.parent.rightborder.document.location=parent.parent.rightborder.document.location; 
  parent.topmiddle.document.location=html;
  } else
  {
  parent.frames['topmiddle'].document.location=html;
  }}

function drawrighttable()
  {
  if (browser_ok)
  {
  tdclass='right';
  rnd.today=new Date();
  rnd.seed=rnd.today.getTime();
  var height=53;
  docheight = oDiv.clientHeight;
  //alert(docheight);
  rows=Math.ceil(docheight/(height));
  document.clear
  document.write('<HTML><BODY>');
  for(row=0; row<rows;row++) 
  {
  var shorty=0;
  var first=true;
  document.write('<TABLE BORDER=0 CELLSPACING=0>');
  document.write('<TR>');
  {
  if ((rand(100)<30)  ) 
    {
    shorty++;
    document.write('<TD class='+tdclass);
    document.write(' WIDTH=58 ');
    document.write('height='+height+'>&nbsp;</TD>');
    } 
  else
    {
    document.write('<TD class='+tdclass+' ROWSPAN=2 '); 
    document.write('WIDTH=58 ');
    document.write('HEIGHT='+(height+8)+'>&nbsp;</TD>');
    }
  first=false;
  }
  document.write('</TR>');
  document.write('<TR>');
  for (s=0;s<shorty;s++)  document.write('<TD  class='+tdclass+' HEIGHT=5>&nbsp;</TD>');
  document.write('</TR>');
  document.write('</TABLE>')  
  document.write('</BODY></HTML>');
  }}}
