////////
//
// Gallery script for Hoad - Apelt range.
// larrymite.com.au - jo fleming
// last modified 17.03.08
//
////////

var tipsrc=new Array();
tipsrc[0]="canasDrape.jpg";
tipsrc[1]="divanLepo.jpg";
tipsrc[2]="karelLepo.jpg";
tipsrc[3]="karminaLepo.jpg";
tipsrc[4]="lamonLepo.jpg";
tipsrc[5]="madrasLepo.jpg";
tipsrc[6]="milanoLepo.jpg";
tipsrc[7]="oasisLepo.jpg";
tipsrc[8]="pilaLepo.jpg";
tipsrc[9]="takarLepo.jpg";
tipsrc[10]="tapanLepo.jpg";
	
var tipalt=new Array();
tipalt[0]="Canas, Drape [10/11]";
tipalt[1]="Divan, Lepo [11/11]";
tipalt[2]="Karel, Lepo [01/11]";
tipalt[3]="Karmina, Lepo [02/11]";
tipalt[4]="Lamon, Lepo [03/11]";
tipalt[5]="Madras, Lepo [04/11]";
tipalt[6]="Milano, Lepo [05/11]";
tipalt[7]="Oasis, Lepo [06/11]";
tipalt[8]="Pila, Lepo [07/11]";
tipalt[9]="Takar, Lepo [08/11]";
tipalt[10]="Tapan, Lepo [09/11]";

var tipsrct=new Array();
tipsrct[0]="canasDrape_t.jpg";
tipsrct[1]="divanLepo_t.jpg";
tipsrct[2]="karelLepo_t.jpg";
tipsrct[3]="karminaLepo_t.jpg";
tipsrct[4]="lamonLepo_t.jpg";
tipsrct[5]="madrasLepo_t.jpg";
tipsrct[6]="milanoLepo_t.jpg";
tipsrct[7]="oasisLepo_t.jpg";
tipsrct[8]="pilaLepo_t.jpg";
tipsrct[9]="takarLepo_t.jpg";
tipsrct[10]="tapanLepo_t.jpg";
	
function selectPic(shiftn)
{

	var thisone = 2+shiftn

	var pic=document.getElementById('pic2');

	var picname=document.getElementById('picName');
	
	
	
	
			pic.setAttribute('src',tipsrc[thisone]);
			pic.setAttribute('alt',tipalt[thisone]);
			pic.setAttribute('title',tipalt[thisone]);
			picname.innerHTML=tipalt[thisone];
}
		
/*
function movePrev(times) {

	var tip=new Array();
	tip[0]=document.getElementById('pic0');
	tip[1]=document.getElementById('pic1');
	tip[2]=document.getElementById('pic2');
	tip[3]=document.getElementById('pic3');
	tip[4]=document.getElementById('pic4');
	var picname=document.getElementById('picName');
	
	for (i=1;i<=times;i++) {

    		dib=tipsrc.pop();
		tipsrc.unshift(dib);

		dibt=tipsrct.pop();
		tipsrct.unshift(dibt);
		
		dibalt=tipalt.pop();
		tipalt.unshift(dibalt);

	}

	for (n=0;n<=4;n++) {
		if(n==2) {
			tip[n].setAttribute('src',tipsrc[n]);
			tip[n].setAttribute('alt',tipalt[n]);
			tip[n].setAttribute('title',tipalt[n]);
			picname.innerHTML=tipalt[n];
		}else {
			tip[n].setAttribute('src',tipsrct[n]);
			tip[n].setAttribute('alt',tipalt[n]);
		}
	}

}
*/

function morePrev(times) {

	var tip=new Array();
	tip[0]=document.getElementById('pic0');
	tip[1]=document.getElementById('pic1');
	tip[2]=document.getElementById('pic5');
	tip[3]=document.getElementById('pic3');
	tip[4]=document.getElementById('pic4');

	for (i=1;i<=times;i++) {

    		dib=tipsrc.pop();
		tipsrc.unshift(dib);

		dibt=tipsrct.pop();
		tipsrct.unshift(dibt);
		
		dibalt=tipalt.pop();
		tipalt.unshift(dibalt);

	}

	for (n=0;n<=4;n++)
	{
			tip[n].setAttribute('src',tipsrct[n]);
			tip[n].setAttribute('alt',tipalt[n]);
	}

}

/*
function moveNext(times) {

	var tip=new Array();
	tip[0]=document.getElementById('pic0');
	tip[1]=document.getElementById('pic1');
	tip[2]=document.getElementById('pic2');
	tip[3]=document.getElementById('pic3');
	tip[4]=document.getElementById('pic4');
	var picname=document.getElementById('picName');

	for (i=1;i<=times;i++) {

    		dib=tipsrc.shift();
		tipsrc.push(dib);

		dibt=tipsrct.shift();
		tipsrct.push(dibt);
		
		dibalt=tipalt.shift();
		tipalt.push(dibalt);

	}

	for (n=0;n<=4;n++) {
		if(n==2) {
			tip[n].setAttribute('src',tipsrc[n]);
			tip[n].setAttribute('alt',tipalt[n]);
			tip[n].setAttribute('title',tipalt[n]);
			picname.innerHTML=tipalt[n];
		}else {
			tip[n].setAttribute('src',tipsrct[n]);
			tip[n].setAttribute('alt',tipalt[n]);
		}
	}
}
*/

function moreNext(times) {

	var tip=new Array();
	tip[0]=document.getElementById('pic0');
	tip[1]=document.getElementById('pic1');
	tip[2]=document.getElementById('pic5');
	tip[3]=document.getElementById('pic3');
	tip[4]=document.getElementById('pic4');

	for (i=1;i<=times;i++) {

    		dib=tipsrc.shift();
		tipsrc.push(dib);

		dibt=tipsrct.shift();
		tipsrct.push(dibt);
		
		dibalt=tipalt.shift();
		tipalt.push(dibalt);

	}

	for (n=0;n<=4;n++)
	{
			tip[n].setAttribute('src',tipsrct[n]);
			tip[n].setAttribute('alt',tipalt[n]);
	}
}