// Code by Stefano Ranfagni. Incomedia.it 2004. All rights reserved.
var next = 0
function fnGo(direction)
  {
  document.all["oDescr_" + next].style.visibility="hidden";
  bVal = 0;
  var divCollection = oWrapperDiv.childNodes;
  var ColLength = divCollection.length;
        for(i=0; i<ColLength; i++){
            if (divCollection(i).style.zIndex == 2){
                if (direction == "forward"){
		    if (i==ColLength-1)
                    next = 0;
		    else
                    next = i + 1;
                }else if (direction == "back"){
		    if (i==0)
                    next = ColLength-1;
		    else
                    next = i - 1;
                }else if (direction == "first"){
	            next = 0;
                }else if (direction == "last"){
                    next = ColLength-1;
                }else
		    break;
		if (document.all["oDescr_" + next].style.zIndex == 0)
			Descr.src = 'files/btndescr_0.gif';
		else
			Descr.src = 'files/btndescr_1.gif';
		oCounter.innerHTML = (next + 1) + '/' + ColLength;

                for(j=0; j<ColLength; j++){
                    divCollection(j).style.zIndex = 0;
                } 
                divCollection(i).style.zIndex = 1;
                divCollection(next).style.zIndex = 2;                                             
                var transitionFilterCol = divCollection(next).childNodes;
                var nextTransitionFilter = new Object();
                nextTransitionFilter = transitionFilterCol(0);
                var nextDiv = new Object();
                nextDiv = divCollection(next);
                nextTransitionFilter.beginElement();
                nextDiv.beginElement();
                break;}}}

// Image Description
var bVal = 0
function ShowDescr() {
 if (document.all["oDescr_" + next].style.zIndex == 10){
   if (bVal == 0) {
     bVal = 1;
     document.all["oDescr_" + next].style.visibility="visible";
   } else {
     bVal = 0;
     document.all["oDescr_" + next].style.visibility="hidden";
  }}
}
//SwapImage
function SwapImage(oImage, iStatus) {
oImage.src="files/btn" + oImage.name + "_" + iStatus + ".gif";
}
//WinPopUp
function winpopup(page){
popUpWinWindow=window.open(page,'','fullscreen, scrollbars=No');
popUpWinWindow.focus();
}
function doAuto(){
	fnGo('forward');
	oTime=setTimeout('doAuto()', 4000);
}
function PlayPause(){
if (cmd_Auto.alt == 'Pause') {
	cmd_Auto.alt='Play';
	cmd_Auto.src='files/btn5_0.gif';
	clearTimeout(oTime);
} else {
	cmd_Auto.alt='Pause';
	cmd_Auto.src='files/btn5_1.gif';
	fnGo('forward');
	oTime=setTimeout('doAuto()', 4000);
}}