
// Returns false if not GIF, JPG, or JPEG
// imgName is the full path of the image file
function checkImage(imgName) {
	var picType = ""
	
	picType = imgName.substring(imgName.lastIndexOf("."), imgName.length);
	picType = picType.toLowerCase();
	if (picType != ".gif" && picType != ".jpg" && picType != ".jpeg")	return false;

	// Valid
	return true;				
}

// Returns the height of an image
// imgName is the full path of the image file
function getImageHeight(imgName) {
	var img = new Image()
	
	img.src = imgName;
	return img.height;
}

// Returns the width of an image
// imgName is the full path of the image file
function getImageWidth(imgName) {
	var img = new Image()
	
	img.src = imgName;
	return img.width;
}