function slide(){
	var className = 'SlidingPanelsContent';		 //change the className that is on all your content panels..
	var panelCount = sp1.getContentPanelsCount();//get panel length
	var current = sp1.getCurrentPanel();		 //get current panel
	var group = sp1.getContentGroup();			 //get our group
	var panelNumber = 0;
	if(group.hasChildNodes()){
		var j = 0;
		for(var i = 0, l = group.childNodes.length; i < l; i ++){
			if(group.childNodes[i].className && group.childNodes[i].className.search(new RegExp("\\b" + className + "\\b")) != -1){ // if it has SlidingPanelsContent class we found the correct node.
				if(group.childNodes[i] == current) // if it matches our current panel, we have a number
					panelNumber = j;
				
				j++; //increase our panelcounter
			}
		}
	
	}
	sp1.showPanel(((panelNumber + 1 /* its currently 0 based, and the panelCount isn't so we need to increase */) != panelCount ? (panelNumber + 1) : 0));
	sp2.showPanel(((panelNumber + 1 /* its currently 0 based, and the panelCount isn't so we need to increase */) != panelCount ? (panelNumber + 1) : 0));
};

function slide3(){
	var className = 'SlidingPanelsContent';		 //change the className that is on all your content panels..
	var panelCount = sp3.getContentPanelsCount();//get panel length
	var current = sp3.getCurrentPanel();		 //get current panel
	var group = sp3.getContentGroup();			 //get our group
	var panelNumber = 0;
	if(group.hasChildNodes()){
		var j = 0;
		for(var i = 0, l = group.childNodes.length; i < l; i ++){
			if(group.childNodes[i].className && group.childNodes[i].className.search(new RegExp("\\b" + className + "\\b")) != -1){ // if it has SlidingPanelsContent class we found the correct node.
				if(group.childNodes[i] == current) // if it matches our current panel, we have a number
					panelNumber = j;
				
				j++; //increase our panelcounter
			}
		}
	
	}
	sp3.showPanel(((panelNumber + 1 /* its currently 0 based, and the panelCount isn't so we need to increase */) != panelCount ? (panelNumber + 1) : 0));
};

function resetSlideShow() {
	clearInterval(slideShow);
	window.slideShow = setInterval(slide,8000);
}
function stopSlideShow() {
	clearInterval(slideShow);
}
function startSlideShow() {
	window.slideShow = setInterval(slide,8000);
}
function startNewsSlide() {
	window.slideNews = setInterval(slide3,5500);
}
