pics = new Array("<?php echo $webroot?>jpgs/schmuck1.jpg","<?php echo $webroot?>jpgs/schmuck2.jpg","<?php echo $webroot?>jpgs/schmuck3.jpg","<?php echo $webroot?>jpgs/schmuck4.jpg","<?php echo $webroot?>jpgs/schmuck5.jpg","<?php echo $webroot?>jpgs/schmuck6.jpg","<?php echo $webroot?>jpgs/schmuck7.jpg","<?php echo $webroot?>jpgs/schmuck8.jpg"); // bilder hier rein
  changeTime = 4; // sekunden
  var curPic=1;
  var pos=0;
  var add1=1;
  
  window.addEventListener?window.addEventListener("load",so_init,false):window.attachEvent("onload",so_init);
  window.addEventListener?window.addEventListener("load",slide,false):window.attachEvent("onload",slide);
  var d=document, imgs = new Array(), zInterval = null, current=0, pause=false;
  
  function so_init() {
  	if(!d.getElementById || !d.createElement)return;
  	imgs = d.getElementById("singlePicStart").getElementsByTagName("img");
  	for(i=1;i<imgs.length;i++) imgs[i].xOpacity = 0;
  	imgs[0].style.display = "block";
  	imgs[0].xOpacity = .99;
  	so_xfade();
  	//setTimeout(so_xfade,1000);
  }
  
  function so_xfade() {
  	cOpacity = imgs[current].xOpacity;
  	nIndex = imgs[current+1]?current+1:0;
  
  	nOpacity = imgs[nIndex].xOpacity;
  	
  	cOpacity-=.05; 
  	nOpacity+=.05;
  	
  	imgs[nIndex].style.display = "block";
  	imgs[current].xOpacity = cOpacity;
  	imgs[nIndex].xOpacity = nOpacity;
  	
  	setOpacity(imgs[current]); 
  	setOpacity(imgs[nIndex]);
  	
  	if(cOpacity<=0) {
  		imgs[current].style.display = "none";
  		current = nIndex;
  		//setTimeout(so_xfade,1000);
  	} else {
  		setTimeout(so_xfade,50);
  	}
  	
  	function setOpacity(obj) {
  		if(obj.xOpacity>.99) {
  			obj.xOpacity = .99;
  			return;
  		}
  		obj.style.opacity = obj.xOpacity;
  		obj.style.MozOpacity = obj.xOpacity;
  		obj.style.filter = "alpha(opacity=" + (obj.xOpacity*100) + ")";
  	}
  	
  }
  
  function slide()
  {
  if((pos>=100) && (pos%110 == 0)) {
  firstNode = document.getElementById("insidePicsStart").childNodes[0];
  secondNode = document.getElementById("insidePicsStart").childNodes[1];
  document.getElementById("insidePicsStart").removeChild(firstNode);
  document.getElementById("insidePicsStart").removeChild(secondNode);
  document.getElementById("insidePicsStart").appendChild(secondNode);
  document.getElementById("insidePicsStart").appendChild(firstNode);
  pos-=103;
  }
  pos+=add1;
  setTimeout("slide()",67);
  document.getElementById("insidePicsStart").style.right = pos + "px";
  if(pos%100 == 0) so_xfade();
  }
              

