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)
  {
    window.external.AddFavorite(url, unescape('Bayer Research'));
  }
  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 zoomimg(src, id) {
  var zoomdiv  = document.getElementById('zoomdiv');
  var caption = "";

  if(id != "")
  {
    caption = document.getElementById(id).innerHTML
    caption = "<div style='text-align:left; padding:0 .25em;'><span>" +caption+"</span></div>";
  }

  zoomdiv.innerHTML="<div><span>Fenster schlie&szlig;en</span><img src='/img/system/close_icon.gif' alt='schlie&szlig;en'></div><table style='width:5em;' cellspacing='0' cellpadding='0'><tr><td><img src='"+src+"' />"+caption+"</td></tr></table>";

  var body =document.body;
  if(body.scrollTop > 50) {
    zoomdiv.style.top = body.scrollTop + 50;
  } else {
    zoomdiv.style.top = 50;
  }
  zoomdiv.style.visibility = 'visible';
}

function zoomimgen(src, id) {
  var zoomdiv  = document.getElementById('zoomdiv');
  var caption = "";

  if(id != "")
  {
    caption = document.getElementById(id).innerHTML
    caption = "<div style='text-align:left; padding:0 .25em;'><span>" +caption+"</span></div>";
  }

  zoomdiv.innerHTML="<div><span>Close window</span><img src='/img/system/close_icon.gif' alt='close'></div><table style='width:5em;' cellspacing='0' cellpadding='0'><tr><td><img src='"+src+"' />"+caption+"</td></tr></table>";

  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, args)
{
  var a='';
  if(args) {
    a = "&args=" + args;
  }
  var location = document.location.href;
  try {
    location = location.replace(/https?:\/\/.*?\//, '/');
  } catch(e) { }

  window.open("/module/print/Print.aspx?url=" +encodeURIComponent(location) + 
     "&pageid=" +PageId+a, "Drucken","width=775,height=750,scrollbars=yes");
}

function openPodcast(theURL)
{
    winName = window.open(theURL,'Podcast','location=no,menubar=no,resizable=no,scrollbars=yes,status=no,toolbar=no,width=938,height=756');
    if(winName == null || winName.closed){
    	window.open(theURL,winName,features);
    }
    else{winName.location.href = theURL;}
    if (!winName.closed)
    winName.focus();
}
