function validate(theForm)
{
	if(theForm.image.value == "")
	{
		alert("Please select a .jpg picture from your computer to upload.");
		theForm.image.focus();
		return false;
	}
	if (!filterFileType(theForm.image, "jpg") && !filterFileType(theForm.image, "jpeg") && !filterFileType(theForm.image, "png") && !filterFileType(theForm.image, "JPG") && !filterFileType(theForm.image, "PNG") && !filterFileType(theForm.image, "JPEG") && !filterFileType(theForm.image, "jpe") && !filterFileType(theForm.image, "JPE") && !filterFileType(theForm.image, "gif") && !filterFileType(theForm.image, "GIF"))
	{
		alert("Please submit only JPEG (.jpg, .jpeg) PNG (.png), or GIF (.gif) files");
		theForm.image.focus();
		return false;
	}
	return true;
}

function filterFileType(field, ext)
{
	if (field.value.indexOf('.' + ext) == -1)
	{
		return false;
	}
	return true;
}

function verify(theLink)
{
	var conf = confirm("Are you sure you want to delete this picture?");
	if(conf)
	{
		return true;
	} else {
		return false;
	}
}