<!-- Scripting by m:com cologne -->

function UnCryptMailto( s ){
   var n = 0;
   var r = "";
   for( var i = 0; i < s.length; i++) {
       n = s.charCodeAt( i );
       if( n >= 8364 ){
           n = 128;
       }
       r += String.fromCharCode( n - 1 );
   }
   return r;
}

function linkTo_UnCryptMailto( s ){
   location.href=UnCryptMailto( s );
}

var selected_company;
function updatesuchfeld(suchfeld){
	if (suchfeld == 'q1'){
		document.mainform.suchfeld.value = document.mainform.q1.value;
		document.mainform.q21.value = document.mainform.q1.value;
	} else if (suchfeld == 'q2'){
		document.mainform.suchfeld.value = document.mainform.q2.value;
		document.mainform.q1.value = document.mainform.q2.value;
	}  else {
		document.mainform.q1.value = document.mainform.suchfeld.value;
		document.mainform.q2.value = document.mainform.suchfeld.value;
	}
}

function showbox(){
if(document.getElementById("direct")){
	//document.getElementById("direct").style.visibility='hidden';
}
}
function hidebox(){
if(document.getElementById("direct")){
   	//document.getElementById("direct").style.visibility='visible';
}
}

function getzuordf(beruf,standort,firmen,flag,lang) {
      if (flag == 0){
	  	winpar = "width=635,height=200,scrollbars,screenY=80,screenX=80";
	  }else{
      	winpar = "width=635,height=550,scrollbars,screenY=80,screenX=80";
	  }
	  // if (berufwin) berufwin.close();
      // berufwin = window.open ("index.php?page_id=159&beruf_id=" + beruf +'&standort_id='+ standort + '&firmencode=' + firmen + '&lang=' + lang, 'Bewerbung',winpar);
	  // berufwin.focus();		
	 // openlink('index.php?page_id=159&beruf_id=" + beruf +'&standort_id='+ standort + '&firmencode=' + firmen + '&lang=' + lang',0,false,true,'')
		lnk = "https://online-bewerbung.currenta.de/index.php?page_id=169&beruf_id=" + beruf + "&standort_id=" + standort + "&firmencode=" + firmen + "&lang=" + lang;
	// alert('hallo' + lnk);
		openlink(lnk,0,false,true,winpar);
}


var lastan="";
   THover = function() {
  	 if(document.getElementById("topnavigation")){
	    var sfEls = document.getElementById("topnavigation").getElementsByTagName("li");
	    for (var i=0; i<sfEls.length; i++) {
	      sfEls[i].onmouseover=function() {
		    
	        this.className+=" thover";
			
	      }
	      sfEls[i].onmouseout=function() {
	        this.className=this.className.replace(new RegExp(" thover\\b"), "");
	      }
	    }
		
	  }
  }
  if (window.attachEvent) 
  {
     window.attachEvent("onload", THover); 
  }

  function do_operate(operate,param1,param2,confrm) {
    dosubmit = true;
    document.mainform.operate.value = operate;
    document.mainform.param1.value = param1;
    document.mainform.param2.value = param2;
	if(confrm) {
	  dosubmit = confirm(confrm);
	} 
	if(dosubmit) {
	   document.mainform.submit();
	} 
  }
  
function do_submit(operate) {
    if(operate.indexOf("callpage_") == 0) {
        document.mainform.page_id.value = operate.replace(/callpage_/,"");
        operate = "";
    }
    document.mainform.operate.value = operate;
    document.mainform.submit();
}

function recommendpage(page_id,language,rootkuerzel) {
    seite = '/recommend_' + rootkuerzel + '.php?page_id=' + page_id + '&lang=' + language+ '&rootkuerzel='+rootkuerzel+'';
    wshelp = window.open (seite, 'Recommend','height=550,width=565,scrollbars=yes');
}

function laden(name, erstes, zweites) {  
     appname = navigator.appName;
     appversion = navigator.appVersion;
  if (browserOK) {     
    Bilder[name] = new Array(3);
    Bilder[name][0] = new Image();
    Bilder[name][0].src = erstes;
    Bilder[name][1] = new Image();
    Bilder[name][1].src = zweites;
  }
}

function an(name){
     appname = navigator.appName;
     appversion = navigator.appVersion;
  if (browserOK) {
    
     if ((name.indexOf("snav") >= 0) && (appname.indexOf("Netscape") >= 0) && appversion.substr(0,1) == "4") {
       //alert(navigator.appVersion);
       	   doc = document.snav.document; // 
	   }
     else if ((name.indexOf("unav") >= 0) && (appname.indexOf("Netscape") >= 0) && appversion.substr(0,1) == "4") {
		//alert(window.document.layers.length);
	 	  doc = window.document.nav.document; 
	   }   
	 else {
	   doc = document; }  
	 if(lastan != "") {
	    doc.images[lastan].src = Bilder[lastan][0].src;
	 } 
	 if(doc.images[name]){
	 	doc.images[name].src = Bilder[name][1].src;
	 	lastan = name;
	 }
  }
}

function aus(name){
     appname = navigator.appName;
	 appversion = navigator.appVersion;
     if ((name.indexOf("snav") >= 0) && (appname.indexOf("Netscape") >= 0) && appversion.substr(0,1) == "4") {
	   doc = document.snav.document; 
	 } else {
	   doc = document; }  
  if (browserOK) {
	 if(lastan != "") {
		  if(!doc.images[lastan]) {
		      //alert("Lastan: "+lastan);
		  }
	    doc.images[lastan].src = Bilder[lastan][0].src;
	 }  
	 lastan = "";
  }
}


function m_an(name,layer){
  if (browserOK) {
     if (document.images) {
		if ( document.getElementsByTagName ) {
		    if ((navigator.appName == "Netscape") && navigator.appVersion.substr(0,1) != "4") {
			     doc = document;
			
			}else if (navigator.appName == "Netscape") {
			    
				doc = document.getElementsByTagName("*");
			
			}else {
			    
		        doc =document.getElementById(layer).document ;
			}
		}else {
			doc = document.layers[layer].document
		}
	}
	if(lastan != "") {
	    doc.images[lastan].src = Bilder[lastan][0].src;
	 } 
	 //alert(doc.images[name].src);
	 doc.images[name].src = Bilder[name][1].src;
	 lastan = name;
	 //alert(doc.images[name].src);
  }
}

function m_aus(name,layer){
  if (browserOK) {
	 if(lastan != "") {
	     if (document.images) {
			if ( document.getElementsByTagName ) {
				if ((navigator.appName == "Netscape") && navigator.appVersion.substr(0,1) != "4"){	     
				 	doc = document;
				}else if (navigator.appName == "Netscape") {
					doc = document.getElementsByTagName("*");
				}else {
			        doc =document.getElementById(layer).document ;
				}
			}else {
				doc = document.layers[layer].document
			}
		}
	    doc.images[lastan].src = Bilder[lastan][0].src;
	 }  
	 lastan = "";
  }
}


function helpan(name){
 
  if (browserOK) {
	   document.images["ftext"].src = Bilder[name][1].src;	
  }
}


   function openlink(lnk, typ, stat, opn) {
       openlink(lnk, typ, stat, opn, '');
   }

function openlink(lnk, typ, stat, opn, winpar) {
       // alert(stat + " " + opn);
	   stat=false;
	   if(stat) {
           var lnkparam = "";
           if(typ == 1 || typ == 2){	
               if(typ == 1){
                   lnkparam = "strLink=" + escape(lnk);
               } else {
			       lnkparam = "strFile=" + escape(lnk);
               }
			   lnk = "/showdata.php?" + lnkparam;
           }
	   }
   	   if(typ == 0){
	     var LK =     lnk.replace(/index/,"print");
		lnk = LK + '&type=K'; 
	   }
       if(!opn) {
	       location.href = lnk;
	   } else {
	      if(winpar == "") {
			winpar = 'toolbar=yes, location=yes, status=yes, menubar=yes, scrollbars=yes, resizable=yes, width=800, height=600';
          }
 	      openexternal(lnk, winpar);
	   }
   }


function openexternal(page)
   { 
//   var name = 'popup';
//   if (globalrk) {
//    name=name+globalrk;
//   }  
	    if(document.all){
        	if(bug = window.open("",'popup')){
				bug.close();
			}
		}
		wshelp = window.open (page,'popup','width=700,height=420,location=yes,menubar=yes,status=yes,toolbar=yes,resizable=yes,scrollbars=yes,screenY=80,screenX=80');
		wshelp.focus();
   }


function openexternal(page,winpar)
   {
//   var name = 'popup';
//   if (globalrk) {
//    name=name+globalrk;
//   } 
	    if(document.all){
        	if(bug = window.open("",'popup')){
				bug.close();
			}
		}
		wshelp = window.open (page,'popup',winpar);
		wshelp.focus();
   }

function selectpage_alt(page,type) {
    if(page != "") {
	    if(type == "O") {
	      if (page != "") {
	        parent.location.href="index.php?page_id=" + page;
		  }
		} else {
		    window.open (dynamicserver + "/print.php?page_id=" + page + '&type=' + type, 'winxtra','height=360,width=540,scrollbars');
		}
	}	
}

var xtrapopup;

function openpage_alt(page, features, type) {
    if(page != "") {
	    if(type == "O") {
	      if (page != "") {
	        parent.location.href="/page" +page +".htm";
		  }
		} else {
		    //window.open (dynamicserver + "/print.php?page_id=" + page + '&type=' + type, 'winxtra','height=360,width=540,scrollbars');
            if(xtrapopup) {
			   xtrapopup.close();
			}
		    xtrapopup = window.open (dynamicserver + "/print.php?page_id=" + page + '&type=' + type, 'winxtra',features);
		    //xtrapopup = window.open ("/page" +page +".htm", 'winxtra',features);
		}
	}	
}


function openpage_neu(page, features, type) {
    if(page != "") {
	    if(type == "O") {
	      if (page != "") {
	        parent.location.href="/page" +page +".htm";
		  }
		} else {
		    //window.open (dynamicserver + "/print.php?page_id=" + page + '&type=' + type, 'winxtra','height=360,width=540,scrollbars');
		    window.open ("/page" +page +".htm", 'winxtra',features);
		}
	}	
}

function selectpage(page,type) {
  openpage_neu(page,'height=360,width=540,scrollbars',type);
}



  function openenglish_static()
{
wsopen=window.open('englisch.htm','Fenster1','width=300,height=200')
wsopen.focus();
}

  function not_available() 
  	{
	    seite = 'not_available.htm';
		window.open(seite, 'Fenster2', 'width=200,height=120,scrollbars,screenY=80,screenX=80');  
	}
	
 function forgot_password(lang) 
  	{
	    seite = 'forgot_password.cfm?lang=' + lang;
		window.open(seite, 'Fenster3', 'width=300,height=200,scrollbars,screenY=80,screenX=80');  
	}

function selectanw()
   {
     if (document.anwselect.anw_id.options[document.anwselect.anw_id.selectedIndex]. value != "")
       document.anwselect.submit();
   }


function ausblenden()
	{
	 document.all.alertdiv.style.visibility='hidden';			
	}

  
  function alertdivshow(text) {
           	document.all.alertdiv.style.visibility='visible';
			document.all.alertdiv.innerHTML = "<span class=\"normal\">";
			document.all.alertdiv.innerHTML += text;
			document.all.alertdiv.innerHTML += "</span>";
			setTimeout("ausblenden()",5000);
  }

function load_content(x)
{

  if (x == "")
  {
  }
  else
  {
    teil = x.indexOf("http://");
    if (teil == "-1")
    {
window.open(x,"Fenster","toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=570,height=250");
    }
    else
    {
window.open(x,"Fenster","toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=800,height=600");
    }
  }
}

function load_contact(land_id,lang)
{
  if (land_id == "")
  {
  }
  else
  {
    win = window.open(dynamicserver + "/baycontactpopup.php?land_id="+land_id+"&lang="+lang,"contact","scrollbars=yes,width=425,height=300");
    win.focus();
  }
}

function dosearch(strAuftritt, strLang){
   q = document.mainform.suchfeld.value;
   if (strAuftritt == 'bay'){
       if (strLang == "de"){
            x = 'http://www.tools.bayer.de/dynamic/baysuche.php?q='+ q;
       } else {
            x = 'http://www.tools.bayer.de/dynamic/baysearch.php?q='+ q;
       }
   }
   if (strAuftritt == 'wrp'){
       if (strLang == "de"){
            x = 'http://www.tools.bayer.de/dynamic/baysuche_webreport.php?q='+ q;
       } else {
            x = 'http://www.tools.bayer.de/dynamic/baysearch_webreport.php?q='+ q;
       }
   }
   if (strAuftritt == 'bye'){
       if (strLang == "en"){
            x = 'http://www.tools.bayer.de/dynamic/baysuche_byee.php?q='+ q;
       } else {
            x = 'http://www.tools.bayer.de/dynamic/baysearch_byee.php?q='+ q;
       }
   }
    if (strAuftritt == 'bis'){
	 // alert(strAuftritt +'-'+ strLang);
	}
	location.href=x;
    return false;
}

function do_search(strLink){
   q = document.mainform.suchfeld.value;
   x = strLink + q;
   location.href=x;
   //document.mainform.method = "get";
   //document.mainform.action = x;
   //document.mainform.submit();
}


function openprint_static()
 	{  
	seite = location.pathname;
	if(seite.lastIndexOf("page") > 0){
		linkanf = seite.lastIndexOf("page");
		linkend = seite.lastIndexOf(".htm");
		pageid = seite.substring(linkanf+4,linkend);
	}else{
	    pageid =0;	
	}
	/*
	if (linkanf == -1) {
	  linkanf = seite.indexOf("termin");
	}
	if (linkanf == -1) {
	  linkanf = seite.indexOf("news");
	}
	if (linkanf == -1) {
	  linkanf = seite.indexOf("uebersichttv");
	}
	*/
	
	seite = '/print' + pageid + '.htm';
	wshelp = window.open (seite, 'Printfassung','height=620,width=660,menubar,scrollbars');
	//setTimeout("wshelp.print()",1500);
	wshelp.focus();
  }

  
if (document.layers) brows = "ns";
if (document.getElementById) brows = "ie";  // bei nn5 und ie5 

var activ_div = "";

function show(ebene) 
	{     
	    if( activ_div != ebene ) {
			if( ebene != "" ) {
				if ( brows == "ie") {
				     document.getElementById(ebene).style.visibility =  "visible";
					}
				else {
					eval('document.layers["'+ebene+'"].visibility="show"');
					//alert(document.layers[ebene].visibility);
					}
			}
			if ( activ_div != "" ) {
				if ( brows == "ie") {
				    eval('document.getElementById("' + activ_div + '").style.visibility =  "hidden"')  ;
					}
				else {
					eval('document.layers["'+ activ_div +'"].visibility="hidden"');
					}
			}
		}
		activ_div = ebene;
	}

function hide(ebene) 
	{    
	     if (activ_div != ""){
	      	if(document.layers) 
	      		document.layers[activ_div].visibility="hide"; 
	    	else 
	      		eval('document.getElementById("' + activ_div + '").style.visibility ="hidden"')  ;
			activ_div = "";	
	    }
	}

/*
function zoombild(bildname, width, height, strHeadline) {

    if (strHeadline) {
  openlink(dynamicserver+'/zoombildclose.php?bildpfad='+bildname+'&width='+width+'&height='+height+'&strHeadline='+strHeadline,1,false,true,'scrollbars=no,width='+width+',height='+height);
    } else {    
        openlink(dynamicserver+'/zoombildclose.php?bildpfad='+bildname+'&width='+width+'&height='+height,1,false,true,'scrollbars=no,width='+width+',height='+height);
    }
}
*/
function gohome(){
	document.location.href = "http://" + document.location.host;
/*
	seite = location.href;
	if(seite.indexOf("host") > 0){
	    linkanf = seite.indexOf("host");
		linkend = seite.indexOf("&&");
		hostname = seite.substring(linkanf+5,linkend);
  	    //alert(hostname);
		document.location.href = "http://" + hostname;
  	}
*/		
}

var wshelppopup;

function openpage(page_id, features, type)
 {  
    if(! staticserver) {
	     if (!type) type='O';
		 seite = 'print.php?page_id='+page_id+'&type='+ type;
	} else {
 		seite = 'page'+page_id+'.htm';
	}
    if (wshelppopup) {
        wshelppopup.close();
    }
	wshelppopup = window.open (seite, 'Printfassung',features);
	wshelppopup.focus();
  }

  
function bookmarkpage(seitenname) {
    bookmarkurl = location.href;
    if (document.all) {
		window.external.AddFavorite(bookmarkurl,seitenname);
	} else {
	   alert('Your Browser does not support this feature');
	}
  }
  
function newsletter(subscribe,email,auftritt,lang) {
   var p;
   var errors;
   errors = 0;
   p=email.indexOf('@');
   if (p<1 || p==(email.length-1)) {
	  if(lang == "de") {
	    errmess ="Bitte geben Sie eine gültige E-Mail-Adresse ein!";
	  } else {
	    errmess ="Please enter a valid e-mail address in the e-mail field.";
	  }
	  errors++;
   }
   if(!errors) {
       wshelp = window.open (dynamicserver + "/baynewsletterpopup.php?lang=" + lang + "&auftritt=" + auftritt + "&email=" +email+ '&aktion=' + subscribe, 'newsletter','scrollbars=no,width=430,height=400'); 
        wshelp.focus();
   } else {
        alert(errmess);
   }	
}

function forwardURL(swapURL){
// Angepasst am 19.10.2004 A.Reiners
//	window.open(swapURL,'sslchooser','scrollbars=no,width=660,height=550,status=yes,location=yes');
	window.open(swapURL,'sslchooser','scrollbars=yes,width=660,height=550,status=yes,location=yes');
	//self.name=swapURL;
	//self.location.href="OrderMailForward.html"
}

var selectedreg;
var altselectedreg;

function selectregister(node,pos) {

   var rdiv = document.getElementById("register_" + node + "_" + pos);
   var rpdiv = document.getElementById("registerpage_" + node + "_" + pos);
   var rspdiv = document.getElementById("registerpage_" + node);
   if(!altselectedreg) altselectedreg = "register_"+ node +"_0";
   var rsdiv = document.getElementById(altselectedreg);
   
   if(rdiv && rpdiv && rspdiv && rsdiv) {
   	   rspdiv.innerHTML = rpdiv.innerHTML;
	   rdiv.className += " registerselected"; 
	   rsdiv.className = rsdiv.className.replace(/ registerselected/,""); 
	   selectedreg = "register_" + node + "_" + pos;
	   altselectedreg = "register_" + node + "_" + pos;
   }
}

var currentzoom = 100;

function zoom(distance,noframes) {
    bodyid = document.getElementById('body');
	//alert(distance);
	if(bodyid) {
	   if(distance == 0){
	   	currentzoom = 100;
	   }else{
		   if( (distance>0 && currentzoom<300) || (distance < 0 && currentzoom >60)) {
				currentzoom+=distance;
				if(currentzoom <= 100){
				   if(document.getElementById('zoom_small')){
				   		document.getElementById('zoom_small').className = 'zoom_100';				       
				   } 
					if(document.getElementById('zoom_norm')){
				   		document.getElementById('zoom_norm').className = 'zoom_100';				       
				   } 
				  	if(document.getElementById('zoom_big')){
				   		document.getElementById('zoom_big').className = 'zoom_100';				       
				   } 
				}else{
				   if(document.getElementById('zoom_small')){
				   		document.getElementById('zoom_small').className = 'zoom_img';				       
				   } 
					if(document.getElementById('zoom_norm')){
				   		document.getElementById('zoom_norm').className = 'zoom_img';				       
				   } 
				  	if(document.getElementById('zoom_big')){
				   		document.getElementById('zoom_big').className = 'zoom_img';				       
				   } 
				
				}
				
		   }
	   }	   
	   bodyid.className = "body" + currentzoom + "";
	}
    if (noframes){
    } else {
        iframenav = window.frames['nav'];
    	if(iframenav) {
		   iframenav.zoom(distance);    	  
    	}
        setPersZoom(distance,currentzoom);
        if (navigator.appName=="Netscape") {location.reload();}
    }
}
/*
function zoom(factor)
{
  var size = "100%";
  var obj = document.getElementById("BaseContent");

  if (obj.style.fontSize != null &&
      obj.style.fontSize != "")
    { size = obj.style.fontSize; }
    
  size = Number(String(size).substring(0, String(size).indexOf("%")))
  if (size > 20 && size < 400) size = size + factor;
  if (factor == 0) size = 100;

  setPersFontSize(size + "%");
  loadZoom();
  
  if (navigator.appName=="Netscape") {location.reload();}
}		
*/
function loadZoom()
{
  var newSize = getPersZoom();
  var zoomsize = newSize - currentzoom;
  if (zoomsize != 0){
     zoom(zoomsize,true);
  }
}

function setPersZoom(distance,currentzoom)
{
    document.cookie = "currentzoom=" + currentzoom + ";" + "distance=" + distance + ";";
}

function getPersZoom()
{
  var currentzoom = 100;
	
	if (document.cookie) 
	{
	  var val = document.cookie
	  var idxStart = val.indexOf("currentzoom=")
	  var idxEnd = val.indexOf(";", idxStart);

	  if (idxEnd < 0) { idxEnd = val.length; }
      if (idxStart >= 0) {currentzoom = val.substring(idxStart + "currentzoom=".length, idxEnd);}
  } 

  return currentzoom;
}

/*
function zoom(distance) {
    bodyid = document.getElementById('body');
	if(bodyid) {
	   if( (distance>0 && currentzoom<300) || (distance < 0 && currentzoom >60)) {
			currentzoom+=distance;
	   }
	   bodyid.style.fontSize = currentzoom + "%";
	}
    iframenav = document.frames['nav'];
	if(iframenav) {
	   iframenav.zoom(distance);
	}
}*/


	function zoomimage(arrayimages, arrayimageszoomPart, arrayAltTexts, arrayCaptionTexts, maxCount, actPos, zoomPart, intStatus, srcPrevImage, srcNextImage, srcTransImage, arrayZoomIcon, arrayZoomClass) {
		this.arrayImages = arrayimages;
		this.arrayimageszoomPart = arrayimageszoomPart;
		this.arrayAltTexts = arrayAltTexts;
		this.arrayCaptionTexts = arrayCaptionTexts;
		this.maxCount = maxCount;
		this.actPos = actPos;
		this.zoomPart = zoomPart;
		this.intStatus = intStatus;
		this.srcPrevImage = srcPrevImage;
		this.srcNextImage = srcNextImage;
		this.srcTransImage = srcTransImage;
		this.arrayZoomIcon = arrayZoomIcon;
		this.arrayZoomClass = arrayZoomClass;
	}
	
	function zoomimages() {
		this.zi = new Array();
		this.index = 0;
		
		this.insertzoomimage = function(index,ziobject) {
			this.zi[index] = ziobject;
		}
		

		this.changeImage = function(p_strAction)
		{
		  var z = this.zi[this.index];
		  switch(p_strAction)
		  {
		    case "next" : 
		    {
					
		      if(z.maxCount > z.actPos + 1)
		      {
		        if(z.intStatus == 0)
		          document.getElementById("imagebox").src = z.arrayImages[z.actPos + 1];
		        else
		          document.getElementById("imagebox").src = z.arrayimageszoomPart[z.actPos + 1];
		          
		          
		        document.getElementById("imagebox").alt = z.arrayAltTexts[z.actPos + 1];
		        if(document.getElementById("imageboxcaption"))
		          document.getElementById("imageboxcaption").innerHTML = z.arrayCaptionTexts[z.actPos + 1];
		        document.getElementById("imageboxcount").innerHTML = (z.actPos + 2) + '/' + z.maxCount;        
		        z.actPos++;
		        if(z.actPos == z.maxCount - 1)
		        {
		          document.getElementById("nextImage").src = z.srcTransImage;
		        }
		        else
		        {
		          document.getElementById("nextImage").src = z.srcNextImage;
		        }
		        document.getElementById("prevImage").src = z.srcPrevImage;
		      }
		      break;
		    }
		    case "previous" :
		    {
		      if(z.actPos > 0)
		      {
		        if(z.intStatus == 0)
		          document.getElementById("imagebox").src = z.arrayImages[z.actPos - 1];
		        else
		          document.getElementById("imagebox").src = z.arrayimageszoomPart[z.actPos - 1];
		          
		        document.getElementById("imagebox").alt = z.arrayAltTexts[z.actPos - 1];
		        if(document.getElementById("imageboxcaption"))
		          document.getElementById("imageboxcaption").innerHTML = z.arrayCaptionTexts[z.actPos - 1];        
		        document.getElementById("imageboxcount").innerHTML = (z.actPos) + '/' + z.maxCount;                
		        z.actPos--;
		        if(z.actPos == 0)
		        {
		          document.getElementById("prevImage").src = z.srcTransImage;
		        }
		        else
		        {
		          document.getElementById("prevImage").src = z.srcPrevImage;
		        }
		        document.getElementById("nextImage").src = z.srcNextImage;
		      }    
		      break;
		    }
		    default : break;
		  }
		}


		this.zoomImage = function() {
		  var z = this.zi[this.index];
		  if(z.intStatus == 0)
		  {
		    document.getElementById("imagebox").src = z.arrayimageszoomPart[z.actPos];
		    document.getElementById("zoomicon").src = z.arrayZoomIcon[1];
		    document.getElementById("divimagebox").className = z.arrayZoomClass[1];
		    z.intStatus = 1;
		  }
		  else
		  {
		    document.getElementById("imagebox").src = z.arrayImages[z.actPos];
		    document.getElementById("zoomicon").src = z.arrayZoomIcon[0];
		    document.getElementById("divimagebox").className = z.arrayZoomClass[0];
		    z.intStatus = 0;
		  }
		}
		
		this.init = function(index) {
		  this.index = index;
		  var z = this.zi[this.index];
			z.actPos = -1;
			z.intStatus = 1;
			this.changeImage("next");
			this.zoomImage ();
			document.getElementById("prevImage").src = z.srcTransImage;
		}
	}

function OpenPopup(page)
   {  
		seite = 'print.php?page_id=' + page + '&type=D';
		wshelp = window.open (seite, 'Element','height=620,width=620,menubar,scrollbars');
		wshelp.focus();
   }
function OpenSpezial(page)
   {  
		seite = 'print.php?page_id=' + page + '&type=D&spez=true';
		wshelp = window.open (seite, 'Element','height=710,width=940,menubar,scrollbars');
		wshelp.focus();
   }
function openpopup(page)
  {
   OpenPopup(page);
  }
