
function make_full(picture_name, boat_num){
http = new XMLHttpRequest();	
	var url = "includes/make_large.php";
	
	
		var params = "picture="+picture_name+"&boat_num="+boat_num;
		http.open("POST", url, true);
		
		//Send the proper header information along with the request
		http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		http.setRequestHeader("Content-length", params.length);
		http.setRequestHeader("Connection", "close");
		
		http.onreadystatechange = function() {//Call a function when the state changes.
			if(http.readyState == 4 && http.status == 200) {
				document.getElementById('big_image').innerHTML = http.responseText;
			}
		}
	
			http.send(params);
	
}
function rotate_pics(last_pic,boat_num,limit)
{
	if(last_pic == "" || last_pic == "undefined"){last_pic = 0;}
	last_pic++;
	//alert(last_pic);
	if(last_pic > limit){last_pic = 1;} 
	//alert(last_pic); return false;
	//alert(last_pic);
	
	var picture_name = document.getElementById("photo_"+last_pic).value;
	if(picture_name != "" && picture_name != "undefined" && picture_name != "skippy")
	{
		make_full(picture_name,boat_num);
		setTimeout("rotate_pics('"+last_pic+"', '"+boat_num+"')",5000);
	}
	else{rotate_pics(last_pic,boat_num);}
}
		
