//for image viewer slide show

myCount = 0;


function UpdateCounter( currentCount )
{
	myCount = currentCount;
}

function loadImgArray( strList ){
	myImgList = strList.split(",");
}
function loadCaptionArray( strListC ){
	myCaptionList = strListC.split(",");
}
function NextSlideShow( maxCount,outLocation ){
	thisLocation = 'MainPhoto';
	if(outLocation != ''){
		thisLocation = outLocation;
	}
//alert(thisLocation + " "+ outLocation);

	if(myCount >= maxCount){
		myCount = 0;
	}else{
		myCount++;
	}
	//alert( myImgList[myCount] );
	show(thisLocation,myImgList[myCount],myCaptionList[myCount]);
}
function PrevSlideShow( maxCount,outLocation ){
	thisLocation = 'MainPhoto';
	if(outLocation != ''){
		thisLocation = outLocation;
	}
	if(myCount <= 0){
		myCount = maxCount;
	}else{
		myCount--;
	}
	//alert( myImgList[myCount] );
	show(thisLocation,myImgList[myCount],myCaptionList[myCount]);
}

function fillLabel(inField,inValue){
    if(inValue == ''){
	inValue = myCount + 1;
    }
    if(document.layers)    //NN4+
    {
       document.layers[inField].innerHTML = inValue;
    }
    else if(document.getElementById)      //gecko(NN6) + IE 5+
    {
        var obj = document.getElementById(inField);
        obj.innerHTML = inValue;
    }
    else if(document.all)       // IE 4
    {
        document.all[inField].innerHTML = inValue;
    }
}


