﻿var arrayImages1 = new Array(4);
var arrayImagesZoomPart1 = new Array(4);
var arrayAltTexts1 = new Array(4);
var arrayCaptionTexts1 = new Array(4);
var maxCount1 = 4;
var actPos1 = 0;
var zoomPart1 = '_zoomed;';
var intStatus1 = 0;
var srcPrevImage1 = "/html/images/main/icons/prev.gif";
var srcNextImage1 = "/html/images/main/icons/next.gif";
var srcTransImage1 = "/html/images/main/icons/a.gif";
var arrayZoomIcon1 = new Array(2);
arrayZoomIcon1[0] = "/html/images/main/icons/zoom_in.gif";
arrayZoomIcon1[1] = "/html/images/main/icons/zoom_out.gif";
var arrayZoomClass1 = new Array(2);
arrayZoomClass1[0] = "imgbox";
arrayZoomClass1[1] = "imgbox zoomed";



	arrayImages1[0] = "01.jpg";
	arrayImagesZoomPart1[0] = "/html/images/upload/forschung_und_entwicklung/01_zoomed.jpg";
	arrayImages1[1] = "img/02.jpg";
	arrayImagesZoomPart1[1] = "/html/images/upload/forschung_und_entwicklung/02_zoomed.jpg";
	arrayImages1[2] = "img/03.jpg";
	arrayImagesZoomPart1[2] = "/html/images/upload/forschung_und_entwicklung/03_zoomed.jpg";
	arrayImages1[3] = "img/05.jpg";
	arrayImagesZoomPart1[3] = "/html/images/upload/forschung_und_entwicklung/05_zoomed.jpg";
	var language = new String(document.location);
	
	if(language.indexOf('/en/') != -1) {
		arrayAltTexts1[0] = "This photo shows a thrombus as it appears when viewed with an electron microscope.";
		arrayCaptionTexts1[0] = "This photo shows a thrombus as it appears when viewed with an electron microscope.";
		arrayAltTexts1[1] = "Arteriosclerosis is a condition in which blood fats and white blood cells accumulate in inflamed vessel walls and cause them to thicken (plaque). The thin layer coating the vessel (endothelium) is torn at one point, allowing blood platelets (yellow) to come into direct contact with tissue factors. This immediately causes the platelets to activate, change their form and form a clot - a thrombus - which blocks the vessel.";
		arrayCaptionTexts1[1] = "Arteriosclerosis is a condition in which blood fats and white blood cells accumulate in inflamed vessel walls and cause them to thicken (plaque). The thin layer coating the vessel (endothelium) is torn at one point, allowing blood platelets (yellow) to come into direct contact with tissue factors. This immediately causes the platelets to activate, change their form and form a clot &#8211; a thrombus &#8211; which blocks the vessel.";
		arrayAltTexts1[2] = "Thrombosis on film: Manfred Schumacher (left) and Dr. Christoph Gerdes discuss a video recording of the development of a thrombosis they triggered with the new Bayer microscope. At the moment, the growing thrombus (grainy bulge) has not yet occluded the blood vessel, so that the red blood cells transported by the flow of blood appear as reddish streaks.";
		arrayCaptionTexts1[2] = "Thrombosis on film: Manfred Schumacher (left) and Dr. Christoph Gerdes discuss a video recording of the development of a thrombosis they triggered with the new Bayer microscope. At the moment, the growing thrombus (grainy bulge) has not yet occluded the blood vessel, so that the red blood cells transported by the flow of blood appear as reddish streaks.";
		arrayAltTexts1[3] = "Dr. Christoph Gerdes  and his workgroup use a special microscope to trigger the formation of tiny clots in blood vessels and then observe in real time the effect that new active substances have on these thrombi.";
		arrayCaptionTexts1[3] = "Dr. Christoph Gerdes  and his workgroup use a special microscope to trigger the formation of tiny clots in blood vessels and then observe in real time the effect that new active substances have on these thrombi.";
	}else {
		arrayAltTexts1[0] = "Dieses Bild zeigt einen Thrombus (grau), wie er im Elektronenmikroskop zu sehen ist.";
		arrayCaptionTexts1[0] = "Dieses Bild zeigt einen Thrombus (grau), wie er im Elektronenmikroskop zu sehen ist.";
		arrayAltTexts1[1] = "Bei einer Arteriosklerose lagern sich Blutfette und weiße Blutkörperchen in die entzündete Gefäßwand ein und bewirken eine Verdickung (Plaque). Die dünne Schicht, die das Gefäß auskleidet (Endothel), ist an einer Stelle gerissen, sodass die Blutplättchen (Thrombozyten, gelb) in direkten Kontakt mit Gewebefaktoren kommen. Das führt zu einer Aktivierung der Thrombozyten, die ihre Form verändern, ein Gerinnsel - einen Thrombus - bilden und so das Gefäß blockieren.";
		arrayCaptionTexts1[1] = "Bei einer Arteriosklerose lagern sich Blutfette und weiße Blutkörperchen in die entzündete Gefäßwand ein und bewirken eine Verdickung (Plaque). Die dünne Schicht, die das Gefäß auskleidet (Endothel), ist an einer Stelle gerissen, sodass die Blutplättchen (Thrombozyten, gelb) in direkten ­Kontakt mit Gewebefaktoren kommen. Das führt zu einer Aktivierung der Thrombozyten, die ihre Form verändern, ein Gerinnsel &#8211; einen Thrombus &#8211; bilden und so das Gefäß blockieren.";
		arrayAltTexts1[2] = "Thrombose im Film: Manfred Schumacher (l.) und Dr. Christoph Gerdes diskutieren die Videoaufzeichnung einer Thrombosebildung, die sie mit dem neue Bayer-Mikroskop gemacht haben. Noch hat der wachsende Thrombus (körnige Aufwölbung) das Gefäß nicht verschlossen, so dass die im Blutstrom transportierten roten Blutkörperchen nur als rötlicher Schleier erscheinen.";
		arrayCaptionTexts1[2] = "Thrombose im Film: Manfred Schumacher (l.) und Dr. Christoph Gerdes diskutieren die Videoaufzeichnung einer Thrombosebildung, die sie mit dem neue Bayer-Mikroskop gemacht haben. Noch hat der wachsende Thrombus (körnige Aufwölbung) das Gefäß nicht verschlossen, so dass die im Blutstrom transportierten roten Blutkörperchen nur als rötlicher Schleier erscheinen.";
		arrayAltTexts1[3] = "Dr. Christoph Gerdes und seine Arbeitsgruppe können mit einem Spezialmikroskop die Entstehung winziger Gerinnsel in Blutgefäßen auslösen und live beobachten, wie neue Wirkstoffe die Entwicklung dieser so genannten Thromben beeinflussen.";
		arrayCaptionTexts1[3] = "Dr. Christoph Gerdes und seine Arbeitsgruppe können mit einem Spezialmikroskop die Entstehung winziger Gerinnsel in Blutgefäßen auslösen und live beobachten, wie neue Wirkstoffe die Entwicklung dieser so genannten Thromben beeinflussen.";
	}
var p_strIndex = '1';
var oldIndex = '';

function setIndex(p_strValue)
{
  if(p_strIndex != p_strValue)
  {//wenn neue Gallery dann sichtbar schalten
    p_strIndex = p_strValue;
    document.getElementById("divimagebox_" + p_strIndex).style.display = 'inline';
  }


  if(oldIndex != '' & oldIndex != p_strValue)
  {
    document.getElementById("divimagebox_" + oldIndex).style.display = 'none';
  }
  oldIndex = p_strValue;

}




function changeImage1(p_strAction)
{
  switch(p_strAction)
  {
    case "next" : 
    {
      if(maxCount1 > actPos1 + 1)
      {
        if(intStatus1 == 0)
          document.getElementById("imagebox_" + p_strIndex).src = arrayImages1[actPos1 + 1];
        else
          document.getElementById("imagebox_" + p_strIndex).src = arrayImagesZoomPart1[actPos1 + 1];
          
          
        document.getElementById("imagebox_" + p_strIndex).alt = arrayAltTexts1[actPos1 + 1];
        if(document.getElementById("imageboxcaption_" + p_strIndex))
          document.getElementById("imageboxcaption_" + p_strIndex).innerHTML = arrayCaptionTexts1[actPos1 + 1];
        document.getElementById("imageboxcount_" + p_strIndex).innerHTML = 'Image ' + (actPos1 + 2) + ' of ' + maxCount1;        
        actPos1++;
        if(actPos1 == maxCount1 - 1)
        {
          document.getElementById("nextImage_" + p_strIndex).src = srcTransImage1;
        }
        else
        {
          document.getElementById("nextImage_" + p_strIndex).src = srcNextImage1;
        }
        document.getElementById("prevImage_" + p_strIndex).src = srcPrevImage1;
      }
      break;
    }
    case "previous" :
    {
      if(actPos1 > 0)
      {
        if(intStatus1 == 0)
          document.getElementById("imagebox_" + p_strIndex).src = arrayImages1[actPos1 - 1];
        else
          document.getElementById("imagebox_" + p_strIndex).src = arrayImagesZoomPart1[actPos1 - 1];
          
        document.getElementById("imagebox_" + p_strIndex).alt = arrayAltTexts1[actPos1 - 1];
        if(document.getElementById("imageboxcaption_" + p_strIndex))
          document.getElementById("imageboxcaption_" + p_strIndex).innerHTML = arrayCaptionTexts1[actPos1 - 1];        
        document.getElementById("imageboxcount_" + p_strIndex).innerHTML = 'Image ' + (actPos1) + ' of ' + maxCount1;                
        actPos1--;
        if(actPos1 == 0)
        {
          document.getElementById("prevImage_" + p_strIndex).src = srcTransImage1;
        }
        else
        {
          document.getElementById("prevImage_" + p_strIndex).src = srcPrevImage1;
        }
        document.getElementById("nextImage_" + p_strIndex).src = srcNextImage1;
      }    
      break;
    }
    default : break;
  }
}

function zoomImage1(p_strIndex)
{
  if(intStatus1 == 0)
  {
    document.getElementById("imagebox_" + p_strIndex).src = arrayImagesZoomPart1[actPos1];
    document.getElementById("zoomicon_" + p_strIndex).src = arrayZoomIcon1[1];
    document.getElementById("divimagebox_" + p_strIndex).className = arrayZoomClass1[1];
    intStatus1 = 1;
  }
  else
  {
    document.getElementById("imagebox_" + p_strIndex).src = arrayImages1[actPos1];
    document.getElementById("zoomicon_" + p_strIndex).src = arrayZoomIcon1[0];
    document.getElementById("divimagebox_" + p_strIndex).className = arrayZoomClass1[0];
    intStatus1 = 0;
  }
}


function jumpTo1()
{
  var count = document.getElementById("jump_1").value;
  count = parseInt(count);

	  if (!(isNaN(count)) & (count <= maxCount1 & count >= 1 ))
	  {	
	
	  if(maxCount1 <= count)
	  {
		count = maxCount1;
		document.getElementById("nextImage_1").src = srcTransImage1;
	  }
	  else
	  {
		document.getElementById("nextImage_1").src = srcNextImage1;
	
	  }
	  if(count <=  1)
	  {
		count = 1;
		document.getElementById("prevImage_1").src = srcTransImage1;
	  }
	  else
	  {
		document.getElementById("prevImage_1").src = srcPrevImage1;
	  }
	
	
	  if(intStatus1 == 0)		  
		 document.getElementById("imagebox_1").src = arrayImages1[count - 1]; 
		 else
		 document.getElementById("imagebox_1").src = arrayImagesZoomPart1[count - 1];
	
	  document.getElementById("imageboxcount_1").innerHTML = 'Image ' + count + " of " + maxCount1;
	
	document.getElementById("imagebox_" + 1).alt = arrayAltTexts1[count - 1];
			if(document.getElementById("imageboxcaption_" + 1))
			  document.getElementById("imageboxcaption_" + 1).innerHTML = arrayCaptionTexts1[count - 1];        
	
	
	  actPos1 = count - 1;
  }
}

