var mInt=window.location.href.split("?"),mOn;
var mNextPage;
if(mInt.length>1){mInt=mInt[1]}else{mInt=0}

function showNext(vForce){
        mNextPage=NextPage.value;
	if(mOn||vForce){window.location.href=mNextPage+"?"+mInt;}
}
function setTimer(vInt){
	mInt=vInt;
	if(mInt==0){
		mOn=false;
	}else{
		mOn=true;
		window.setTimeout("showNext(false)",mInt*1000)
	}
}
function startStop(b){
	if(!mOn){
		setTimer(mInt);
		if(mInt>0){b.value="Stop slideshow";}
	}else{
		b.value="Start slideshow";
		mOn=false;
	}
}
function showAutoNext(){
	var sOut="<input class='CellButton' type='label' value='";
	if(mInt>0){sOut+="Stop slideshow"}else{sOut+="Start slideshow"}
	sOut+="' onclick='javaScript:startStop(this)'><input title='Enter the interval (in seconds) in the textbox and click start to begin the slideshow' class='CellTxtBox' value='"+mInt+"' onchange='javaScript:mInt=this.value;'>";
	document.write(sOut);
}

