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 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, args)
{
  var a='';
  if(args) {
    a = "&args=" + args;
  }
  var location = document.location.href;
  window.open("/module/print/Print.aspx?url=" +encodeURIComponent(location) + 
     "&pageid=" +PageId+a, "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;
    }
  }
}

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();
}
