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 zoomimg(src, id) {
  var zoomdiv  = document.getElementById('zoomdiv');
  var caption = document.getElementById(id).innerHTML;

  zoomdiv.innerHTML="<div><span>Fenster schlie&szlig;en</span><img src='/img/system/close_icon.gif' alt='close'></div><table style='width:5em;' cellspacing='0' cellpadding='0'><tr><td><img src='"+src+"' /><div style='text-align:left; padding:0 .25em;'><span>" +caption+"</span></div></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 = document.getElementById(id).innerHTML;

  zoomdiv.innerHTML="<div><span>Close window</span><img src='/img/system/close_icon.gif' alt='close'></div></div><table style='width:5em;' cellspacing='0' cellpadding='0'><tr><td><img src='"+src+"' /><div style='text-align:left; padding:0 .25em;'><span>" +caption+"</span></div></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)
{
     var location = document.location.href;
      window.open("/module/print/Print.aspx?url=" +location +"&pageid=" +PageId, "Drucken","width=775,height=750,scrollbars=yes");
  
}

function openVideo( pFile, pSize, pTitle) {
	var ns6 = (!document.all && document.getElementById);
	var ie4 = (document.all);
	var ns4 = (document.layers);
	
	pMoviePath = "video.aspx?file=" + pFile + "&size=" + escape(pSize) + "&title=" + escape(pTitle); 
	pWidth = 415;
	pHeight = 450;

	if(ns6||ns4) {
		xMax = innerWidth;
		yMax = innerHeight;
	}
	else if(ie4) {
		xMax = document.body.clientWidth;
		yMax = document.body.clientHeight;
	}
	var xOffset = (xMax - pWidth)/2, yOffset = (yMax - pHeight)/2;
	vrWindow = open(pMoviePath,'bkvid','width='+pWidth+',height='+pHeight+',scrollbars=0,toolbar=0,location=0,directories=0,status=0,resizable=0,screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+'');
	if (window.focus) {
	vrWindow.focus(); 
	}
}

function openVideo320( pFile, pSize, pTitle) {
	var ns6 = (!document.all && document.getElementById);
	var ie4 = (document.all);
	var ns4 = (document.layers);
	
	pMoviePath = "video320.aspx?file=" + pFile + "&size=" + escape(pSize) + "&title=" + escape(pTitle); 
	pWidth = 415;
	pHeight = 450;

	if(ns6||ns4) {
		xMax = innerWidth;
		yMax = innerHeight;
	}
	else if(ie4) {
		xMax = document.body.clientWidth;
		yMax = document.body.clientHeight;
	}
	var xOffset = (xMax - pWidth)/2, yOffset = (yMax - pHeight)/2;
	vrWindow = open(pMoviePath,'bkvid','width='+pWidth+',height='+pHeight+',scrollbars=0,toolbar=0,location=0,directories=0,status=0,resizable=0,screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+'');
	if (window.focus) {
	vrWindow.focus(); 
	}
}

function openVideo416( pFile, pSize, pTitle) {
	var ns6 = (!document.all && document.getElementById);
	var ie4 = (document.all);
	var ns4 = (document.layers);
	
	pMoviePath = "video416.aspx?file=" + pFile + "&size=" + escape(pSize) + "&title=" + escape(pTitle); 
	pWidth = 512;
	pHeight = 450;

	if(ns6||ns4) {
		xMax = innerWidth;
		yMax = innerHeight;
	}
	else if(ie4) {
		xMax = document.body.clientWidth;
		yMax = document.body.clientHeight;
	}
	var xOffset = (xMax - pWidth)/2, yOffset = (yMax - pHeight)/2;
	vrWindow = open(pMoviePath,'bkvid','width='+pWidth+',height='+pHeight+',scrollbars=0,toolbar=0,location=0,directories=0,status=0,resizable=0,screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+'');
	if (window.focus) {
	vrWindow.focus(); 
	}
}

function openVideoScience() {
	var ns6 = (!document.all && document.getElementById);
	var ie4 = (document.all);
	var ns4 = (document.layers);
	
	pMoviePath = "science300-mov.aspx"; 
	pWidth = 415;
	pHeight = 520;

	if(ns6||ns4) {
		xMax = innerWidth;
		yMax = innerHeight;
	}
	else if(ie4) {
		xMax = document.body.clientWidth;
		yMax = document.body.clientHeight;
	}
	var xOffset = (xMax - pWidth)/2, yOffset = (yMax - pHeight)/2;
	vrWindow = open(pMoviePath,'bkvid','width='+pWidth+',height='+pHeight+',scrollbars=0,toolbar=0,location=0,directories=0,status=0,resizable=0,screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+'');
	if (window.focus) {
	vrWindow.focus(); 
	}
}


