// JavaScript Document

	var crtidx = 1;
	var picInterval = null;
	var oldOnLoad = window.onload;
	var nInterval = 3000;
	
		function switchPic(){
		for(var i = 0; i < picids.length; i++){
			if(document.getElementById('pic' + picids[i]) != null) document.getElementById('pic' + picids[i]).style.display = 'none'; 
			
		}
		
		document.getElementById('pic' + picids[crtidx]).style.display = 'block';
		crtidx = (crtidx+1)%picids.length;
	}
	function switchPic2(to){
		for(var i = 0; i < picids.length; i++){
			if(document.getElementById('pic' + picids[i]) != null) document.getElementById('pic' + picids[i]).style.display = 'none'; 
			
		}
		document.getElementById('pic' + picids[to]).style.display = 'block';
		
		crtidx = (to+1)%picids.length;
		if(picInterval != null && typeof(picInterval) != 'undefined' ){
			clearInterval(picInterval);
			picInterval = setInterval('switchPic()', 3000);
		}
	}
	var oldOnLoad = window.onload;
	var picInterval = null;
	
    window.onload = function () {
        if(oldOnLoad != null && typeof(oldOnLoad) == 'function') {
            oldOnLoad();
        }
		picInterval = setInterval('switchPic()', 3000);

  	}
	function mouseOver()
	{
			if(picInterval != null && typeof(picInterval) != 'undefined' ){
				clearInterval(picInterval);
			
		}
	}
	
	function mouseOut()
	{
		picInterval = setInterval('switchPic()', 3000);
	}
	