function init() {
   hr2div();
   initIeHoverBox('fokusthemen');
   fixEnglish();
}

function initIeHoverBox(id) {
   if(document.attachEvent && !window.opera) { //only the bad one ;)
      if(!document.getElementById(id))
         return false;
      box=document.getElementById(id);
      for(i=0;i<box.childNodes.length;i++) {
         if(box.childNodes[i].nodeName.toLowerCase()=='ul') {
            list=box.childNodes[i];
         }
      }
      document.getElementById(id).attachEvent('onmouseover',function (){list.style.display='block';})
      document.getElementById(id).attachEvent('onmouseout',function (){list.style.display='none';})
   }
}

function hr2div() {
   if(document.attachEvent && !window.opera) { //only the bad one again ;)
      for(i=document.getElementsByTagName('hr').length-1;i>=0;i--) {
         var hrdiv = document.createElement("div");
         hrdiv.className='hr';
         document.getElementsByTagName('hr')[i].parentNode.replaceChild(hrdiv, document.getElementsByTagName('hr')[i]);
      }
   }
}

function fixEnglish() {
   if(document.attachEvent && !window.opera) {
      if(document.getElementById('english')) {
//         document.getElementById('sidenav').style.borderTop='2px solid white';
      }
   }
}

function addEvent(obj, evType, fn){ 
 if (obj.addEventListener){ 
   obj.addEventListener(evType, fn, false); 
   return true; 
 } else if (obj.attachEvent){ 
   var r = obj.attachEvent("on"+evType, fn); 
   return r; 
 } else { 
   return false; 
 } 
}



function GetRandom( min, max ) {
        if( min > max ) {
                return( -1 );
        }
        if( min == max ) {
                return( min );
        }
 
        return( min + parseInt( Math.random() * ( max-min+1 ) ) );
}



addEvent(window, 'load', init);