var imgPath;

//photolarge = new Image();

pic1 = new Image();
pic2 = new Image();
pic3 = new Image();
pic4 = new Image();
pic5 = new Image();

imgSmall = new Array(6);
imgLarge = new Array(6);
imgIDs = new Array(6);


function ImgPreLoad(imgID, recordID) {
	var f = recordID + "_" + imgID + ".jpg";
	imgSmall[imgID] = ImgUrl('small', f);
	imgLarge[imgID] = ImgUrl('large', f);
	imgIDs[imgID] = imgID;
}

function Show(place, placeid, bigpic) {
	var current_small_id = imgIDs[placeid];
	var current_big_id = imgIDs[1];

	var new_small_url = imgSmall[current_big_id];
	var new_big_url = imgLarge[current_small_id];

	bigpic.src = new_big_url + "?r=" + Math.random();
	place.src = new_small_url + "?r=" + Math.random();
	
	//alert("");
	
	imgIDs[placeid] = current_big_id;
	imgIDs[1] = current_small_id;
	
}

function ImgUrl(size, filename) {
	var url = imgPath + size + "/" + filename;
	return(url);
}

