// Put up text to say that high res photos are available
function writephotoinfo(yearmonth, numphotos) {
	var d = new Date();
	galleryYear = parseInt (String (yearmonth).substr (0, 4));
	if (String (yearmonth).substr (4, 1) == "0") 
		galleryMonth = parseInt (String (yearmonth).substr (5, 1));	
	else
		galleryMonth = parseInt (String (yearmonth).substr (4, 2));	
	galleryDate = (galleryYear * 12) + galleryMonth;
	currentYear = d.getYear();
	currentMonth = d.getMonth()+1;
	currentDate = (currentYear * 12) + currentMonth;
	// Only output text if the gallery is less than or equal to 2 months old 
	if ((currentDate - galleryDate) <= 2) {
		if (numphotos > 1)
			document.write('<p align="left" class="midtonetext">Please click on a photo for the full size version </p>');
		else
			document.write('<p align="left" class="midtonetext">Please click on photo for the full size version </p>');
	}
}
// Two or more
function writehighresphotoinfo(yearmonth) {
	writephotoinfo(yearmonth, 2);
}
// Only one
function writehighresphotoinfoone(yearmonth) {
	writephotoinfo(yearmonth, 1);
}


// do the valdation and get photo for an image in the gallery
function getPicture(obj)
{
	filepath = new String(obj.childNodes[0].getAttribute("src"));
	segments = filepath.split ("/");
	filename = segments [segments.length-1];
	htmlpath = new String(document.location.pathname);
	segments = htmlpath.split ("/");
	galleryname = segments [segments.length-2];
	document.location = "../../scripts/validateparent.asp?gallery=" + galleryname + "&file=" + filename;
}



