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 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:#EBF6FA;'><div class='z2' onClick=''><span class='zoomtext'>Fenster schliessen</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 print(PageId)
{
     var location = document.location.href;
      window.open("/module/print/Print.aspx?url=" +location +"&pageid=" +PageId, "Drucken","width=775,height=750,scrollbars=yes");
  
}


