<!--

var numPhotoA=1;
var numPhotoC=1;
var numPhotoR=1;

function auto(){

var totalPhotoA=7;
			for(var a=0; a<auto.arguments.length; a+=2) {
				
			
				switch(auto.arguments[a+1]){
			
				case 'plus':
				numPhotoA+=1;
				if(numPhotoA >= totalPhotoA){
					numPhotoA = totalPhotoA;
					document["plus1"].src = "images/forward_out.gif";				
				}
				if(numPhotoA > 1){
					document["minus1"].src = "images/back.gif";
				}
				
				var picture = "images/auto"+numPhotoA+".jpg";
				document[auto.arguments[a]].src = picture;
				document.getElementById("p1").innerHTML = numPhotoA+" of "+totalPhotoA;
				break;
				
				case 'minus':
				numPhotoA-=1;
				if(numPhotoA <= 1){
					numPhotoA = 1;
					document["minus1"].src = "images/back_out.gif";
				}
				if(numPhotoA <= totalPhotoA){
					document["plus1"].src = "images/forward.gif";
				}
				var picture = "images/auto"+numPhotoA+".jpg";
				document[auto.arguments[a]].src = picture;
				document.getElementById("p1").innerHTML = numPhotoA+" of "+totalPhotoA;		
		        	break;
				}
			}

}

function commercial(){

var totalPhotoC=3;
			for(var a=0; a<commercial.arguments.length; a+=2) {
				
			
				switch(commercial.arguments[a+1]){
			
				case 'plus':
				numPhotoC+=1;
				if(numPhotoC >= totalPhotoC){
					numPhotoC = totalPhotoC;
					document["plus2"].src = "images/forward_out.gif";				
				}
				if(numPhotoC > 1){
					document["minus2"].src = "images/back.gif";
				}
				
				var picture = "images/commercial"+numPhotoC+".jpg";
				document[commercial.arguments[a]].src = picture;
				document.getElementById("p2").innerHTML = numPhotoC+" of "+totalPhotoC;
				break;
				
				case 'minus':
				numPhotoC-=1;
				if(numPhotoC <= 1){
					numPhotoC = 1;
					document["minus2"].src = "images/back_out.gif";
				}
				if(numPhotoC <= totalPhotoC){
					document["plus2"].src = "images/forward.gif";
				}
				var picture = "images/commercial"+numPhotoC+".jpg";
				document[commercial.arguments[a]].src = picture;
				document.getElementById("p2").innerHTML = numPhotoC+" of "+totalPhotoC;		
		        	break;
				}
			}

}

function residential(){

var totalPhotoR=7;
			for(var a=0; a<residential.arguments.length; a+=2) {
				
			
				switch(residential.arguments[a+1]){
			
				case 'plus':
				numPhotoR+=1;
				if(numPhotoR >= totalPhotoR){
					numPhotoR = totalPhotoR;
					document["plus3"].src = "images/forward_out.gif";				
				}
				if(numPhotoR > 1){
					document["minus3"].src = "images/back.gif";
				}
				
				var picture = "images/residential"+numPhotoR+".jpg";
				document[residential.arguments[a]].src = picture;
				document.getElementById("p3").innerHTML = numPhotoR+" of "+totalPhotoR;
				break;
				
				case 'minus':
				numPhotoR-=1;
				if(numPhotoR <= 1){
					numPhotoR = 1;
					document["minus3"].src = "images/back_out.gif";
				}
				if(numPhotoR <= totalPhotoR){
					document["plus3"].src = "images/forward.gif";
				}
				var picture = "images/residential"+numPhotoR+".jpg";
				document[residential.arguments[a]].src = picture;
				document.getElementById("p3").innerHTML = numPhotoR+" of "+totalPhotoR;		
		        	break;
				}
			}

}
// -->