/*
Image loader by Galerie West 
for more info (http://www.galeriewest.nl).
Friday, November 10, 2006
v 0.1
*/

function showPic (path,whichpic,amount,whichtable) {
	//scroll(0,0);
	currentslide = window.currentslide || new Array(); 
	maxslides = window.maxslides || new Array();
	currentslide[whichtable]=whichpic; 
	maxslides[whichtable]=amount; 
	
	slide = window.slide || new Array(maxslides[whichtable]+1); 
	slide[whichtable]=new Array();
	for(var n=1;n<=maxslides[whichtable];n++) { 
		slide[whichtable][n]=path+n+'.jpg'; 	
	} 
	if (document.getElementById) {
		document.getElementById('placeholder'+whichtable).src = slide[whichtable][currentslide[whichtable]];
		document.getElementById('placeholder'+whichtable).height = "480";
		return false;
	} else {
		return true;
	}
	focus();
}

function showPic_top (path,whichpic,amount,whichtable) {
	location="#mytop";
	scroll(0,0);
	currentslide = window.currentslide || new Array(); 
	maxslides = window.maxslides || new Array();
	currentslide[whichtable]=whichpic; 
	maxslides[whichtable]=amount; 
	
	slide = window.slide || new Array(maxslides[whichtable]+1); 
	slide[whichtable]=new Array();
	for(var n=1;n<=maxslides[whichtable];n++) { 
		slide[whichtable][n]=path+n+'.jpg'; 	
	} 
	if (document.getElementById) {
		document.getElementById('placeholder'+whichtable).src = slide[whichtable][currentslide[whichtable]];
		return false;
	} else {
		return true;
	}
	//href = "#mytop";
	
	focus();
}
function shownextPic (path, whichtable,amount){
	//alert (whichtable+ " | "+maxslides[whichtable]+" | "+currentslide[whichtable]+" | " + slide);
	//alert (path);
	currentslide = window.currentslide || new Array(); 
	maxslides = window.maxslides || new Array();
	currentslide[whichtable] = window.currentslide[whichtable] || 1; 
	maxslides[whichtable]=amount; 
	
	slide = window.slide || new Array(maxslides[whichtable]+1); 
	slide[whichtable]=new Array();
	
	for(var n=1;n<=amount;n++) { 
		slide[whichtable][n]=path+n+'.jpg'; 	
	}
	
	currentslide[whichtable]=currentslide[whichtable]+1; 
	if (currentslide[whichtable]>maxslides[whichtable]) currentslide[whichtable]=1;
	
	if (document.getElementById) {
		document.getElementById('placeholder'+whichtable).src = slide[whichtable][currentslide[whichtable]];
		//alert (slide[whichtable][currentslide[whichtable]]);
		return false;
	} else {
		return true;
	}
}


function showprevPic (path, whichtable){
	//alert (whichtable+ " | "+maxslides[whichtable]+" | "+currentslide[whichtable]+" | " + slide);
	//alert (path);
	currentslide[whichtable]=currentslide[whichtable]-1; 
	if (currentslide[whichtable]==0) currentslide[whichtable]=maxslides[whichtable]-1;
	
	if (document.getElementById) {
		document.getElementById('placeholder'+whichtable).src = slide[whichtable][currentslide[whichtable]];
		//alert (slide[whichtable][currentslide[whichtable]]);
		return false;
	} else {
		return true;
	}
}	

