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><span>Close window</span><img src='/img/system/close_icon.gif' alt='close'></div><img src='"+src+"' />";

  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><span>Fenster schlie&szlig;en</span><img src='/img/system/close_icon.gif' alt='close'></div><img src='"+src+"' />";

  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 = escape(document.location.href);
     var URL = escape("/module/print/Print.aspx?url=" +location +"&pageid=" +PageId+a);
//     var URL = escape("location + "&pageid=" + PageId + a);

//alert(URL);
     document.location.href = "/de/PrintPDF.aspx?filename=" + document.location.pathname + "&url=" +URL; 

     //window.open("/module/print/Print.aspx?url=" +location +"&pageid=" +PageId+a, "Drucken","width=775,height=750,scrollbars=yes");
  
}


function showDirectAccess(dropDown)
{
  if (dropDown != null && dropDown.value != "")
   {
     document.location.href = dropDown.value;
   }
}      

function openexternal(Url)
{
  var mywindow = window.open(Url,'Externer_Link','width=800,height=600,location=yes,menubar=yes,status=yes,toolbar=yes,resizable=yes,scrollbars=yes,screenY=80,screenX=80');

  mywindow.focus();
}