function init() {
	var loc = "" + document.location;
	var index = loc.indexOf("#");
	if (index >= 0) {
		var param = loc.substr(index + 1);
		var errMsg = "";
		if (param == "bigerror") {
			errMsg = "Oops...A server error has occurred.  Please try uploading your template again!";
		} else if (param == "nofile") {
			errMsg = "Please upload an image.";
		} else if (param == "session") {
			errMsg = "Where'd you go?";
		} else if (param == "file") {
			errMsg = "There was a problem with the file, was it larger than 5MB?";
	 	} else if (param == "badimage") {
			errMsg = "There was a problem with your image, please try another.";
		} else if (param == "rotate") {
			errMsg = "Please rotate your image to portrait orientation."
		} else if (param == "toobig") {
			errMsg = "Please upload a lower-resolution image."
		} else if (param == "memory") {
			errMsg = "Too many people making fonts! Please try again in a few minutes."
		}
		document.getElementById("errormsg").innerHTML = errMsg;
	}

}

function upload() {
	document.getElementById("loading_matte").style.display = 'block';
	document.uploadform.submit();
}
