var current = 1;
var offset = 0;
var pf= new Array();
pf[0] = "";
pf[1] = new Array("amber","Amber Elayne");
pf[2] = new Array("spds","Star Performance Drama School");
pf[3] = new Array("jelbonleigh","Jelbonleigh Estate");
pf[4] = new Array("newlook","Newlook Image Design");
pf[5] = new Array("paparazzistudios","Paparazzi Studios");
pf[6] = new Array("paparazzibrides","Paparazzi Brides");
pf[7] = new Array("harlem","Harlem");
pf[8] = new Array("wasgind","Robert Wasgind");
pf[9] = new Array("darrenlock","Darren Lock - Visual Communicator");
pf[10] = new Array("rhbbinsert","RHBB Field Days Insert");
pf[11] = new Array("riverlandwine","Riverland Wine");
pf[12] = new Array("riverlandhouseboatsloxton","Riverland Houseboats Loxton");
pf[13] = new Array("loriweddings","Lorraine (Lori) Fielke - Weddings");
pf[14] = new Array("bongo","Bongo Nutty Beads");
pf[15] = new Array("rhbb","Riverland Home Based Business Network Inc.");
pf[16] = new Array("wasgind_mark2","Robert Wasgind's Website Development - Mark II");
pf[17] = new Array("findmycompany","Find My Company");
pf[18] = new Array("rpmcg","Renmark Paringa Musuem Community Group Inc.");
pf[19] = new Array("sleepyacres","Sleepy Acres");
pf[20] = new Array("myeeevents","Myee Events");
pf[21] = new Array("hillbro","Hillbro Stud");
pf[22] = new Array("rfmb","Robin Foley Mortgage Brokers");
pf[23] = new Array("portiavalleywines","Portia Valley Wines");
pf[24] = new Array("paparazzistudiosmobilestudio","Paparazzi Studios Mobile Studio");
pf[25] = new Array("naturallyinspired","Naturally Inspired");
pf[26] = new Array("jakadac","JaKaDaC");
pf[27] = new Array("harlem_v2","Harlem Productions - Mark II");
pf[28] = new Array("bartons","Bartons Of Barmera");
pf[29] = new Array("401gliding","401 Gliding");
pf[30] = new Array("katfishtour","Katfish Reach Interactive Tour");
pf[31] = new Array("riverviewlogo","Riverview Lutheran Rest Home Inc. - Logo");
pf[32] = new Array("riverview","Riverview Lutheran Rest Home Inc.");
pf[33] = new Array("naturallyinspired2","Naturally Inspired - Redesign");
pf[34] = new Array("desoie","De Soie");

var totalthumbs = pf.length-1;
var step = 8;
function loadimages(){
	for(i = 1; i <= step; i++){
		p = pf.length-i-offset;
		if(p < 1){
			document.getElementById("port"+i).innerHTML = "&nbsp;";
		}else if(pf[p] != "" || pf[p] != null || pf[p] != "undefined"){
			document.getElementById("port"+i).innerHTML = "<a href='clients.php?client="+pf[p][0]+"'><img src='images/portfolio/thumb/port_"+pf[p][0]+".jpg' title=\""+pf[p][1]+"\" border='0' width='76' height='56'></a>";
		}else{
			document.getElementById("port"+i).innerHTML = "&nbsp;";
		}
	}
}
	function nextblock(){
		if(offset+step < totalthumbs){
			offset += step;
		}else{
			offset = 0;
		}
		loadimages();
	}
	function prevblock(){
		if(offset <= 0){
			offset = (Math.floor(totalthumbs/step)-1);
			if(totalthumbs%step > 0){
				offset += 1;
			}
			offset = offset * step;
		}else{
			offset -= step;
		}
		loadimages();
	}
	
