//currentIndx=0;

/* ####################### we create the functions to go forward and go back ####################### */
function Nexter(){
if (currentIndx<imagesPreloaded.length-1){
currentIndx=currentIndx+1;
document.theImage.src=imagesPreloaded[currentIndx].src

if (document.getElementById)
	{
		objID = document.getElementById("Pname");
		objID.innerHTML = Names[currentIndx];
	}

	if (document.layers)
	{
		objID = document.layers["Pname"];
		objID.document.open();
		objID.document.write(Names[currentIndx]);
		objID.document.close(); 
		
	}

	if (document.all)
	{
		document.all["Pname"].innerHTML = Names[currentIndx];
	}
}
else {
 currentIndx=0
 document.theImage.src=imagesPreloaded[currentIndx].src
if (document.getElementById)
	{
		objID = document.getElementById("Pname");
		objID.innerHTML = Names[currentIndx];
		
	}

	if (document.layers)
	{
		objID = document.layers["Pname"];
		objID.document.open();
		objID.document.write(Names[currentIndx]);
		objID.document.close(); 
		
	}

	if (document.all)
	{
		document.all["Pname"].innerHTML = Names[currentIndx];
	}
}
}
function Backer(){
if (currentIndx>0){
currentIndx=currentIndx-1;
document.theImage.src=imagesPreloaded[currentIndx].src
if (document.getElementById)
	{
		objID = document.getElementById("Pname");
		objID.innerHTML = Names[currentIndx];
		
	}

	if (document.layers)
	{
		objID = document.layers["Pname"];
		objID.document.open();
		objID.document.write(Names[currentIndx]);
		objID.document.close(); 
		
	}

	if (document.all)
	{
		document.all["Pname"].innerHTML = Names[currentIndx];
	}
}
else {
 currentIndx=imagesPreloaded.length-1
 document.theImage.src=imagesPreloaded[currentIndx].src
if (document.getElementById)
	{
		objID = document.getElementById("Pname");
		objID.innerHTML = Names[currentIndx];
	}

	if (document.layers)
	{
		objID = document.layers["Pname"];
		objID.document.open();
		objID.document.write(Names[currentIndx]);
		objID.document.close(); 
		
	}

	if (document.all)
	{
		document.all["Pname"].innerHTML = Names[currentIndx];
	}
}}

function transport(){
window.location=Pids[currentIndx];
}

