function validatequick()
{
	f = document.getElementById("quickfile").value.toLowerCase();
	t = ["jpg", "jpeg", "tif", "tiff", "gif", "bmp", "png"];
	if(f != "")
	{
		fparts = f.split(".");
		ext  = fparts[fparts.length-1];
		for(i=0; i<t.length; i++)
		{
			if(t[i] == ext) 
			{
				document.getElementById("UploadButton").disabled = true;
				document.getElementById("UploadMessage").innerHTML = "Image uploading ...."
				return true;
			}
		}
		alert("Valid image types are JPG, JPEG, TIF, TIFF, GIF, BMP and PNG only.");
		return false;
	}
	else
	{
		alert("Please select an image to upload.");
		return false;
	}
}

function validatelogin()
{
	u = document.getElementById("username").value;
	p = document.getElementById("password").value;
	if(u != "" && p != "")
	{
		return true;
	}
	else
	{
		alert("Please enter your username and password to sign in.");
		return false;
	}
	return true;
}

