function winOpen(theURL,winName,features) 
{ 
winName = window.open(theURL,winName,features); 
if(winName == null || winName.closed){window.open(theURL,winName,features);} 
else{winName.location.href = theURL;} 
if (!winName.closed) 
winName.focus(); 
}
function setBookmark()
{
  var brty = navigator.appName;
  var brve = navigator.appVersion;
  var url=parent.document.location.href; 
  var titel = document.title; 
  if (brty.indexOf("Explorer")>-1)
  {
    // add this page to favorites for IE4+
    //window.external.AddFavorite(document.location.href, document.title);
    window.external.AddFavorite(url, unescape('Bayer Nachhaltigkeitsbericht'));
  }
  else
  {
    alert(unescape("Diese Funktion steht nur f%FCr Internet Explorer zur Verf%FCgung"));
  }
}
function setBookmark(lang)
{
  bookmarkurl = location.href;
  if (document.all) {
     window.external.AddFavorite(bookmarkurl,document.title);
     } else {
       alert('Your Browser does not support this feature');
    }
}

function Top()
{
 document.location.href="#pagetop";
}

function zoomimgen(src) {
  var zoomdiv  = document.getElementById('zoomdiv');

  zoomdiv.innerHTML="<div style='background-color:#EBF6FA;'><div class='z2' onClick=''><span class='zoomtext'>close window</span><img src='/img/system/schliessen.gif' width='1.0833em;' style='width:1.0833em; margin-left:0.3125em; margin-right:0.25em; margin-bottom:0.0625em; margin-top:0.175em;' onClick=''></div><div class='zoombild'><img src='"+src+"' style=''></div></div>";

  var body =document.body;
  if(body.scrollTop > 50) {
    zoomdiv.style.top = body.scrollTop + 50;
  } else {
    zoomdiv.style.top = 50;
  }
  zoomdiv.style.visibility = 'visible';
}
function zoomimg(src) {
  var zoomdiv  = document.getElementById('zoomdiv');

  zoomdiv.innerHTML="<div style='background-color:#EAE8F4;'><div class='z2' onClick=''><span class='zoomtext'>close window</span><img src='/img/system/close_icon.gif' width='1.0833em;' style='width:1.0833em; margin-left:0.3125em; margin-right:0.25em; margin-bottom:0.0625em; margin-top:0.175em;' onClick=''></div><div class='zoombild'><img src='"+src+"' style=''></div></div>";

  var body =document.body;
  if(body.scrollTop > 50) {
    zoomdiv.style.top = body.scrollTop + 50;
  } else {
    zoomdiv.style.top = 50;
  }
  zoomdiv.style.visibility = 'visible';
}


function print(PageId)
{
     var location = document.location.href;
      window.open("/module/print/Print.aspx?url=" +location +"&pageid=" +PageId, "Drucken","width=775,height=750,scrollbars=yes");
  
}

function openUrl(ActValue)
{

  var Value = ActValue;
  var ArrayValue = Value.split("#####");
  var Url = ArrayValue[0];
  var Target = ArrayValue[1];
  
  switch(Target)
  {
    case "inhalt":
    {
      parent.inhalt.document.location.href = Url;
      break;
    }
    case "_top":
    {
      parent.location.href = Url;
      break;
    }
    case "_blank":
    {
      window.open(Url);
      break;
    }
    default:
    {
      parent.inhalt.document.location.href = Url;
      break;
    }
  }
}


  sfHover = function() {
    var sfEls = document.getElementById("menu").getElementsByTagName("li");
    for (var i=0; i<sfEls.length; i++) {
      sfEls[i].onmouseover=function() {
       this.className+=" sfhover";
      }
      sfEls[i].onmouseout=function() {
        this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
      }
    }
  }
  if (window.attachEvent) 
  {
    // window.attachEvent("onload", sfHover); 
  }

